VLC 學習計劃—(1)文檔閱讀

來源:互聯網
上載者:User

videolan-howto-en-html:該文檔完全描述了VideoLAN "流"的解決方案. VideoLAN 項目包括兩個軟體. 1) VLC:以前是視頻流接收的用戶端,但是現在也可以作為服務端工作. 2) VLS:視頻服務端,能發送 MPEG-1, MPEG-2 and MPEG-4 files, DVDs, digital satellite channels,

一 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"}"}'

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.