Video transcoding technology and transcoding implementation in detail

This article briefly introduces the definition, classification and implementation methods of video transcoding technology, focusing on how to use transcoding technology in video engineering, including the use of transcoding technology and its advantages. It analyzes how to use transcoding technology in streaming mode and file mode. Through the analysis of two project examples of the remote transmission of video data and the network material of the program production network in the mobile nonlinear editing system, the flexibility and versatility of the transcoding system are discussed. Clarified the author's views on the prospect of using transcoding technology in conjunction with computer equipment and network architecture in the field of professional video.

1 Introduction

Let's start our discussion from a simple question: For a video engineering technician, how many kinds of video and audio encoding methods do I need to face in my work?

In terms of encoding and compression methods, we need to face different series of compression encoding methods such as MoTIon-JPEG, MPEG, DV, H.261 \ H.263; each encoding method needs to face different Subclasses or subclasses, such as discussing DVB, often involve MPEG-2 MP @ ML and MP @ HL; video products of different manufacturers also use different intra-frame and inter-frame coding relationships and different code streams according to their respective situations. ; GOP length, I, B, P frame, 50, 25 Mbps and other terms have now become an important part of the technical parameters of video products; each manufacturer also has its own encoding method for the packaging of video data, and video servers developed by different manufacturers , Such as the profile series servers of Grass Valley and the MAV series servers of SONY, although they can support the same GOP length and the same stream encoding method to generate MPEG-2 video files, but due to the difference in file packaging, the two Video files cannot be used directly with each other. This situation is quite common in the field of digital video, sometimes even in different series of video products developed by the same manufacturer. Data streams or files cannot be identified with each other.

We do n’t want to discuss which encoding and compression method is better and better here. What I want to discuss in this article is how to share and exchange video and audio data with high quality, high efficiency and efficiency between video devices using different compression and encoding methods.

The current common practice for exchanging video data is to decompress the encoded video data into baseband signals, re-encode them according to the situation, and encapsulate them appropriately, using the same interface protocol, in a streaming manner, between different video products Perform transmission sharing. If you use SDI connection between different video products, no matter what encoding method is used inside the device, the video data is encoded and decoded into a standard SDI data stream through the built-in SDI codec for transmission.

No matter what compression coding method is used in device A, when transmitting video data to device B, the video data is first decoded and sent to the SDI encoder through its built-in data decoding unit, packaged and converted into an SDI data stream, and then through the SDI interface It is transmitted to the SDI interface of device B, and device B sends it to its own data encoding unit through the SDI decoder to re-encode the video data for processing or storage.

The premise of this data exchange is that different devices have interfaces that comply with the same protocol, such as SDI interfaces, and have corresponding codec hardware devices. A common-identifiable data stream is used as an intermediary to exchange video and audio data.

Let's look at it from another perspective, this method itself can be regarded as a coding conversion, that is, the process of transcoding. It decodes the video data encoded in Device A, converts it into an SDI stream through the SDI codec, transmits it to Device B, and then converts it into the data encoding method used by Device B for processing and storage.

In this case, if we can use direct transcoding to convert the video data based on the encoding method of device A to a data encoding format that device B can recognize and use, and process or store it for device B, it can reduce repeated codecs. The resulting equipment overhead and signal quality are reduced, and a variety of transmission channels can be used, not limited to the specified interface channel, which can greatly improve work efficiency.

This is exactly what this article wants to discuss with you. How to use the transcoding method flexibly to share video data between devices based on different encoding methods, improve work efficiency, and discuss possible problems and solutions in engineering .

2 Video transcoding technology

Video transcoding technology, as the name implies, is to change the encoding method of existing video data by some means. The purpose of video transcoding technology is different, and the means of its realization are also different. It can be roughly divided into two categories:

1. Video data transcoding between different encoding formats

Data transcoding between different encoding formats refers to changing the encoding format of video data through transcoding methods. Usually this kind of data transcoding will change the existing code stream and resolution of the video data.

For example, we can convert video data based on MPEG-2 format to DV, MPEG-4 or other encoding formats, and at the same time, according to its transcoding purpose, specify the code stream and resolution of video data generated by transcoding. We can convert MPEG-2 full I frame 50Mbps video source data to 25Mbps bitstream DV format data for notebook mobile editing system, and at the same time generate a 300 * 200 low resolution MPEG-4 file, use REAL or Microsoft The WMV format is encapsulated and transmitted to the competent leadership office for review through the Internet.

