Using VLC as RTSP server

4

5

I'm trying to figure out how to use the server capabilities of VLC. More specifically, how to export an SDP file when RTP streaming. In chapter 4 in the section related to RTP Streaming examples for server and client are given:

vlc -vvv input_stream --sout '#rtp{dst=192.168.0.12,port=1234,sdp=rtsp://server.example.org:8080/test.sdp}'
vlc rtsp://server.example.org:8080/test.sdp

It's not very clear to me how to make it actually work. I have tried these two commands for server and client using two cmd instances:

vlc -I rc screen:// --sout=#rtp{dst=127.0.0.1,port=4444,sdp=rtsp://localhost:8080/test.sdp} 
vlc -I rc rtsp://localhost:8080/test.sdp

Invoking the second command causes the first one to crash. The second command shows the error message "could not connect to localhost:8080".

StackedCrooked

Posted 2009-12-18T20:54:43.177

Reputation: 2 525

Answers

5

Your problem is that most likely the example you're looking at is for streaming a file and your example command is using the screen:// input. To make the screen:// device work you need to encode the video first. So try something like this:

vlc -I rc screen:// --sout=#transcode{vcodec=h264,vb=800,scale=0.25,fps=10}:rtp{dst=127.0.0.1,port=4444,sdp=rtsp://localhost:8080/test.sdp}
vlc -I rc rtsp://localhost:8080/test.sdp

heavyd

Posted 2009-12-18T20:54:43.177

Reputation: 54 755

When I run this command I get main stream out error: no sout stream module matched "transcodefps=10" main stream output error: stream chain failed for `transcodefps=10:rtpsdp=rtsp://localhost:8080/test.sdp' What am I doing wrong? – singpolyma – 2011-04-16T01:01:19.077

Are you using the command exactly as its given? If not what is the command you're using? – heavyd – 2011-04-16T03:23:14.093

Running it exactly as given. $ vlc -I rc screen:// --sout=#transcode{vcodec=h264,vb=800,scale=0.25,fps=10}:rtp{dst=127.0.0.1,port=4444,sdp=rtsp://localhost:8080/test.sdp} VLC media player 1.0.6 Goldeneye Remote control interface initialized. Type help' for help. [0x98ad010] main stream out error: no sout stream module matched "transcodefps=10" [0x98ac8b0] main stream output error: stream chain failed fortranscodefps=10:rtpsdp=rtsp://localhost:8080/test.sdp' [0x98a5cb0] main input error: cannot start stream output instance, aborting – singpolyma – 2011-04-16T19:17:28.717

3

You need to double quote the command

--sout="#transcode{vcodec=h264,vb=800,scale=0.25,fps=10}:rtp{dst=127.0.0.1,port=444‌​4,sdp=rtsp://localhost:8080/test.sdp}" 

gianrisa

Posted 2009-12-18T20:54:43.177

Reputation: 31