scottlamb / retina

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

Add policy for handling session IDs #85

Closed spencercw closed 11 months ago

spencercw commented 11 months 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 11 months ago

Tests added