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

SAP server announcing VLC streams


In previous guide about VLC I showed how to stream files to LAN. It is quite a hard task to inform everybody about new streams or changes of existing. This is the reason of existing SAP (session announce protocol) informing about unicast, multicast and broadcast streams in network. At first you have to install it by issuing:
apt-get install minisapserver
After succesful installation edit it`s configuration file.
nano /etc/sap.cfg
Edit it to something like mine. Each line is sefl-explanationary.
# Global miniSAPserver options
[global]

# Number of seconds between announces. 5 is default. Internet announces better use 30.
sap_delay=5

# The network interface on which to stream.
interface=eth0

[program]
name=Iron Maiden - The Number of the Beast
user=videolan
machine=192.168.1.1
site=-
address=239.255.1.1
port=1234

In bold black is defined stream from previous guide how to stream with VLC, by command:
sudo -u vlc cvlc "IronMaiden-TheNumberOfTheBeast.ogg" --sout udp://239.255.1.1:1234 --loop
When you add all your streams close configuration file (CTRL+X...) and save changes (...press "y" and Enter) and restart minisap server with this command:
/etc/init.d/minisapserver restart
Now announces are send to all devices using multicast address 224.2.127.254.
Powered by Create your own unique website with customizable templates.