Video-On-Demand with VLC
Like I stated in previous post, VLC can be used for streaming multimedia files to network hosts. If you do not have VLC already installed, check my guide in previous post here. VLC can use many protocols to stream media to your network. But most of them doesn`t allow you to interact with VLC server itself (pause, skip to next track...). Only protocol that allows this is RTSP. This protocol doesn`t ensure data transmission, only control data. It uses TCP, streamed data uses UDP. When you have VLC installed, create new text file where files to be streamed will be defined.
And paste something like this:
new music vod enabled
setup music input "file:///IronMaiden-TheNumberOfTheBeast.mp3"
setup music input "file:///IronMaiden-FearOfTheDark.mp3"
"music" is name of stream, file statement is quite self-explanationary :) Close file (CTRL+X...) and save changes (...press "y" and Enter). Now start VLC with this command:
sudo -u vlc cvlc --sout-keep --vlm-conf vlc_vod_config
Start any player supporting RTSP on your client machine and connect to this address.
Do not forget to change address to your VLC VOD server. And enjoy pausing, skipping, stopping your stream. You can stream video and audio files the same way, only replace file statement in previous configuration file. If you have weak memory like I do, setup mini-SAP-server which will announce streams directly to VLC playlist. Simple step-by-step guide here.