Linux – How to make VLC server that can communicate with clients

linuxstreamingvideovideo streamingvlc-media-player

I have VLC 2.0.8 in and I have recently discovered that I can stream movies by using it.

So my plan is:
– at home I have a computer with a list of 3 movies (for example).
– when I am traveling, I connect to VLC via HTTP and use the Video Over Demand Feature (VoD, http://www.videolan.org/doc/streaming-howto/en/ch05.html) to see a movie in my laptop.

However, I have no idea on how to actually do this. I have read the documentation, and this is what I understood:
– I have to enable VLC to be streamed via HTTP and configure it to be a VLC server (on my desktop back at Home). I also have to leave VLC and the computer open and running xD
– I can only communicate with the client via UDP

I have read the documentation to make VLC a streaming server, but I have failed miserably. I am not even going to talk about the client.
I am using Linux Mint, but I assume this is OS independent.

How to I configure VLC to do this? Can any of you guys land a hand to a newbie like me? :S

Best Answer

First of all, there are other products out there that make this very easy. I would suggest checking out Plex before going down this route, but if you want to do it with VLC, here is how I would do it:

  1. Setup the VLM Configuration

    1. Run the VLC GUI
    2. Select Tools -> VLM Configuration tool
    3. Use this tool to setup the videos you want to stream. For each video
    4. Select "Video On Demand" from the first dropdown
    5. Select a name for the media (don't use spaces)
    6. Select the video file as the input
    7. Leave the output and muxer blank.
    8. Select "Add"
    9. Repeat 4-8 for each of your media files.
    10. Export the configuration.
  2. Setup VLC VOD

    1. Start VLC using the command line: vlc -vvv --color -I telnet --telnet-password <your_password> --rtsp-host 0.0.0.0 --rtsp-port 5554
    2. Connect to the telnet server on port 4212 using the password in the above command line
    3. Once connected, load the configuration file you exported above. Type the command load <path_to>/<configuration_file>.vlm
  3. Test the Client

    1. Open an instance of the VLC GUI.
    2. Open a network stream and point it to rtsp://localhost:5554/<name_of_media> where <name_of_media> is the name of one of the streams you configured in the VLM Configuration GUI.

That should get you started. You may still need to setup some port forwarding rules from your router to your computer and maybe dynamic DNS to make accessing your computer easy, but that is VLC related configuration you need.

Note: On Windows the telnet interface is broken in VLC 2.1.x

Related Question