bytedeco/javacv

javacv recording camera playback stream to mp4 file, at the end there was a pause of nearly two minutes

Aperta

#1904 aperta il 9 ott 2022

 (2 commenti) (0 reazioni) (0 assegnatari)Java (1583 fork)batch import
enhancementhelp wanted

Metriche repository

Star
 (6985 stelle)
Metriche merge PR
 (Metriche PR in attesa)

Descrizione

I now want to record the fixed time rtsp playback stream of the camera as an mp4 file. When I experimented (tcp and udp), I found that there was a pause at the end of the code execution for almost two minutes before the program ended, but the mp4 file was intact, I don't know why this happened. So I compared the javacv program execution with the vlc player playing the rtsp stream to capture packets. Here is the packet capture image:

The first diagram is javacv and the second diagram is vlc

In both cases, the server (camera) finally sends an ANNOUNCE rtsp command:

In the javacv scenario: the client (javacv) will recover the 501 status code, and then the server will send the "Unknown RTP version 0" message all the time, and after nearly two minutes, the final connection is actively closed by the server

In the VLC scenario: VLC will reply with a 405 status code, and the connection will be closed correctly later

Thank you so much

Guida contributor