Ubuntu – Cannot connect to rtsp stream via vlc

rtspstreamingUbuntuvlc

I have ip camera.
When I go to this url

rtsp://192.168.20.100:554/user=admin&password=&channel=1&stream=0.sdp?

in my browser it offers me to use my standard video player and I can see the video. But when I try to open it in cvlc I have few errors

$cvlc rtsp://192.168.20.100:554/user=admin&password=&channel=1&stream=0.sdp?

[7] 16585
[8] 16586
[9] 16587
$ VLC media player 2.2.2 Weatherwax (revision 2.2.2-0-g6259d80)
[0000000001bd9208] core interface error: no suitable interface module
[0000000001ac0148] core libvlc error: interface "globalhotkeys,none" initialization failed
[0000000001bbe638] dummy interface: using the dummy interface module...
[00007fa928000e38] live555 demux error: Failed to connect with rtsp://192.168.20.100:554/user=admin

or

$ cvlc rtsp://admin:@192.168.20.100:554/channel=1&stream=0.sdp?[8] 16647
$ VLC media player 2.2.2 Weatherwax (revision 2.2.2-0-g6259d80)
[00000000016f9208] core interface error: no suitable interface module
[00000000015e0148] core libvlc error: interface "globalhotkeys,none" initialization failed
[00000000016de638] dummy interface: using the dummy interface module...
[00007fdb20000e88] live555 demux error: Failed to connect with rtsp://admin:@192.168.20.100:554/channel=1
[00007fdb2c000c18] core input error: open of `rtsp://admin:@192.168.20.100:554/channel=1' failed
[00007fdb2c000c18] core input error: Этот источник не открывается
[00007fdb2c000c18] core input error: VLC не может открыть MRL 'rtsp://admin:@192.168.20.100:554/channel=1'. Ищите более подробную информацию в лог-файле.

I've found similar problem, but there isn't an answer

Convert RTSP stream to HTTP and stream it with VLC client

Best Answer

The rtsp url is quite uncommon specially with the ? at the end.

What occurs is that '&' character is evaluated by the shell, your command is truncked with the first '&' and some process are forked (the [7] 16585...)

It should work escaping '&' or quoting the url like this:

cvlc "rtsp://192.168.20.100:554/user=admin&password=&channel=1&stream=0.sdp?"

or

cvlc rtsp://192.168.20.100:554/user=admin\&password=\&channel=1\&stream=0.sdp?
Related Topic