On the development technology of streaming media website

Source: Internet
Author: User

On the development technology of streaming media website (2012-02)
2012-03-02 News Source: Wuhan wide power grid

Zhangfangdong

(Huangbei District Broadcasting and Television Bureau Business Technology Division)

Absrtact: With the high-speed development of wired and wireless broadband, people are no longer satisfied with the only text, pictures and other simple information in the Internet, and more and more want to see more intuitive, richer film and television programs, streaming media site thus emerged. This paper expounds the development of streaming media website from the aspects of streaming media concept, streaming media format, streaming media file making, streaming media file transmission, streaming media file publishing and streaming media website deployment.

Keywords: Streaming media site development deployment Technology

1. Overview

The transmission of multimedia on the network is downloaded and streamed in two ways. If the file transfer as a process, then the download transfer mode will wait until the file transfer is completed before it can be used, the wait time is affected by the speed of transmission and the size of the receiving end of the capacity, streaming is the edge of the transmission side of the use. Streaming media technology so that network users do not have to wait for a long time to download, you can achieve on the network to listen to TV programs, this model and the traditional radio, television broadcast very similar, but also means that the network media impact on the traditional media. The development of streaming media Web site is based on streaming media technology, the stream media files and Web files organically combined, through the Web page to play streaming media files.

2, the concept of streaming media technology

Streaming media technology (streaming) is a transmission technology that transmits audio and video information at a given rate, between the sending and receiving ends, with a network-independent load. Streaming media has the characteristics of implicit time dimension, real-time transmission and high throughput. Streaming media technology is a technology that uses streaming continuous-base media. Streaming mode is the video, audio and other media compressed into a compressed package, by the stream server to the user in real-time transmission, the client only need to cache enough to play the video grouping can start playback.

3. Commonly used streaming media file format

The streaming media file format applied on the network is very different from the multimedia files used in the computer application, such as the MPEG-1 of the VCD standard can be compressed for the SIF standard resolution (for the NTSC system as 352x240, the PAL system is 352x288), and the transfer rate is 1.5Mbps. But such a rate is difficult for network users to achieve. So the current popular streaming media technology is aimed at the Internet bandwidth and transmission quality is low and invented technology, mainly to the multimedia file format "two times" after processing, published to the Internet. It includes the acquisition, encoding, transmission, storage and decoding of a number of technologies. Streaming media application system is generally divided into coded side, server side and client 3 parts. And the development of Internet technology is different, so far, the development of streaming media system is still in the factory standard stage. As shown in table 1 below, the main streaming media file formats and related information are currently used.

Products

File name extension

Encoder device

Server

Client

Real System

RM RA RP RT

Helix Producer

Helix Server

Realplayer

Ms Windows Media

ASF wmv WMA

WindowsMedia Encoder

WindowsMedia Server

WindowsMedia player

Apple QuickTime

Mov QT

Quicktimebroadcaster

Quicktime

Quicktime player

Streaming server

Table 1 main streaming media file formats and related information

4. Streaming Media transmission Technology

In a stored audio and video streaming application, the client requests compressed audio and video files that reside on the server, either as a typical Web server or as a streaming media server dedicated to serving audio and video streams. The server sends audio and video files to a socket that is connected to the client. Both TCP and UDP sockets can implement this functionality. Before sending the file to the network, the files are segmented and the segments are encapsulated with a special header to fit the file transfer. Real-Time Protocol (RTP) is the common domain standard that encapsulates the above segment. Once the client starts receiving the requested audio and video files, it will start playing in a few seconds. Its interactive function is completed by pausing, continuing, playing time jumping and so on.

Users make audio and video streaming requests through a Web browser, but because their playback is not integrated into the client, this requires a secondary application to play the file-media player such as real network Real Player and Microsoft Windows Media Player. Media Player has the following functions:

(1) decompression, in order to save storage space and network bandwidth, audio and video is usually compressed. The media player must be decompressed during playback.

(2) Eliminate Jitter grouping. Jitter is the difference in the data flow between grouping the delay from source to destination. Since audio and video must be played synchronously, the receiver must do a short-term cache of the received packets to eliminate jitter.

