1

By trial and error I was able to display the feed from an RTSP WiFi cam in VLC using the URL:

rtsp://192.168.2.33:554?user=admin&password=&channel=2&stream=1.sdp

However all the examples I find use something like:

rtsp://192.168.2.33:554/user=admin&password=&channel=2&stream=1.sdp

with the / instead of the ?. The / does not work for me. VLC can not open the stream. Does anyone know what the difference is?

techraf
  • 3,316

2 Answers2

3

Question mark is used in URI as a separator of a path to the resource and query arguments. Per RFC 3986:

    foo://example.com:8042/over/there?name=ferret#nose
    \_/   \______________/\_________/ \_________/ \__/
     |           |            |            |        |
  scheme     authority       path        query   fragment

And in section 3.3:

The path is terminated by the first question mark ("?") or number sign ("#") character, or by the end of the URI.

So your first example is correct.

The second one (without ?) is wrong, because it combines query arguments into a path to the requested resource.


As a side note: browsers (at least current versions of Chrome or Firefox) will automatically change:

http://192.168.2.33:554?user=admin&password=&channel=2&stream=1.sdp

into:

http://192.168.2.33:554/?user=admin&password=&channel=2&stream=1.sdp
techraf
  • 3,316
0

Try

rtsp://user:password@ip.of.your.device/

This should give you the first channel at least, after that it can be dependant on the device as to the syntax for the rest of it.

rtsp://user:password@ip.of.your.device/cam/realmonitor?channel=1&subtype=1 

works for mine but your mileage may vary.

pomsky
  • 70,557
Trig
  • 1