kerberos-io / agent

An open and scalable video surveillance system for anyone making this world a better and more peaceful place.
https://kerberos.io
MIT License
709 stars 88 forks source link

SDP malformed: sprop-parameter-sets= #105

Closed 0xhanh closed 10 months ago

0xhanh commented 1 year ago

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: https://github.com/bluenviron/mediamtx/issues/861

Anyone tried to fix it?

cedricve commented 1 year ago

@0xhanh RTSP server is required to set both SPS and PPS right? I might miss some context here.

0xhanh commented 1 year ago

@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:

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: https://github.com/bluenviron/mediamtx/issues/787)

cedricve commented 1 year ago

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!

cedricve commented 1 year ago

Looks like this issue is occuring with Hanwha cameras.

cedricve commented 1 year ago

We'll prioritise this @0xhanh, can you verify which camera raised this error?

cedricve commented 1 year ago

Looks like you have fixed it already in your fork! Wonderful work, can you confirm this resolved your issue with the missing SSP, PPS: https://github.com/0xhanh/joy4/commit/68dbc5fd2cb3de57844844a1e21236fa2f544081

klihub commented 1 year ago

We'll prioritise this @0xhanh, can you verify which camera raised this error?

@cedricve The exact same error happens also with 'Foscam D2EP FHD IP Camera'.

cedricve commented 11 months ago

We will embed a new RTSP client, might be more stable than before. Will close this issue once released.

cedricve commented 10 months ago

We embedded a new rtsp library, might have fixed this issue. Closing for now, please reopen if still the case.