The algorithm designed by this transcoding method is relatively complicated, which is essentially a re-encoding process. The algorithm complexity and system overhead involved are determined by the image quality requirements for transcoding and the correlation between the two encoding methods before and after transcoding. Decided.

2. Video data transcoding between the same encoding formats

Data transcoding in the same encoding format refers to not changing the compression format, but only changing its code stream or header file information through transcoding. According to its purpose of use, it can be divided into two types: changing the code stream and not changing the code stream.

For example, we can transcode the video data of the MPEG-2 full I frame 50Mbps bit stream into MPEG-2 IBBP frame 8Mbps bit stream video data, which is directly used by the broadcast server for broadcast. Or we can change the header file and encapsulation format of the MPEG-2 full I frame 50Mbps stream video file based on the SONY video server header file package, so that it can be directly edited on the editing system given to the MATROX board.

The complexity of this transcoding method is less than the complexity of transcoding in different encoding formats, and it is more operable for video engineering.

3 Realization of video data transcoding

There are many algorithms that can realize the conversion between different encodings of video data, and many moving image experts have also made in-depth research on this, and put forward quite a few feasible solutions for different encoding methods. The common feature of these schemes is to make full use of the common features between the required inter-conversion codes to minimize the image quality loss caused by the codec, while achieving a balance of time and resource consumption.

If we convert an MPEG-2 video data to MPEG-4 video data, of course, the method that can be used is to decompress the MPEG-2 video into a single-frame image sequence, and then re-compress and encode it into MPEG- 4 video data

But the computational complexity of this transcoding method using SDI data stream as an intermediary does not make any difference. We can improve the efficiency of transcoding and reduce the computational complexity through some methods. For example, MPEG-2 and MPEG-4 have many similarities in their encoding algorithms. There are many aspects in DCT transformation, MC motion compensation, MV motion compensation, etc. Where it can be shared, we do n’t need to decode it into an independent image sequence, we can use the correlation between different encoding methods to transcode

All the header information in MPEG-2 video data is decoded and sent directly to the MPEG-4 encoder for encoding. A few of the header information needs to be adjusted to adapt to the new encoding format. The DCT coefficients and MV information are reused, eliminating the system consumption of motion estimation and DCT. At the same time, when MPEG-4 performs motion compensation, it can also directly use the information of the motion vector decoded by the MPEG-2 decoder.

We can see that using different transcoding algorithms in different requirements of code conversion, you can get different time and system consumption complexity. Whether these different complexity algorithms are adopted depends on the user's requirements for the task. For example, work tasks need to obtain transcoding results in real time, require high reliability, and specify the encoding method and code stream of data before and after transcoding unchanged. Then we can use an efficient transcoding algorithm, sacrifice some image quality if necessary, and fix the algorithm on the hardware chip board to meet the task requirements. If the job task does not require high transcoding synchronization and does not require real-time output, but has high requirements for image quality, we can use some transcoding algorithms with lower efficiency but less image quality loss. You can fix the algorithm in a hardware chip, or you can use a general computer computing system, storage system, and data exchange system, and use software algorithms for transcoding. The specific application of these methods will be described in detail in the latter part of this article.

Let's take a look at how these transcoding tasks are implemented.

First, the traditional stream-oriented video transcoding

Due to the characteristics of the video data itself, the huge amount of data and the linear storage format, the traditional video coding conversion has long been oriented to the data stream. Its working principle is the same as a standard converter. The input terminal inputs a continuous NTSC system signal, and at the same time outputs a real-time PAL system signal.

The advantage of this method is that the transcoding results can be output in real time or near real time. The transcoding algorithm is solidified on the board chip. The transcoding work is basically completed by hardware and has good stability. However, its shortcomings are also obvious. The transcoding unit is aimed at a specific source encoding method and target encoding method. The user is basically unable to control the size and additional information of the code stream, and the flexibility is poor. In order to meet the requirements of real-time processing, sometimes it is necessary to sacrifice the quality of some images. Another disadvantage is that this type of video transcoding based on streaming mode, the input and output are basically synchronized, can not be faster than real-time speed conversion.

