VLC Command Line: cvlc, Streaming & Automation
Behind the GUI, VLC is a full command-line media engine. The headless binary cvlc (or vlc --intf dummy) lets you script playback, run a streaming server, convert batches, and even control a running instance over a text interface. If you manage media on a server or NAS, this is the guide that unlocks VLC for you.
Step 1 — Basic playback from the terminal
On Linux/macOS, cvlc is installed with VLC. On Windows, use the full path: "C:\Program Files\VideoLAN\VLC\vlc.exe" with the --intf flags below.
The binary is available.
Play a file headless:
cvlc /path/to/movie.mkv --intf dummy --play-and-exitVLC plays the file and exits without any window.
List the file’s streams without playing:
cvlc movie.mkv --intf dummy --play-and-exit -vvv 2>&1 | grep -i "stream 0"Codec and stream info is printed.
Step 2 — Stream a file or device to the network
HTTP stream:
cvlc movie.mkv --sout "#standard{access=http,mux=ts,dst=:8080}"VLC serves the stream on port 8080; any player can open http://
:8080. Live webcam/device stream:
cvlc -vvv v4l2:///dev/video0 --sout "#transcode{vcodec=h264,vb=1200}:standard{access=http,mux=ts,dst=:8090}"(Linux) or dshow:// (Windows).A live H.264 stream is broadcast.
Stop with Ctrl+C — VLC cleans up the listener.
The stream ends.
Step 3 — Batch convert with one command
Single file:
cvlc input.mkv --sout "#transcode{vcodec=h264,acodec=mpga,vb=2000}:standard{mux=mp4,dst=output.mp4}" --sout-keep --play-and-exitThe file is converted.
Loop over a folder:
for f in *.mkv; do cvlc "$f" --sout "#transcode{...}:standard{mux=mp4,dst=${f%.mkv}.mp4}" --play-and-exit; doneEvery file is converted in sequence.
Check the ffmpeg alternative first for heavy jobs — cvlc encodes in software and is slower than ffmpeg with hardware encoders.
You chose the right tool for the job.
Step 4 — The rc interface for remote control
- Start with a control channel:
cvlc --extraintf rc --rc-host 127.0.0.1:4212 movie.mkv - Connect from another terminal:
telnet 127.0.0.1 4212(Linux/macOS) or use a telnet client on Windows. - Commands: play, pause, stop, seek 120, volume 80, next, prev, info, playlist.
- Scriptable via a file: printf "play\nvolume 60\n" | cvlc --extraintf rc --rc-fake-tty movie.mkv
Frequently asked questions
What is the difference between vlc and cvlc?
Can VLC stream my webcam to a webpage?
Why is CLI conversion slower than the GUI?
How do I find all VLC CLI options?
cvlc --longhelp (or --help --help-verbose) and pipe to a file: cvlc --longhelp > vlc-help.txt. The per-module options are listed under "Stream output" sections.