scottlamb / retina

High-level RTSP multimedia streaming library, in Rust
https://crates.io/crates/retina
Apache License 2.0
244 stars 48 forks source link

Add policy for handling session IDs #85

Closed spencercw closed 1 year ago

spencercw commented 1 year ago

I don't know what model camera this is, but it calls itself 'H264DVR 1.0'. In typical garbage IP camera fashion, if you request only the video stream in UDP mode then it just hangs and doesn't send any RTP data. If you then humour it and request the unwanted audio stream, it (sometimes) returns a different session ID in the second SETUP response. This doesn't seem to actually cause any problems; when you send the PLAY request, both RTP streams start.

I don't think retina is doing anything wrong. Looking at the packet traces, the same thing happens with ffmpeg which seems to just ignore the new session ID.

spencercw commented 1 year ago

Tests added