With the advancement of computer technology and the improvement of nonlinear storage methods, we can store video data in the form of files. This provides a new, more flexible and efficient transcoding method for video data.

Second, use the computer and related equipment to perform video transcoding in a file-oriented manner

Using computer equipment to change the encoding method of a single image is already a very mature technology, but due to the limitations of computer computing power and storage capacity, for a long period of time, there has been no transcoding processing for professional video data that meets broadcast-level requirements. What a good solution. However, with the increasing computing power of computer equipment and the increasing storage capacity, its data interface can already meet the needs of video data processing. The use of computers and related equipment to process video data has become the mainstream, and it also provides video transcoding. A better cost-effective platform. We can use computer equipment and software to perform flexible and efficient transcoding.

Let's take a look at how to use a computer system for transcoding.

This type of work using computer equipment for transcoding has great flexibility, and can process video data that exists in file mode or in stream mode. The essence of this is to create a cache area of ​​large enough data in the memory of the computer device, divide the video data file or stream to be processed into many fragments of suitable size, and put it into it. The transcoding algorithm is provided by the software, and the computer system is controlled to perform the transcoding work. The concept of the data interface shown in Figure-7 is also very flexible. It can make the external interface of the computer equipment, such as Gigabit Ethernet, Fiber Channel channel, or its own built-in storage channel interface. Let's take a look at how they work.

The computer device first puts the video data file to be converted and encoded into the external storage or local storage device. Then the video file is split into data fragments suitable for processing by the computer device, put into the cache, the software provides a transcoding algorithm, and uses the processing power of the computer device to encode and convert the data fragments. After the conversion is completed, the data fragments are sent to the designated area for storage, and at the same time, the cache area obtains new data fragments. Loop this way until all the split data fragments have been transcoded, merge the video data file fragments that have been transcoded, and output the video data we need.

This method of splitting data is also suitable for streaming video data. For example, we can use the data interface to directly connect to the digital video data stream and store it in the designated cache of the computer transcoding device without any codec. Region, the linear data stream exists as a non-linear data storage method, and then you can use the data splitting method shown in Figure 8 for transcoding. After merging, you can select the file method or the data that still maintains the stream method Output.

This type of transcoding work has great flexibility. The digital signal interface does not need to identify the format and encapsulation of the received data stream. Simply record the data to the cache area, and the transcoding software decides which transcoding method to use and which encoding format and packaging method to use for the data stream. If we have the same interface hardware standard, we can encode and convert data streams input in multiple ways such as DV stream, TS stream, FTP file stream and so on. There is no need to replace the hardware interface and codec equipment, just change the transcoding Software transcoding processing means and control means

Let's see how the transcoding software works.

Different transcoding software has its own characteristics, but it consists of the following functional modules: data interface module, hardware interface module, storage management module, transcoding algorithm module, data processing module, control management module and user interface module .

Each module is responsible for one or several aspects of software work: the data interface module is responsible for processing data input and output, the hardware interface module is responsible for communicating with the computer hardware driver, the storage management module is responsible for the allocation of storage space such as Inner Village, and transcoding algorithm The module provides algorithmic means for transcoding processing, the data processing module performs specific data processing for transcoding, the control management module performs control and information processing of the entire transcoding work, and the user interface module provides user interaction with transcoding software to provide users with The transcoding method, code stream and other options provided by some software can be controlled.

The transcoding algorithm module can be solidified into the transcoding software, or it can exist as a plug-in. When the transcoding software handles different encoding conversion tasks, different transcoding algorithm plug-ins are used as needed, which can flexibly expand the software functions without changing the configuration of other functional modules.

Using computer equipment with transcoding software for professional video encoding conversion has the following advantages:

• Hardware facilities are relatively simple

Use computer equipment and software for transcoding, without the need for special codec chips or boards. The data processing is completely controlled by software.

• Wide range of transcoding and good flexibility

Using software transcoding, users can control the transcoding settings according to their needs. Including the size, level, compression method, packaging method, etc. of the target code stream can be specified by the user, and the corresponding transcoding algorithm can be directly used according to different needs. The transcoding algorithm can exist as a plug-in in the software, which is easy to update at any time Or upgrade without changing the entire system.

