-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RTSP stream failing to record due to missing IDR or non-IDR NALU #3614
Comments
Diving head first into the H.264 spec and analyzing my pcap file. It appears that my camera is sending Fragmentation Units A (NALU #28) as opposed to the expected IDR (NALU Type #5) or non-IDR (NALU Type #1) as implemented by dts_extractor.go. These FU-A allows fragmenting a NAL unit into several RTP packets. I see the completion end marker of the FU-A followed by Supplemental Enhancement Information (SEI) before finally getting the expected non-IDR NALU Types. |
I built out mediamtx from source and confirmed that dts_extrator.go is returning the above error in the case when the Access Unit contains a single SEI NALU. The question becomes: should the SEI be incorporated into dts_extractor algorithm or should it be skipped and simply return the previous DTS (the same value can be handled given bluenviron/mediacommon#119)? I found the following documentation from the h.264 spec and it seems like skipping the NALUwould be sufficient and have also confirmed that my video is then recorded.
|
* h264: Fix DTS Extractor when single SEI NALU is received (bluenviron/mediamtx#3614) * fix lint errors --------- Co-authored-by: aler9 <[email protected]>
Fixed by bluenviron/mediacommon#142 |
Which version are you using?
v1.8.4
Which operating system are you using?
Describe the issue
Unable to record RTSP stream to disk in mp4 format. Continually see errors indicating the video stream does not have an IDR or non-IDR NALU and then proceeds to immediately create and close a segment. As a result, the segments on disk are < 1sec, only show a black images with the the correct audio.
I am able to view the same camera RTSP stream using a WebRTC client.
Describe how to replicate the issue
Did you attach the server logs?
yes
mediamtx.log
Did you attach a network dump?
yes
capture-pcap.zip
The text was updated successfully, but these errors were encountered: