eo

Streaming DVD video over LAN on Ubuntu Linux with VLC

Watching DVD movies is one of the few occasions in which I still have need for an optical drive. As only my display-less home server (running Ubuntu 12.04) contains a DVD drive, I had to find a way to make the video data available to other machines over the local network.

One solution is to use the streaming feature of the VLC media player. It took me a while to figure out how it works for my setup, but here’s the CLI command I need to run via SSH on the server to start streaming of a DVD movie.

$ vlc \
    -vvv \
    dvdsimple:///dev/dvd \
    --sout '#standard{access=http,mux=ts,vcodec=x264,dst=:8181}'

This will make the video stream available in the local network through the URL http://<server>:8181, with <server> being the network IP or DNS name of the server machine.

On the client machine, start VLC, press CTRL-N to open the “Open media” dialog on the network tab, type in the URL of the stream and click the “Play” button. If there haven’t been any errors, playback of the main movie should start.

Other stream settings

To change the language or add a subtitles track or adjust other aspects, see $ vlc --help or $ vlc --full-help for a list of command line options.

Here’s an example for German language with German subtitles:

$ vlc \
    -vvv \
    dvdsimple:///dev/dvd \
    --sout '#standard{access=http,mux=ts,vcodec=x264,dst=:8181}' \
    --audio-language German \
    --sub-language German

Hint: You might also have to enable the display of subtitles via “Video → Subtitles Track” in VLC’s application menu.

Playback controls

Using the outlined approach, the client GUI controls to pause the stream, for instance, or to jump to a specific location don’t work. Corresponding commands have to be issued on the server side. There might be a way to change this behavior but I didn’t investigate.

On the server, VLC provides an interactive CLI shell to control playback. Just type a command into the shell and press Enter to execute. Type “help” for a full list of commands. I mostly use pause, get_time and seek.