3. The complexity and resource consumption of transcoding vary with different needs. The software transcoding system can be used to treat different transcoding requirements separately. Sometimes we just want to change the packaging method of the video file, but not to change the compression encoding method, this method is very suitable. For example, we have such a need, we need to transcode the MPEG-2 I frame 50M bitstream encoded video file in SONY MAV series server into a video file format that Ma trox DigiSuite DTV board can support, for program production network editing . Since the DTV board supports the video data of the MPEG-2 I frame 50M stream, we can only change the encapsulation form of the video file when transcoding, without changing the compression coding involved in the video data content. This can greatly reduce the complexity of transcoding and system consumption, while ensuring that the quality of video data is not damaged by re-encoding and decoding.

4 Application of transcoding system in actual engineering

In the TV technology project, there are already many practical examples of transcoding systems. We will further analyze the working principle and application prospect of the transcoding system based on computer equipment through two engineering examples.

1. Application of transcoding system in remote transmission of mobile nonlinear editing system

With the increasing performance of notebook computers, businesses have been keenly aware of the application prospects of using notebook-based mobile nonlinear editing systems in remote editing transmission. The software-based editing method greatly reduces the price of the editing system, and the portability of the device makes on-site editing possible. But these are not all the advantages of mobile non-editing. There is also a very important feature that attracts users: using mobile non-linear editing systems and corresponding network access equipment, you can use the existing public communication network for video data transmission. It makes it possible to use inexpensive public internet, telecommunication networks or mobile communication networks to replace dedicated and expensive, point-to-point communication lines for video data transmission.

Mobile editing systems can use public broadband communication networks consisting of inexpensive broadband, ADSL lines, and GPRS wireless communications throughout towns to replace dedicated and expensive data link channels such as microwaves, fiber channels, and satellites for video data transmission.

However, when using public networks to transmit video materials, it is inevitable to encounter bottlenecks in public network bandwidth. For example, the maximum transmission rate of broadband Internet access for Ethernet LANs will generally not exceed 4 Mbps. Depending on the route and the trunk bandwidth Limit, the actual transmission rate will be lower. For the MPEG2 full I frame encoding of the 50M stream or the DV encoding of the 25M stream, the data transmission rate of the public network is unbearable. Let's take the encoding method of DV 25M stream as an example. Under the Windows operating system, a one-minute DV file is about 220MB, and it is transmitted at 200KBps on the Internet. It takes about 4100 seconds, which is about 68 minutes. That is, the ratio of the duration of video data to the duration of transmission is 1: 68. Although this efficient transmission method is theoretically feasible, in practical applications, due to different network conditions, the speed varies, and any interruption in the transmission may make the entire video file unusable, thus As a result, it must be retransmitted from the beginning. So this way of working is not operable in actual work.

So how to use the public interconnection communication network to efficiently and conveniently transfer the program video data back to the editing location or directly used for broadcasting? The video data transmission system based on software transcoding can be used to solve this problem.

According to specific needs, we can convert the program video data to a specified format through a software transcoding system, specify a stream encoding method, divide it into several data packets of suitable size by file division, and use FTP to convert these through the public Internet The data packet is sent to the receiving end in another place, and provides data verification means. After receiving each data packet, the receiving end encodes these data packets together into the data encoding method specified by the receiving end. There is no need to retransmit the video data from the beginning.

For example, in actual work, such a problem is encountered: the work task requires timely transmission of breaking news material shot in different places to a distant television station. There is no dedicated video signal transmission line between the two places or the rent of the dedicated line is too expensive, but the public Internet access is very convenient. The original material shot was DV compression encoding format, and the television station's editing and playback system used the MPEG-2 compression encoding format. In order to achieve fast, efficient and cheap transmission of program material back to the TV station, the following working methods can be adopted.

