Table of Contents
Typing multicast addresses is not very fun... that's why you need a channel information service ! VideoLAN has implemented a channel information service based on the SAP/SDP standard. The SAP announces about the multicast programs are sent on the network (via the multicast address 224.2.127.254 reserved for this purpose). On the client side, VLCs receive these annouces and automatically add the programs announced to their playlist.
VLC can send the SAP announces associated with the programs it is streaming. VLS can't do that, but an independant program, the mini-SAP-server, can send the announces for the programs sent by VLS.
To send announces with VLC, you need to use the complex syntax of VLC's stream output, like this:
%
vlc -vvv input_stream --sout '#standard{access=udp,url=239.255.12.42,sap,name="Test Stream"}' --ttl 12
where video1.xyz
is the file you want
to stream, 239.255.12.42 is the multicast IP
address you want to stream on, Test Stream is
the name that will be used for this program in the SAP announces and
12 is the value of the TTL (Time To Live) of the
stream and of the SAP announces.
To do the SAP announces in IPv6, just add the sap_ipv=6 option:
%
vlc -vvv input_stream --sout '#standard{access=udp,url=239.255.12.42,sap,name="Test Stream",sap_ipv=6}' --ttl 12
The mini-SAP-server is only available for Linux and Mac OSX.
Download the latest version of the mini-SAP-server from the streaming download page.
Install-it:
%
tar xvzf miniSAPserver-version.tar.gz
%
cd miniSAPserver-version
%
./configure
%
make
Edit the configuration file sap.cfg
shipped
with the tarball. It should contain a global section with the Time To
Live (TTL) and the IP version (IPv4 or IPv6) used for the SAP announces
and a section per program announced. Use the comments to understand each
parameter.
The Time To Live option indicates the maximum number of routers that the SAP announce packets can cross before being dropped.
If the announces are sent in IPv4 :
%
vlc -vvv --extraintf sap
If the announces are sent in IPv6 :
%
vlc -vvv --extraintf sap --sap-ipv6
Then open the playlist: you should see the names of the programs announced in SAP. When you double-click on the name of a program, VLC will subscribe to the multicast address and start to play the stream !