4

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".

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
| improve this answer | |
  • 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 Apr 16 '11 at 1:01
  • Are you using the command exactly as its given? If not what is the command you're using? – heavyd Apr 16 '11 at 3:23
  • 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 for transcodefps=10:rtpsdp=rtsp://localhost:8080/test.sdp' [0x98a5cb0] main input error: cannot start stream output instance, aborting – singpolyma Apr 16 '11 at 19:17
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}" 
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.