First, use the software transcoding system on the machine of the mobile nonlinear editing system to transcode the source video data (DV) into a video data file that the user specifies the encoding method and code stream. The encoding method and code stream are specified according to the specific needs of the user. For example, for breaking news that focuses on content and some video data that does not need to be edited again, the user can choose to sacrifice video image quality in exchange for higher compression. The file of the ratio is used for transmission on the public Internet, for example, transcoding a DV file of about 220MB per minute into an MPEG-4 file with a high compression ratio of 60MB per minute. In the case of unchanged network conditions, its transmission time can be reduced to a quarter of the time required to directly transfer DV files at the expense of image quality, but the loss of image quality is almost indistinguishable to the naked eye. Then split the MPEG-4 file into several packets. These data packets are sent to the receiving end of the remote TV station through FTP. The MPEG-4 file obtained by combining these files at the receiving end will be transcoded into the MPEG-2 file of the specified packaging format by the transcoding system according to the code stream and encoding method specified by the user, and used directly for editing or broadcasting .

The use of this transmission method has the following characteristics: the user can control the size of the file to be transmitted, and adjust it flexibly according to his own needs and network conditions; the user can control the image quality of the video data, and can change the resolution of the image while transmitting the data And encoding method; split the video data file into several data packets for transmission, which can make full use of the resources of the public interconnection communication network, and at the same time have the function of resuming the breakpoint; users can join the self when splitting and merging data packets The defined encryption and decryption methods can make the data transmission on the Internet more secure; the work of splitting files, encoding transmission, and merging files can be carried out at the same time. For example, in the encoding process, the encoded parts can be split into data packets , Sent directly to the receiver, the receiver can merge while receiving, and encode the merged data, which can greatly improve work efficiency.

It is worth mentioning that the size of the image quality loss is determined when the user specifies the encoding method and the size of the code stream. When transcoding the received video data into a high-stream encoding method when transmitting to the destination, only redundant information is added to the video data, and the image quality cannot be changed. Therefore, users can control the balance between image quality and transmission time by adjusting the size of the transmission code stream according to their own needs.

In this project, the transcoding system is mainly used to change the encoding method and code stream size of the video data to be suitable for transmission using a low-speed network, and to control the encoding method and the size of the code stream during the transmission process to carry out the image quality transmission. control. In an engineering example below, we analyze how to use transcoding system for efficient collection of video material data, so as to discuss another focus of transcoding system application, that is, the packaging method and redundancy of video data encoding Transcoding of the remaining information, and less touches on the encoding method and code stream size of the video data content itself, improves the versatility of video data generated by different digital video equipment, and reduces the impact of the codec link in transmission on the quality of video data .

Second, the application of transcoding system in centralized collection system

We design a centralized upload system in the program production network based on Ma trox DigiSuite DTV boards, the purpose is to change the traditional way of uploading work using the editing board itself, using the multi-channel video server, high stability and flexible encoding Perform centralized upload of video data. The transcoding system converts the video file format generated by the server into a video data format that can be used by the editing system. At the same time, the satellite recording, existing video and audio files and other video sources obtained through other channels are introduced into the editing network through the transcoding system. This improves the efficiency and flexibility of uploading video data, reduces the non-editing time that the editing station spends on uploading work, and conveniently introduces video data in different compression encoding formats into the editing system.

The working principle of this solution is to use a multi-channel video server with a storage unit as the first link for centralized upload. The video input channels are connected to traditional pre-programs such as recorders, cameras, and switchers. The recording control workstation controls the input channel of the video server through the 422 control matrix to upload program material, and stores it in the local storage unit of the server in the format of the video file provided by the video server. The video server uses a Gigabit asynchronous interface to connect to the Gigabit Ethernet switch through the gateway, and uses the standard FTP protocol to transfer the video files in the server to the hard disk storage array of the program production network through the transcoding system, and provides the editing environment for editing jobs.

After this kind of working method is established, it has extremely strong flexibility. Traditional devices that use SDI and analog composite component interfaces can be connected and uploaded using a video server. For devices that provide Gigabit Ethernet interfaces, such as hard disk recorders, SONY video recorder devices with standard Ethernet interfaces, and Blu-ray disc recording devices based on file systems , P2 card equipment, etc., can be connected to the Gigabit switch in the centralized upload system through the standard Gigabit Ethernet interface, and connected to the control link through 422 control or Ethernet network. You can easily use FTP to upload files at high speed, and when adding these devices, there is no need to make major adjustments or changes to the system configuration and control operations of the centralized upload. The transcoding system is at the core of the centralized recording system.