(3) Error correction. A segment of the packet data stream may be lost due to unpredictable internet congestion. If this fragment is very large, users will not be able to accept the quality of the audio and video. Many streaming systems try to recover the lost data. They either reconstruct the lost groupings through the transfer of redundant packets, or directly request that these groupings be re-sent, or infer and insert the missing data from the received data.

(4) User interface with control unit. This is a user-actionable section, including volume control, pause/Resume buttons, time-hopping sliders, and more.

4.1 Accessing the audio and video files of the Web server

Audio and video files are stored on the Web server via HTTP to the client, or stored on a streaming server via non-HTTP to the client. Its structure is shown in 1.

  

  

Figure 1 Simple audio and video streaming architecture

This system operates as follows:

(1) The Web browser establishes a TCP connection to the Web server and sends an HTTP request message requesting audio and video files.

(2) The Web server sends HTTP response messages with audio and video files to the browser.

(3) The content type of the HTTP response message the header line declares the specified audio and video encoding. The client browser parses the content type of the response message, invokes the relevant media player, and passes the file to the media Player.

(4) The media Player starts to play the file.

The problem with this media playback is that media players must be mediated by the Web browser to interact with the server. This requires that the entire file must be fully downloaded before it can be passed to the media player for playback. For larger files, the delay before playback is difficult to accept. For this reason, this application must take a direct server-to-media player approach, which is to establish a direct socket connection between the server and the media player process. As shown in 2.

  

  

Figure 2 the audio and video streaming architecture of the meta-file application

A metafile is a file that provides data streaming audio and video file information (such as URLs, encoding types). The Web server sends audio/video directly to the media player, and the process of establishing a direct TCP connection is as follows:

(1) The user clicks the audio/video files hyperlink.

(2) This link is not directed to an audio/video file, but to a metafile. This meta file includes the URL of the actual audio/video file. The response message encapsulates this metafile, including the content type header line, declaring the specified audio/video file.

(3) The client browser parses the content type header line of the response message, invokes the relevant media player, and transmits the entire report style of the response message to the media player.

(4) The Media Player establishes a TCP connection directly to the HTTP server. The media Player sends an HTTP message to the TCP connection requesting an audio/video file.

(5) The file is sent to the media player via an HTTP response message, and the media player starts streaming.

It is important to get the meta-file as an intermediate step. When the browser knows the content type of the file, it can invoke the appropriate media player, and the media Player communicates directly with the server.

The media players of both architectures pass HTTP, and therefore communicate with the server through TCP. HTTP does not fully implement user-to-server interaction, especially when users (via media servers) are not easily allowed to send pause, continue, fast forward commands to the server.

4.2 Sending multimedia to media Player from streaming server

To avoid HTTP and TCP, you can use streaming servers to transfer audio and video to media players. Streaming servers are typically factory-standard streaming servers, such as Helix Server and Windows Media server. With streaming servers, you can send audio and video over UDP using the Application layer protocol, which is more suitable for audio and video streaming than HTTP. As shown in 3.

  

  

Figure 3 Video streaming architecture with Media server interacting directly with the player

This architecture requires two servers, one server is an HTTP server, manages Web pages (including meta-files), and the second is a streaming server that manages audio and video files. Two servers can be run on one end of the system or in two separate end systems. The work steps are similar to the previous one. But here the media Player is requesting data from the streaming server instead of the Web server, and the media player and the streaming server can interact with their own protocols. These protocols enable users to easily interact with audio streams and video streams.

5, streaming media information on the site release

The basic steps for streaming media file information are as follows:

(1) The production of source files, usually using the camera to record audio and video programs.

(2) The content is transferred to the computer, which realizes the digital format record of the image.

(3) Using video editing software to edit the content of the image, plus subtitles or background music.

(4) The conversion of video files. In order to meet the different needs of users, the edited video files need to be converted into different digital formats, which can be changed into different streaming media files. such as converting MPEG format to RM format.

(5) Configure the necessary client and server software to facilitate the publication of video materials. Different streaming media files need to be configured for playback by different clients.

