The following bits assume a server:
- IP address
192.168.0.1
- Broadcasting
rtsp
on port8554
/usr/bin/cvlc /path/to/file/or/playlist \
--sout '#rtp{host=192.168.0.1,port=8554,sdp=rtsp://192.168.0.1:8554/}'
Note: The trailing /
on the sdp
parameter of the sout
cvlc parameter is important when connecting from the client.
/usr/bin/cvlc http://listen.radiotunes.com/public3/classicalperiod.pls \
--sout '#rtp{host=192.168.0.1,port=8554,sdp=rtsp://192.168.0.1:8554/}'
Note: The trailing /
on the sdp
parameter of the sout
cvlc parameter is important when connecting from the client.
/usr/bin/cvlc --no-repeat rtsp://192.168.0.1:8554/ vlc://quit
Note: The trailing slash on the URL is important when connecting!
This is nice for the client to be reconnecting automatically as the broadcast station is going down and coming back up while changing tracks/streams
while true; do
/usr/bin/cvlc --no-repeat rtsp://192.168.0.1:8554/ vlc://quit \
>> /home/pi/vlc.out 2>&1
sleep 5
done;
Note: The trailing slash on the URL is important when connecting!