eriknl / SmarterDog

Backend for CleverDog cloud CCTV
GNU General Public License v3.0
3 stars 1 forks source link

RTSP Stream Playback #1

Open lmangani opened 2 years ago

lmangani commented 2 years ago

Thank you so much for sharing this project and your blog post!

I had no trouble compiling and scanning for cameras, but I can't get streaming to work with VLC. The SDP SmarterDog emits looks fine to me, but VLC seems to send RR or some other unhandled payload causing the 405s below. Is this perhaps something you've observed before? Could you suggest an RTSP player you're using to consume the streams?

===========================================================
Read: PLAY rtsp://192.168.88.43:8086/CID=200000528033 RTSP/1.0
CSeq: 5
User-Agent: LibVLC/3.0.12 (LIVE555 Streaming Media v2016.11.28)
Session: 01030507
Range: npt=0.000-

===========================================================
===========================================================
Write: RTSP/1.0 200 OK
CSeq: 5
Content-Length: 0

===========================================================
Read: $
===========================================================
===========================================================
Write: RTSP/1.0 405 Method Not Allowed
Content-Length: 0

===========================================================
Read: ��
===========================================================
===========================================================
Write: RTSP/1.0 405 Method Not Allowed
Content-Length: 0

===========================================================
Read: $
===========================================================
===========================================================
Write: RTSP/1.0 405 Method Not Allowed
Content-Length: 0

===========================================================
Read: ��
===========================================================
===========================================================
Write: RTSP/1.0 405 Method Not Allowed
Content-Length: 0

===========================================================
Read: TEARDOWN rtsp://192.168.88.43:8086/CID=200000528033 RTSP/1.0
CSeq: 6
User-Agent: LibVLC/3.0.12 (LIVE555 Streaming Media v2016.11.28)
Session: 01030507

===========================================================
===========================================================
Write: RTSP/1.0 200 OK
CSeq: 6
Content-Length: 0

===========================================================
Read: $
===========================================================
===========================================================
Write: RTSP/1.0 405 Method Not Allowed
Content-Length: 0

===========================================================

Once again thanks for sharing this fun hack & happy holidays!

eriknl commented 2 years ago

Hey Lorenzo, I think I have only tried to use this with mplayer and Surveillance Station on a Synology device. If you want to find out what kind of request is causing the 405 you could uncomment line 97 in rtspconnection.cpp and see what is logged. Depending on what it is it might be possible to implement it a either a dummy function or a full feature.

lmangani commented 2 years ago

Thanks @eriknl this helps!

lmangani commented 2 years ago

Did you use any particular syntax for mplayer to decode the streams?

eriknl commented 2 years ago

Did you use any particular syntax for mplayer to decode the streams?

I just ran mplayer rtsp://<url>. Did you get 405 responses with mplayer too? Maybe you can post the output from the terminal to see what is going on. If possible it might be helpful to have a packet capture to analyze this.