Real system applications are more prevalent in many current Web applications. RM file is the core of real streaming media, Helix producer is the key software in real streaming media production process, using Helix producer generated streaming media files are placed in the content directory of Helix server, can realize on-demand function. If it is encoded, it is sent to Helix Server immediately, which can realize the broadcast function. In addition, Helix Producer can convert multimedia files in other formats to real streaming files.

Production of 5.1 rm file

Helix Producer PLUS9 can convert multimedia files from other formats into real streaming, convert live audio and video to real streaming, and instantly send to the Helix server for live streaming while encoding.

Ø "audio mode" includes "Music", "Voice", "no audio" three modes, mainly used to set the effect of audio. For mixed audio or high-number audio, the "music" mode works better.

Ø "video mode" includes "Standard motion video", "high-profile image", "Smooth Motion", "Slide Show" and "no video 5 modes". When the video contains a lot of motion picture, you should choose "Standard motion video" mode, if you want to have high definition, you can choose "higher-profile image", if you want to smooth the picture transition, you can choose "Smooth Motion" mode, for still image production of switching effect, only need to maintain high definition, you can choose " Slide Show "mode.

Ø "Video encoder" includes RealVideo G2 with SVT, RealVideo8 and RealVideo9 3 encoders. At any bit rate, the REALVIDEO9 encoding can achieve the best video effect.

Ø the Surestream feature in the Listener Selection column delivers the same audio and video content at a number of different rates, integrated into a streaming file that automatically sends the corresponding content based on the network speed of the target audience.

5.2 Link Real streaming in a Web page

Links from web pages to real streaming media are usually not directly connected to the RM file, but are implemented via RAM files, and real streaming is embedded in the Web page via rpm files.

When a user clicks a link to a streaming media file located on a Real server, many browsers do not start RealPlayer as an auxiliary player because of their original settings, and the Real system provides an intermediate file (RAM file) Help the user-side system to start RealPlayer.

The Ram file is a plain text file with a file extension of. ram. In the Ram file, the URL address of the streaming media file that you want to play is listed. When the user's browser loads the Ram file, the RealPlayer is started as the secondary player, and the RealPlayer automatically follows the URL address in the Ram file to play the media file.

When you write a Web page, the Ram file activates the RealPlayer player to play the real streaming media by means of a standard link to a helix server or to a file on the Web server. Such as:

ram.htm file is

<title> Link Ram files </title>

<body>

<a href= "Test.ram" > Link Ram file </a>

</body>

The contents of the Test.ram file are as follows:

Http://127.0.0.1/realvideo.rm

Run the ram.htm file in the browser, click the HYPERLINK "link Ram file", appear RealPlayer, play the Realvideo.rm file in the local Apache. If the computer is already connected to the Internet, replace 127.0.0.1 with the URL of the online test host. If you are connecting to Helix Server, you must change HTTP to RTSP.

5.3 Embed real streaming in web pages

By embedding the RealPlayer playback window in a Web page, users can view the streaming media files that are played in the browser, helping to keep the user's Windows interface standard and tidy.

Embedded stream Media in Web pages is usually linked to the rpm file using the <embed> tag, and the rpm file is exactly the same as the Ram file. By setting the controls parameter of the <embed> tag, you can control the streaming media playback by adding the control to the Web page. In this way, the Video playback window and Control Panel are included on the Web page. Such as:

Web page File rpm.htm

<title> Link rpm Files </title>

<body>

<!--play Window code--

<center>

<embed src= "test.rpm" width=320 height=240 controls=imagewindow console=one autostart=true>

<br>

<!-Control Panel code--

<br>

<embed src= "test.rpm" width=320 height=100 controls=all console=one>

</center>

</body>

And the test.rpm file is:

Http://127.0.0.1/realvideo.rm

Using the browser to run the rpm.htm file, the RealPlayer player will be embedded in the browser page.

6, the deployment of streaming media sites

Each manufacturer's streaming media system has its own characteristics, but the main components are 4 parts: Media Encoder, media file memory, media server, media Player. These 4 parts work together to form a streaming media services system, system architecture and a partial relationship 4 is shown

  

  

Figure 4 Streaming Media system architecture

