Streaming media via VLC telnet interface

Pete Houston
Dec 23, 2015 · 2 min read
$ vlc v4l2:///dev/video0:chroma=mjpg --sout ‘#rtp{mux=ts,sdp=rtsp://IP:PORT/live.sdp}’$ vlc video.mp4 --sout ‘#rtp{mux=mpegts,sdp=rtsp://IP:PORT/live.sdp}’
$ telnet 127.0.0.1 4212
Trying 127.0.0.1…
Connected to 127.0.0.1.
Escape character is ‘^]’.
VLC media player 2.1.6 Rincewind
Password:
Welcome, Master
>
Syntax:new RESOURCE_NAME (broadcast|vod)
Syntax:setup RESOURCE_NAME PROPERTY VALUE
> new LIVE broadcast
new
> setup LIVE input v4l2:///dev/video0:chroma=mjpg
setup
> setup LIVE output #rtp{mux=ts,sdp=rtsp://:8888/live.sdp}
setup
> setup LIVE enabled
setup
> control LIVE play
control
>
> new VIDEO vod
new
> setup VIDEO input /home/petehouston/projects/sample-media/video.mp4
setup
> setup VIDEO enabled
setup
>
$ vlc rtsp://localhost:8888/live.sdp
$ vlc rtsp://localhost:9000/VIDEO

Pete Houston

Written by

Code / Design / Love @ https://petehouston.com

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade