VLC learning plan-(1) Reading documentation

Source: Internet
Author: User

VideoLAN-howto-en-HTML: This document fully describes the solution of VideoLAN "stream. the VideoLAN project includes two software. 1) VLC: used to be the client for receiving video streams, but now it can also work as a server. 2) VLS: Video Server, can send MPEG-1, MPEG-2 and MPEG-4 files, DVDs, digital satellite channels,

VideoLAN-howto-en-html

This document describes the solution of VideoLAN "stream.

The VideoLAN project includes two software.

1) VLC: used to be the client for receiving video streams, but now it can also work as a server.
2) VLS: Video Server, can send 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. Install VLC in RedHat
Download the VLC package and the library required for the package from the following link and put them all in the same directory. http://www.videolan.org/vlc/download-redhat.html

Source code installation: the Library required for source code installation is as follows:
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. The VLC receives streams under the command line.
Receive an unicast stream
% VLC-vvv UDP:

Receive a multicast stream
% VLC-vvv UDP: @ 239.000012.42
Where 239.000012.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 sends a stream under the command line

% 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;
Or the DNS name the machine you want to unicast;
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. Advanced VLC applications (VLC's stream output (transcoding, multiple streaming, Etc ...))

Syntax:
Please refer to the "command line interface" Chapter of the "VLC User Guide" to learn the syntax of VLC's stream output.

Example: ---- encoding example
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.20.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.000012.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.000012.42, SAP, name = "teststream "}}'

-- Examples of Multiple Streams
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.000012.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.20.12.42}, select = "program = 12345 ", DST = standard {access = UDP, MUX = ts, url = 239.000012.43}, select = "video, program = 1234-2345 "}'
This command sends the program of the input stream which ID is 12345 to 239.000012.42 and all video programs with ID between 1234 and 2345 to 239.000012.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.000012.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.00001.2, SAP, name = "originalstream "}, DST = "transcode {vcodec = mp4v, acodec = mpga, VB = 800, AB = 128}: Standard {access = UDP, MUX = ts, url = 239.20.1.3, SAP, name = "transcodedstream "}"}'

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

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.