Raspberry Pi blog
  • Home
  • Raspbian
    • Installation
    • Adjustments
  • Guides
    • DNS resolver
    • VNC server
    • Plotting graphs
    • Streaming with VLC
    • VOD with VLC
    • Stream announcements
    • Samba shares
    • NTP client and server
    • DynDNS client
    • No-IP client
    • Bluetooth
    • Internet via GPRS/EDGE/3G/HSPA
    • OpenSSH server
    • XMPP/Jabber server
    • CryptoCat messaging service
    • Converse.js XMPP/Jabber client
  • GPIO
    • Setup GPIO
    • LEDs and buttons
    • Thermal sensor (1Wire)
    • Thermal sensor (I2C)
    • UART to RS-232
  • Case
  • Arduino
  • Contact
  • Sitemap

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.
nano vlc_vod_config
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.
rtsp://192.168.1.1:554/music
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.
Powered by Create your own unique website with customizable templates.