The transcoding system is composed of a transcoding server, a transcoding dispatching server, a user control interface, and corresponding Ethernet and Fiber Channel network connection switching equipment. The transcoding server specifically responsible for transcoding is one or several high-performance computer devices with Gigabit Ethernet and FC interfaces. The video data enters the transcoding server through the Gigabit Ethernet interface, and after transcoding, it is output to the hard disk storage array or other storage mechanism of the program production network through the FC port. The user makes configuration adjustments to the transcoding dispatch server through the user control interface, and specifies the encoding method and stream of transcoding. The transcoding scheduling server controls the transcoding server to perform transcoding through the Ethernet connection. The transcoding server can change the encoding method of the video data or the format of the file encapsulation during the migration of video data input from the Gigabit Ethernet interface to the output from the Fiber Channel interface, and convert the video data file to the file format supported by the video server A video file format recognized and usable by the editing environment. Similarly, video equipment that can provide a gigabit asynchronous interface can be connected through a gateway and a gigabit Ethernet network to perform transcoding of video data during data migration

In this way of working, the transcoding system can minimize the changes to the encoding method and code stream size of the video data itself. For example, for the MPEG-2 file in the server, you can change its packaging method and header file directly for editing workstations. Similarly, all editing sites can handle the encoding methods used. For example, DTV boards support MPEG-2, DV25 and DV50 encoding methods. Video data based on these encoding methods can be efficiently and conveniently introduced into the editing system without The content data of the video data needs to be repeatedly encoded and decoded to avoid the loss of image quality due to the transmission link.

Since the pure transcoding operation is no longer the bottleneck of transcoding speed in this task, the size of transcoding time depends on the speed of the data interface, such as Gigabit Ethernet and FC interface, which can theoretically provide a transmission speed of about Gigabit, In the case of only changing the file packaging method, in fact, the files of the MPEG-2 full I frame 50M stream can be included and imported in 1/5 ~ 1/10 time of the file length, thereby greatly reducing the uploading of materials And the time consumed

to sum up

The above two engineering examples represent the application of the transcoding system in two directions. When the transcoding system moves and edits the video data nonlinearly, it reduces the size of the code stream by changing the code stream, thereby increasing the transmission speed. And through the way of file splitting, the entire block of data is converted into small pieces of scattered data, thereby reducing the transmission risk caused by the instability of the channel. When the transcoding system is used in the centralized recording system, the high-speed and stable transmission channel is used to change the file or stream encapsulation to improve the versatility of the video data. And you can use high-speed FTP transmission to introduce video material into the editing environment at ultra-real-time speed.

Through the analysis of the application of these two specific projects, we can see that the application prospect of the transcoding system in the video field is very broad. Video data encoding and decoding, code stream conversion, etc., which had to be done before with expensive professional hardware equipment, can now be completed with transcoding software through increasingly powerful computer technology. At the same time, transcoding technology can also provide a good solution for the transmission, storage and versatility of video data.

The transcoding technology in the field of professional video is developed from general technology, which in turn can greatly reduce the cost of professional video equipment investment and enhance its versatility and flexibility. There are quite a few successful examples in this industry that have borrowed the stones of other mountains and specialized in general product technology, such as the application of Gigabit Ethernet interface and optical disc technology in hard disk recorders and Blu-ray disc devices, such as semiconductor storage Applications on P2 cards, etc. We believe that the working mode of this software-based transcoding system will be the next achievement example in the field of professional video, and will bring another revolution in the field of video.

Earphones is one of our important products , both the in ear headfphones and Earphones With Mic have advantages as follow :

The sound quality of the best in Ear Headphones is amazing.

Military level unite voices more pure.

Great sound experience.

Two voices exports more stereo sound.

These earphones with mic have the mic on the wire and the wired earphones works great.All metal building cavity make a more powerful sound shock.Wide dynamic range;Dual bass sound unit design, a broader range.

Excellent bass response;Connect to all MP3 players and digital audio device.

These Good Quality Earphones have real deep heavy base, excellent high frequency and no distortion. And these earphones are comfortable , completely fit to the shape of the ears.

Earphones

Ear Headphones, Earphones With Mic, Good Quality Earphones

Hebei Baisiwei Import&Export Trade Co., LTD. , https://www.baisiweicable.com