【server】
VLC多通道RTSP协议流化:
time0 ----> time1:channel0流化video1(port:8554)
time1 ----> time2:channel1流化ad1(port:8552),channel2流化ad2(port:8556)
time2 ----> time3:channel0流化video2(port:8554)
https://wiki.videolan.org/Documentation:WebPlugin#Input_object
https://wiki.videolan.org/Documentation:Streaming_HowTo/
https://wiki.videolan.org/Documentation:Streaming_HowTo_New/
https://wiki.videolan.org/Documentation:Streaming_HowTo/Command_Line_Examples/
https://wiki.videolan.org/Documentation:Streaming_HowTo/Advanced_Streaming_Using_the_Command_Line/
https://wiki.videolan.org/VLC_command-line_help/
https://wiki.videolan.org/Command_line/
https://wiki.videolan.org/Console/
https://wiki.videolan.org/Interface/
http://www.videolan.org/doc/streaming-howto/en/ch05.html
Chapter 5. VLM - Multiple streaming and Video on demand
new channel1 broadcast enabled setup channel1 input http://host.mydomain/movie.mpeg setup channel1 output #rtp{mux=ts,dst=239.255.1.1,port=5004,sdp=sap://,name="Channel 1"} new channel2 broadcast enabled setup channel2 input rtp://@239.255.12.42:1234 setup channel2 output #rtp{mux=ts,dst=239.255.1.2,port=5004,sdp=sap://,name="Channel 2"} control channel1 play control channel2 play
new my_media broadcast enabled setup my_media input my_video.mpeg input my_other_movie.mpeg setup my_media output #rtp{mux=ts,dst=239.255.1.1,port=5004,sdp=sap://,name="My Media"} new my_sched schedule enabled setup my_sched date 2012/12/12-12:12:12 setup my_sched append control my_media play
https://wiki.videolan.org/Documentation:Streaming_HowTo/Advanced_streaming_with_samples,_multiple_files_streaming,_using_multicast_in_streaming/
When you start this, you can't stops. I spent some hours to find this solution. See it:
% vlc -vvv --color -I telnet --telnet-password "i_dont_know_this_password" --vlm-conf=/home/vlc/vlc.streaming.conf
We told that VLC must colorize it's output using key --color. Then we told VLC to open telnet server. We must control it, really?! This is -I telnet key. And we set the password "i_dont_know_this_password" to get access to console. We use standart VLC telnet port 4212. If you need to change it, use --telnet-port xxx. Use --vlm-conf=/home/vlc/vlc.streaming.conf to point the VLC to open at start a special file with multiple files description.
Using this config file we try to cast 2 video files: 2007.avi and Jumper.avi. To do this, we must describe 2 channels: channel1 and channel2, sets the input and sets the output format (we try to multicast this):
new channel1 broadcast enabled setup channel1 input file:////home/vlc/2007.avi loop setup channel1 output #rtp{access=udp,mux=ts,dst=224.255.1.1,port=1234,sdp=sap,sap,group="Video",name="2007 Movie"}
new channel2 broadcast enabled setup channel2 input file:////home/vlc/Jumper.avi loop setup channel2 output #rtp{access=udp,mux=ts,dst=224.255.1.2,port=1234,sdp=sap,sap,group="Video",name="Jumper Movie"}
control channel1 play control channel2 play