Ø Media Encoder. Make the original media files or the real-time media data collected by the camera into a file format (stream format) suitable for network transmission, and then store the stream files in the media file storage or directly to the streaming media server.

Ø media file memory. A media file that stores streaming formats, typically using a SCSI hard disk or disk array.

Ø Media server. In response to a user request from the Web server that the dispatch server has forwarded, the stream format file is uploaded to the user's desktop over the network transport protocol.

Ø Media Player. Receives the network media data and plays it locally.

For load balancing and support for more users, the media server is generally built into the LAN cluster and the image processing of the NBP, through a Management server based on the server load status decision to send user requests to the current load the lightest server, Management Server is also responsible for streaming media file management, digital rights management. The portal site for streaming media services is generally still a Web server.

7, streaming media transmission quality control

Transmission quality control is the most important factor restricting the performance of streaming media service, and it is also the primary concern of streaming media operators. That is, under the existing network bandwidth condition, how the system supports as many concurrent numbers as possible, how to guarantee the end-to-end streaming media QoS.

In order to support as many concurrent users as possible, and to avoid the increase of server load due to the large number of concurrent numbers, the QoS reduction requires the system to manage and limit the network traffic and concurrency. This is shown in table 2 below.

Index

Description

Maximum number of concurrent

Number of simultaneous users connecting to the server

Single-stream maximum rate

Maximum allowed rate for single user connection server

Maximum network bandwidth

The maximum rate that a streaming media server can provide, typically no more than 85% of the network card rate

Table 2 bandwidth metrics for streaming media server transmissions

The relationship of the above 3 indicators should satisfy: Maximum network bandwidth/maximum concurrent number ≤ single stream maximum rate. Different manufacturers of streaming media products on the above indicators to determine the method is different. Some are set directly on the server side, some are set by the license mechanism, but the actual value is still related to server performance.

Streaming media service is a kind of broadband service, which has higher requirements for network bandwidth, jitter, delay and packet loss rate. In order to provide better QoS, several mature bandwidth adaptation and quality control techniques have been developed in the current streaming media field.

Ø Intelligent Flow Technology. The system can automatically detect the network condition and adjust the properties of the audio and video stream to the best, so that the user receives the media stream corresponding to its connection speed, thus obtaining the best user experience. Its essence is to detect the network bandwidth change by using the rate feedback mechanism of C/S model application layer, utilize the multi-rate level coding ability of media stream, dynamically adjust the transmission rate of media stream on the server side, in order to ensure the user can still receive better quality media stream under the condition of network bandwidth change.

Ø shunt Technology (splitting). Generally applied to live webcast. The sending server sends the live media stream to multiple receiving servers distributed around the world via UDP unicast, multicast, etc., and the client can access the server to obtain higher quality media stream and reduce the bandwidth usage. The shunt technology has two modes of push and pull.

Ø Content Distribution Network technology (CDN). As a content overlay network on the base IP network, by introducing the technologies of active content management, global load balancing and content caching, the streaming media content of user request can be published to the edge of the network nearest to the user, thus improving the user's access response speed and effectively solving the network congestion. Reduce backbone network traffic to a minimum.

Ø Cache Technology (caching). Since the Internet is based on discontinuous asynchronous packet transfers, a real-time media stream or media file is split into multiple packets in transit. Due to network delay, jitter and other factors, the packet arrives at the client's order and latency may not be the same, there may be a first-sent packet to the situation, so it is necessary to cache the system to compensate for network latency and jitter, to ensure that the data are grouped in the correct order, not due to the temporary network congestion and the phenomenon of playback. Caching techniques include forward caching, reverse caching, and transparent proxy caching.

Reference documents:

[1] Zhang Hong, ET. computer network multimedia technology and application. Beijing: Machinery Industry Press, 2003

[2] Lingling, Zhang Yuntao. Computer network and web technology. Beijing: Machinery Industry Press, 2005

[3] Huang, computer network application design Wuhan: Wuhan University Press, 2004

[4] David powers.php Basic Tutorials with Dreamweaver. Chen Zongbin, ET, translate. Beijing: People's post and Telecommunications press, 2008

On the development technology of streaming media website

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.