Technical Principles and Playback modes of streaming media

Source: Internet
Author: User
Technical Principles and Playback modes of streaming media

Stream Transmission needs to be cached. Because the Internet implements intermittent asynchronous transmission based on packet transmission, a real-time A/V source or stored A/V file is divided into many packages during transmission, because the network is dynamically changing, the routes selected by each packet may be different, so the delay in arriving at the client may not be the same, or even the first packet may arrive later.

I. Technical Principles of streaming media

Stream Transmission needs to be cached. Because the Internet implements intermittent asynchronous transmission based on packet transmission, a real-time A/V source or stored A/V file is divided into many packages during transmission, because the network is dynamically changing, the routes selected by each packet may be different, so the delay in arriving at the client may not be the same, or even the first packet may arrive later. Therefore, the cache system is used to compensate for the impact of latency and jitter, and ensure that the data packets are in the correct order, so that the media data can be continuously output without pausing the video due to temporary network congestion. High-speed cache usually requires a small amount of capacity, because the high-speed cache uses a circular linked list structure to store data: By discarding the played content, the stream can reuse the empty cache space to cache the content that has not been played in the future.

Suitable transmission protocols are required for stream transmission. Because TCP requires a lot of overhead, it is not suitable for transmitting real-time data. In the implementation scheme of stream transmission, HTTP/TCP is generally used to transmit control information, while RTP/UDP is used to transmit real-time sound data.

The process of stream transmission is generally as follows: After you select a first-class media service, the web browser and the Web server exchange control information through HTTP/TCP, in order to retrieve the real-time data to be transmitted from the original information. Then, the Web browser on the client starts the/vhelper program and uses http to retrieve relevant parameters from the Web server to initialize the Helper Program. These parameters may include the directory information, the encoding type of A/V data, or the server address related to A/V retrieval.

The A/vhelper program and A/V server run the real-time traffic control protocol (RTSP) to exchange the control information required for A/V transmission. Similar to functions provided by CD players or VCRs, RTSP provides methods to manipulate commands such as playback, fast forward, fast backward, pause, and recording. A/V server uses the RTP/UDP protocol to transmit a/V Data to A/vcustomer Program (generally, it can be considered that the customer program is equivalent to the Helper Program ), once A/V data arrives at the client, the/vclient program can play the output.

It should be noted that, in stream transmission, two different communication protocols, RTP/udp and RTSP/tcp, are used to establish contact with A/V server, this is to redirect the server output to a destination address different from the client where the/vhelper program is running. Generally, dedicated servers and players are required for stream transmission. The basic principle is as follows.

Ii. Streaming Media Playback Mode

1. unicast

A separate data channel must be established between the client and the Media Server. Each packet sent from a server can only be sent to one client. This transmission method is called unicast. Each user must send a separate query to the Media Server, and the Media Server must send the requested data packet copy to each user. This huge redundancy first causes a heavy load on the server, and the response takes a long time or even stops playing the video. Managers are also forced to purchase hardware and bandwidth to ensure certain service quality.

2. Multicast

The IP multicast technology builds a network with multicast capabilities, allowing the router to copy data packets to multiple channels at a time. Using multicast, a single server can send continuous data streams to hundreds of thousands of clients without delay. The Media Server only needs to send one information package, rather than multiple. All clients sending requests share the same information package. Information can be sent to clients of any address to reduce the total amount of information packets transmitted over the network. The network utilization efficiency is greatly improved, and the cost is greatly reduced.

3. On-Demand and broadcast

Vod is an active connection between the client and the server. In the VOD connection, you can select a content item to initialize the client connection. You can start, stop, back, fast forward, or pause a stream. The VOD Connection provides the maximum convection control, but this method quickly uses up network bandwidth because each client connects to the server.

Broadcast refers to the passive receiving of streams by users. In the broadcast process, the client receives streams, but the control flow is not allowed. For example, you cannot pause, fast forward, or backward the stream. A separate copy of data packets in broadcast mode will be sent to all users on the network. When sending unicast data packets, You need to copy multiple copies of the data packets and send them to the users who need them in multiple point-to-point ways. Instead, the data packets are sent in broadcast mode, A separate copy of the data packet will be sent to all users on the network, regardless of whether the user needs it or not, the above two transmission modes will waste network bandwidth. Multicast absorbs the strengths of the above two sending methods, overcomes the weaknesses of the above two sending methods, and separately copies the data packets to the customers who need them. Multicast does not copy multiple copies of data packets to the network, nor send data packets to customers who do not need them. This ensures that multimedia applications on the network occupy the minimum bandwidth of the network.

Related Article

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.