Application 7 of VLC: Use VLC for unicast, multicast, and On-Demand Server

Source: Internet
Author: User
Two days ago, I thought about whether the VLC can be used as a VOD Server to replace the live555 media server in the previous blog, because live555 media server does not do well. I checked some information and asked about it in the VLC group, and finally solved the problem. Good stuff for everyone to share. Thanks to the help provided by the "Sakura Wood" Kids shoes in the VLC study group.   1. Required Software Vlc-0.9.9 or vlc-0.8.6i, primarily tested for newer version 0.9.9. Putty: a set of Telnet, SSH remote login very good software. : Http://wrc.gro.clinux.org/putty/putty.exe   2. Start VLC through the command line and enable background information display to help you observe background information. Enable cmd, run CD to the VLC directory, and run VLC-VV -- extraintf = Logger
  3. Enable the telnet service for VLC. Vlc-0.9.9 on the Interface select Tools-> interface-> Telnet ConsoleThe background DOS window will respond and display [2, 00000403] Main Interface Debug: Looking for interface module: 1 candidate [2, 00000403] Main Interface Debug: Creating vlm [00000405] Main vlm daemon debug: thread 5112 (vlm thread) created at priority 0 Http://www.cnblogs.com/src/input/vlm.c:112) [2, 00000405] Main vlm daemon debug: thread started [00000403] telnet interface: using the vlm interface plugin...[00000403] Main Interface Debug: Net: Listening to 127.0.0.1 port 4212[0, 00000403] telnet interface: Telnet interface started on interface 127.0.0.1 4212[0, 00000403] Main Interface Debug: Using interface module "Telnet"[00000403] Main Interface Debug: timer module_need (): 19.000 MS-total 19.000MS/1 intvls (avg 19.000 MS)[00000403] Main Interface Debug: thread 5136 (Interface) created at priority 0 (Http://www.cnblogs.com/src/interface/interface.c:168)[2, 00000403] Main Interface Debug: thread started
Observe main interface Debug:Net: Listening to 127.0.0.1 port 4212In this statement, the current Telnet listener for VLC is 127.0.0.1 and 4212. If the IP address is not displayed, it is normal to use 127.0.0.1. 127.0.0.1 indicates the local host, which has the same meaning as localhost.   4. Start putty.exe Host Name (or IP address) input: 127.0.0.1Port 4212Connection Type: Select TelnetClick to open.If the word "Password:" is not displayed, click it to open it and close it. It means there is no Telnet. (At this time, you can enter Telnet 127.0.0.1 4212 in cmd. The result is that it is being connected to 127.0.0.1... the connection to the host cannot be opened. In Port 4212, the connection fails, or the connection to the host is lost. The main reason for the telnet connection without CMD is that it is invisible when a command is entered .) At this time,Disable the firewall, anti-virus software, and all related software.But don't look for me if you are poisoned. (* ^__ ^ *) Xi ...... Continue.If the above problem does not occur, enter "admin" after password:, and there is no plaintext echo. After successful logon, the following message is displayed:Welcome, Master.   5. Set up VOD service Enter: New vod1 VOD Enabled Setup vod1 input D:/01.aviExplanation: A vod named vod1 is added, and the input of vod1 is set to D:/01.avi.
Verification: Enable another VLC and enable rtsp: // 127.0.0.1/vod1. You can play the video. You can replace 127.0.0.1 with your own IP address.   6. Set up multicast servers Continue input: New broadcast Enabled Setup inputs input D:/02.avi [loop]Setup export output # duplicate {DST = RTP {DST = 226.0.0.6, MUX = ts, Port = 1234 }}Control Role Play
Explanation: A new broadcast is called broadcast. Set input to D:/02.avifor loop, which indicates loop playback. Set the output of the multicast protocol to # duplicate {DST = RTP {DST = 226.0.0.6, MUX = ts, Port = 1234}, indicating that the TS stream of the RTP protocol is sent to the multicast address 226.0.0.6, port 1234. Control seek playback.Expansion:1) output can be followed by the sout parameter. For details, refer to the generated stream output string on the VLC-> media-> stream output interface.2) The percentage of stop, pause, and seek can be added to the control queue. Indicates the stop, pause, and jump to the position of a few percent. Verification: Enable a VLC and RTP: // 226.0.0.6: 1234. You can play the video.   7. Set up a unicast Server In step 1, replace the output with the unicast address. Others are the same. Do not duplicate the new name.   8. Save the operation. Continue Input Save D:/01.cfg
Save the operation to D:/01. cfg, except control. You can view the content in the text editor, such as Notepad. If VLC is enabled again, enterLoad D:/01.cfg
Read the saved operation in to continue the operation or control. With this configuration, a VLC instance can provide multiple services, including unicast, multicast, and VOD. Really powerful. In this way, the streaming media server of the previous blog can be replaced with VLC. It is not technically difficult to work with the previous log as a simple streaming media service website or a client similar to PPLIVE.   Reference: http://www.videolan.org/doc/streaming-howto/en/ch05.html

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.