VLC 学习计划---(1)文档阅读

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

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值