VLC 學習計劃---文檔閱讀

一 videolan-howto-en-html

該文檔完全描述了VideoLAN "流"的解決方法.

VideoLAN 項目包括兩個軟件.

1) VLC:以前是視頻流接收的客戶端,但是現在也可以作爲服務端工作.
 2) VLS:視頻服務端,能發送 MPEG-1, MPEG-2 and MPEG-4 files, DVDs, digital satellite channels, digital terrestial television channels and live videos on the network in unicast or multicast.

1.VLC 在REDHAT 下的安裝
從下面的鏈接中下載 vlc的包和包所需要的庫,把他們都放在同一個目錄. http://www.videolan.org/vlc/download-redhat.html

源代碼安裝: 源代碼安裝需要的庫如下:
libdvbpsi (compulsory) ,
mpeg2dec (compulsory) ,
libdvdcss if you want to be able to read encrypted DVDs ,
libdvdplay if you want to have DVD menu navigation ,
a52dec if you want to be able to decode the AC3 (i.e. A52) sound format often used in DVDs ,
ffmpeg, libmad, faad2 if you want to read MPEG 4 / DivX files ,
libogg & libvorbis if you want to read Ogg Vorbis files .

2.VLC在命令行下接收流
Receive an unicast stream
% vlc -vvv udp:

Receive a multicast stream
% vlc -vvv udp:@239.255.12.42
where 239.255.12.42 is the multicast IP address you want to join.

Receive an HTTP/FTP/MMS stream Use one of the following command lines:
% vlc -vvv http://example/stream.xyz
where http://example/stream.xyz is the HTTP address of the stream;

% vlc -vvv ftp://example/stream.xyz
where ftp://example/stream.xyz is the FTP address of the stream;

% vlc -vvv ms://viptvr.yacast.fr/encoderfranceinfo
 where mms://viptvr.yacast.fr/encoderfranceinfo is the MMS address of the stream.

Receive a RTP stream available through RTSP
 % vlc -vvv rtsp://www.hardradio.com/tonbeme.mov
where rtsp://www.hardradio.com/tonbeme.mov is the address of the stream.

Receive a stream described by an SDP file
% vlc -vvv http://server.example.org/stream.sdp

3.VLC在命令行下發送流

% vlc -vvv video1.xyz --sout udp:192.168.0.42 --ttl 12
   where: *video1.xyz is the file you want to stream,
*192.168.0.42 is either: 
      the IP address of the machine you want to unicast to;
     or the DNS name the machine you want to unicast to; 
    or a multicast IP address.
*12 is the value of the TTL (Time To Live) of your IP packets (which means that the stream will be able to cross 11 routers). If you want to stream the file continuously, add the --loop option.

4.VLC 高級應用(VLC's stream output (transcoding, multiple streaming, etc...))

語法:
  Please refer to the" command line interface" chapter of the "VLC user guide "to learn the syntax of VLC's stream output.

例子: ----編碼方面的例子
Transcode
the input stream and send it to a multicast IP address with the associated SAP announce:
 % vlc -vvv input_stream --sout '#transcode{vcodec=mp4v,acodec=mpga,vb=800,ab=128,deinterlace}: standard{access=udp,mux=ts,url=239.255.12.42,sap,name="TestStream"}'

Display the input stream, transcode it and send it to a multicast IP address with the associated SAP announce:
% vlc -vvv input_stream --sout '#duplicate{dst=display,dst= "transcode{vcodec=mp4v,acodec=mpga,vb=800,ab=128,deinterlace}: standard{access=udp,mux=ts,url=239.255.12.42,sap,name="TestStream"}"}'

Transcode the input stream, display the transcoded stream and send it to a multicast IP address with the associated SAP announce:
% vlc -vvv input_stream --sout '#transcode{vcodec=mp4v,acodec=mpga,vb=800,ab=128,deinterlace}: duplicate{dst=display,dst=standard{access=udp,mux=ts,url=239.255.12.42,sap,name="TestStream"}}'

--多種流的例子
Send a stream to a multicast IP address and a unicast IP address:
 % vlc -vvv input_stream --sout '#duplicate{dst= standard{access=udp,mux=ts,url=239.255.12.42,sap,name="TestStream"}, dst=standard{access=udp,mux=ts,url=192.168.1.2}}'
 
Display the stream and send it to two unicast IP addresses:
% vlc -vvv input_stream --sout '#duplicate{dst=display,dst= standard{access=udp,mux=ts,url=192.168.1.12}, dst=standard{access=udp,mux=ts,url=192.168.1.42}}'

Send parts of a multiple program input stream:
% vlc -vvv multiple_program_input_stream --sout '#duplicate{dst=standard{access=udp,mux=ts,url=239.255.12.42},select="program=12345", dst=standard{access=udp,mux=ts,url=239.255.12.43}, select="video,program=1234-2345"}'
This command sends the program of the input stream which id is 12345 to 239.255.12.42 and all video programs with id between 1234 and 2345 to 239.255.12.43. Transcoding and multiple streaming Transcode the input stream,

display the transcoded stream and send it to a multicast IP address with the associated SAP announce and an unicast IP address:
% vlc -vvv input_stream --sout '#transcode{vcodec=mp4v,acodec=mpga,vb=800,ab=128,deinterlace}: duplicate{dst=display,dst=standard{access=udp,mux=ts,url=239.255.12.42,sap,name="TestStream"}, dst=standard{access=udp,mux=ts,url=192.168.1.2}}'

Display the input stream, transcode it and send it to two unicast IP addresses:
 % vlc -vvv input_stream --sout '#duplicate{dst=display, dst="transcode{vcodec=mp4v,acodec=mpga,vb=800,ab=128}: duplicate{dst=standard{access=udp,mux=ts,url=192.168.1.2}, dst=standard{access=udp,mux=ts,url=192.168.1.12}"}'

Send the input stream to a multicast IP address and the transcoded stream to another multicast IP address with the associated SAP announces:
 % vlc -vvv input_stream --sout '#duplicate{dst= standard{access=udp,mux=ts,url=239.255.1.2,sap,name="OriginalStream"}, dst="transcode{vcodec=mp4v,acodec=mpga,vb=800,ab=128}: standard{access=udp,mux=ts,url=239.255.1.3,sap,name="TranscodedStream"}"}'
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章