mpromonet / webrtc-streamer

WebRTC streamer for V4L2 capture devices, RTSP sources and Screen Capture
https://webrtcstreamer.agreeabletree-365b9a90.canadacentral.azurecontainerapps.io/?layout=2x2
The Unlicense
2.99k stars 603 forks source link

RTSP stream not working (Amcrest) #392

Closed melluh closed 3 years ago

melluh commented 3 years ago

Describe the bug When trying to use an RTSP stream from an Amcrest camera, the stream doesn't work and the following error appears in the console: https://pastebin.com/qYyV8QyN. The same url works fine when connecting with VLC.

Desktop (please complete the following information):

mpromonet commented 3 years ago

Hi,

The DESCRIBE answer 404 indicate the server does not know the rtsp url. Maybe you should url encode characters in your password ?

Best Regards, Michel.

melluh commented 3 years ago

After doing some troubleshooting, I've discovered the issue did have to do with URL encoding, just not the password. My password does contain special characters but I had already escaped those. What I discovered was that the '&' in the URL was causing issues. After replacing this with '%26', it works perfectly. For future reference, the URL you should use for Amcrest cameras is:

rtsp://user:pass@ipaddr:554/cam/realmonitor?channel=1%26subtype=0