Using VLC as RTSP server
Solution 1
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
Solution 2
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=4444,sdp=rtsp://localhost:8080/test.sdp}"
Related videos on Youtube
StackedCrooked
Software developer specializing in C++ cross-platform development. Hobby projects: Coliru: online C++ compiler Anime Ratings: Google Chrome extensions for finding good anime tetris-challenge: experimentation with Tetris AI algorithms
Updated on September 17, 2022Comments
-
StackedCrooked over 1 year
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".
-
heavyd about 13 yearsAre you using the command exactly as its given? If not what is the command you're using?
-
John Smith over 3 yearsStill doesn't work. Nothing happens.