SDP malformed: sprop-parameter-sets=
0xhanh opened this issue · 9 comments
Agent raise error: "Error: rtsp: missing h264 sps or pps" when deal with H264 tracks that have an empty sprop-parameter-sets
same as link: bluenviron/mediamtx#861
Anyone tried to fix it?
@0xhanh RTSP server is required to set both SPS and PPS right? I might miss some context here.
@cedricve: Both SPS and PPS, it's quite common to deal with H264 tracks that have an empty sprop-parameter-sets, for various reasons - it may be caused be a defective software/firmware or by choice since parameters may change during time. Some cameras don't provide it.
These (SPS, PPS) can be discovered from H264 tracks? gortsplib fixed this issue.
Furthermore, cameras can do change SPS and PPS without closing the stream, so that:
- cameras that insert SPS and PPS into the SDP and do not send SPS and PPS NALUs
- cameras that insert SPS and PPS into the SDP, send SPS and PPS NALUs and can change them
- cameras that don't insert SPS and PPS into the SDP, send SPS and PPS NALUs and can change them
Therefore, the Agent will be adapter to support all these scenarios and will edit the SDP according to the last received SPS and PPS
(From prob: bluenviron/mediamtx#787)
thanks for the detailed explanation @0xhanh! Will check with the time if we will make the adaption in the joy4 library or the new media library we are working on!
Looks like this issue is occuring with Hanwha cameras.
Looks like you have fixed it already in your fork! Wonderful work, can you confirm this resolved your issue with the missing SSP, PPS: 0xhanh/joy4@68dbc5f
We will embed a new RTSP client, might be more stable than before. Will close this issue once released.
We embedded a new rtsp library, might have fixed this issue. Closing for now, please reopen if still the case.