Video Transcoding technology and transcoding implementation

Source: Internet
Author: User
Tags ftp file recode

This article briefly introducesVideo Transcoding Technology


Of
Definition, classification and implementation methods, focusing on how to use transcoding Technology in video engineering, including the use of transcoding technology and its advantages. This article analyzes how to use the transcoding Technology in stream mode and file mode. Connect
The flexibility and versatility of the transcoding system are discussed by analyzing the two engineering instances of remote transmission of video data and centralized uploading of Program Production Network materials in the mobile nonlinear editing system. Clarified the author's knowledge about professional video
Domain, combined with the computer equipment and network architecture, the use of transcoding technology prospects.

  1 Introduction

Let's start with a simple question: for a video Engineering Technician, how many video/audio encoding methods are needed at work?

In terms of encoding and compression, we need to deal with motion-JPEG, MPEG, DV, h.261h. 263
Different series of compression encoding methods; each encoding method we need to face different subclass or sub-level, such as the discussion of DVB, often involves MPEG-2 MP @ ML and MP @ HL
Video Products of different manufacturers also adopt different encoding relationships within and between frames and different code streams according to their respective situations; GOP length, I, B, P frame, 50, 25
Terms such as Mbps have now become an important part of video product technical parameters. Each vendor also has its own encoding method for video data encapsulation. Video Servers developed by different manufacturers, such
Grass Valley's profile series server and Sony's MAV series server, although it can support the same GOP
Length, same code stream encoding method to produce MPEG-2
Video files, but because of the differences in file encapsulation, the video files generated by the two cannot be directly used by each other. This situation is quite common in the field of digital video, sometimes different series
In video products, data streams or files cannot be recognized from each other.

We do not want to discuss which encoding compression method is better or better here. What we want to discuss in this article is: how to share and exchange audio and video data with video devices using different compression encoding methods with high quality and efficiency.

Currently, the common practice of switching video data is to decompress the encoded video data into a baseband signal, recode it as needed, encapsulate it as appropriate, and use the same interface protocol, stream-based party
Transmission and sharing between different video products. For example, if SDI connections are used between different video products, no matter what encoding method is used inside the device, the built-in SDI
The decoder encodes and decodes video data into standard SDI data streams for transmission.

No matter what compression encoding method is used inside device A, when transmitting video data to Device B, the video data is decoded and sent to SDI through its built-in data decoding unit.
Encoder, encapsulate and convert data into SDI data streams, and then transmit the data to the SDI interface of Device B through SDI.
Decoder, which is sent to its own data encoding unit to recode or store video data.

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 hardware devices for codec, A commonly recognized data stream is used as an intermediary for the exchange of audio and video data.

From another perspective, this method itself can be seen as a transcoding process. It decodes the video data encoded in device A, converts the video data into an SDI stream through the SDI decoder, and transmits the video data to Device B, it is then transferred to the data encoding method used by Device B for processing and storage.

In this case, if you can use a direct transcoding method, convert the video data based on device A encoding to the data encoding format that device B can recognize and use.
Processing or storage can reduce the device overhead and reduce the signal quality caused by repeated codec. In addition, multiple transmission channels can be used, instead of limited to specified interface channels, can greatly improve work efficiency.

This article is intended to discuss with you how to flexibly use transcoding methods to share video data among devices based on different encoding methods and improve work efficiency, we also discuss possible engineering problems and solutions.

  2. Video Transcoding Technology

Video Transcoding technology, as its name implies, is to change the encoding method of existing video data by some means. Different video transcoding technologies are used for different purposes, and their implementation methods are also different. Generally, there are two types:

I. Video data transcoding between different encoding formats

Data transcoding between different encoding formats refers to changing the encoding format of video data through transcoding. Generally, this type of data transcoding changes the existing video data stream and resolution.

For example, we can convert video data based on MPEG-2 format to DV, MPEG-4
Or other encoding formats. At the same time, you can specify the code stream and resolution for transcoding to produce video data. We can convert the full I frame 50 Mbps video source data of MPEG-2
25 Mbps bitstream DV format data for notebook mobile editing system while generating a 300*200 low resolution MPEG-4 file using real
Or Microsoft's WMV format is encapsulated and transmitted over the Internet to the competent authority for review.

This transcoding method is designed with complicated algorithms. It is essentially a re-encoding process involving algorithm complexity and system overhead, it is determined by the image quality requirements required for transcoding and the relevance between the two encoding methods before and after transcoding.

Ii. Video data transcoding between the same encoding formats

Data transcoding in the same encoding format means that the bitstream or header file information is changed only by means of transcoding without changing the compression format. Based on its purpose, it can be divided into two types: Change code stream and do not change code stream.

For example, we can transcode the video data of MPEG-2 full I frame 50 Mbps bit stream to MPEG-2 ibbp frame 8 Mbps
Video data streams are directly used by the Broadcast Server for broadcasting. Or we will encapsulate the MPEG-2 full I frame 50 Mbps Based on Sony Video Server header files
Changes the header file and encapsulation form of a video file, so that it can be directly edited and used on the editing system for the matrox board.

This transcoding method is less complex than transcoding in different encoding formats, and is more operable for video engineering.

 3. Video data transcoding implementation

There are many algorithms for mutual conversion between different video data encodings. Many Motion Image experts have also made in-depth research on this and put forward many feasible solutions for different encoding methods. These
The common feature of the solution is to make full use of the common features between mutually convertible encodings, minimize the image quality loss caused by codec, and balance time and resource consumption.

For example, we will be a MPEG-2 of video data into MPEG-4 video data, of course, the method can be used is to first extract the MPEG-2 video into a single frame of the image sequence, and then re-compress it into MPEG-4 video data

However, SDI is used for the complexity of transcoding.
There is no difference in the computational complexity of data streams as a mediation. We can improve the transcoding efficiency and reduce the complexity, such as MPEG-2 and MPEG-4.
There are many similarities in the encoding algorithm, such as DCT transformation, MC motion compensation, and MV.
There are many areas that can be shared in terms of motion compensation. We don't need to decode them completely into an independent image sequence, so we can use the correlations between different encoding methods for transcoding.

All header information in MPEG-2 video data is decoded and sent directly to MPEG-4
Encoding in the encoder. A few of the header information needs to be adjusted to adapt to the new encoding format. The DCT coefficient and MV information are reused, saving the system consumption of motion estimation and DCT. At the same time
When MPEG-4 is used for motion compensation, you can also directly use the MPEG-2 decoder to decode the Motion Vector information.

We can see that different transcoding algorithms can be used to obtain different time and system consumption complexity for encoding conversion based on different requirements. Whether or not these different complexity algorithms are used depends on
Task requirements. For example, a job needs to obtain transcoding results in real time, which requires high reliability, and the encoding method and code stream of the data before and after transcoding remain unchanged. Therefore, we can adopt efficient transcoding algorithms.
At the expense of some image quality, the algorithm is solidified on the hardware chip board to meet the task requirements. If tasks do not have high requirements on transcoding synchronization and do not require real-time output, but they have high requirements on image quality,
We can adopt some transcoding algorithms with low efficiency but low image quality loss. The algorithm can be fixed in the hardware chip, or a general computer computing system, storage system, and data exchange system can be used.
Software algorithms are used for transcoding. The specific application methods of these methods are described in the second part of this article.

  The following describes how these transcoding tasks are implemented.

1. Traditional stream-oriented Video Transcoding

Due to the characteristics of video data, the large data size and linear storage format, traditional video encoding conversion has long been for data stream operations. It works like a standard converter. The input end inputs continuous NTSC signals and outputs real-time pal signals at the output end.

The advantage of this method is that transcoding results can be output in real-time or near real-time mode. The transcoding algorithm is solidified on the card chip, and transcoding is basically completed by hardware with good stability. But its disadvantage is
Obviously, the transcoding unit is specific to the source and target encoding methods. Users cannot control the bitstream size and additional information, and the flexibility is poor. To meet the requirements of real-time processing
The quality of some images must be sacrificed. Another disadvantage is that stream-Based Video Transcoding basically synchronizes input and output, and cannot perform transcoding at a faster speed than real-time.

With the development of computer technology and the increasingly sophisticated non-linear storage methods, we can store video data through files. This provides a new and more flexible and efficient transcoding Method for video data.

Ii. File-oriented Video Transcoding Using computers and related devices

Using computer devices to change the encoding method of a single image is already a very mature technology. However, due to the limitation of computer computing and storage capabilities, for a long time
There is no good solution for encoding and conversion of professional video data. However, as the computing capability of computer devices increases and the storage capacity expands, its data interfaces can meet the needs of video data processing.
Therefore, using computers and related devices to process video data has become the mainstream, and it also provides a better cost-effective platform for video transcoding. We can use computer devices and software for flexibility.
Efficient transcoding.

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

This method of Transcoding Using computer devices has great flexibility and can process video data that exists in the form of files or streams. In essence, it is stored on computer devices.
The server opens a cache area with enough big data to divide the video data files or streams to be processed into many suitable fragments and put them in it. The software provides transcoding algorithms and controls computer systems for transcoding. Figure
-The concept of the data interface shown in 7 is also very flexible, it can make external interfaces of computer devices, such as Gigabit Ethernet, Fiber Channel
Channel, or its own internal storage channel interface. Let's take a look at how they work.

A computer device first places video data files that require transcoding into external storage or local storage devices. Then, the video file is split into data fragments suitable for processing by computer devices and placed into high-speed
The software provides transcoding algorithms and uses the processing capabilities of computer devices to encode and convert data fragments. After the conversion, the data segment is sent to the specified region for storage, and the cache area obtains the new data segment.
Loop this method until all the split data segments are transcoded, merged and transcoded video data file segments, and output the video data we need.

This data splitting method is also suitable for video data that exists in the stream mode. For example, we can use the data interface to directly connect to the digital video data stream without any coding/decoding.
For the specified cache area of the Computer transcoding device, the linear data stream is stored in a non-linear data storage mode, and then you can use figure-8
The data splitting method shown in is transcoded. after merging, you can select the file mode or the data output mode that is still in the stream mode.

Transcoding in this way is highly flexible. The digital signal interface does not need to identify the formats of received data streams for encoding and encapsulation. You only need to record the data to the cache,
The transcoding Software determines the transcoding method and the encoding format and encapsulation method of the data stream. For example, when the interface hardware standards are the same, we can
Stream, FTP file stream, and other data stream input encoding and conversion methods. You do not need to change the hardware interface and CODEC device. You only need to change the transcoding processing and Control Methods of the transcoding software.

  Let's take a look at 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
Allocates storage space such as inner village. The transcoding Algorithm Module provides the algorithm means for transcoding processing. The data processing module processes the specific transcoding data, and the control management module controls the transcoding and information processing.
The user interface module provides interaction between users and the transcoding software, and allows users to control the transcoding encoding method, code stream, and other software options.

The transcoding algorithm module can be solidified into the transcoding software or can exist as a plug-in. When transcoding software processes different transcoding tasks, different transcoding algorithm plug-ins can be used as needed to flexibly extend the software functions without changing the configurations of other functional modules.

  Using computer devices with transcoding software for professional video transcoding has the following advantages:

• Relatively simple hardware

Transcoding Using computer devices and software does not require a dedicated Codec Chip or board. Data processing is completely controlled by software.

• Wide transcoding range and good flexibility

With software transcoding, you can control transcoding settings as needed. Users can specify the size, level, compression mode, and encapsulation mode of the target code stream, and use the corresponding transcoding algorithm based on different requirements, transcoding algorithms can be used as plug-ins in the software to facilitate updates or upgrades at any time without modifying the entire system.

III. The complexity and resource consumption of transcoding vary with requirements. The software transcoding system can treat different transcoding requirements separately. Sometimes we just want to change the encapsulation method of video files,
This method is very suitable without changing the compression encoding method. For example, we have the requirement that the MPEG-2 I frame in Sony's MAV series server should be 50 m
The video file encoded by the code stream is transcoded to the video file format supported by the MA trox digisuite DTV board for online editing of program production. DTV board support
MPEG-2 I frame 50 m
For video data streams, we can only change the Encapsulation Format of video files during transcoding without changing the compression encoding of video data. This greatly reduces the complexity of transcoding.
And system consumption, while ensuring that the quality of video data is not damaged by re-coding and decoding.

  4. Application of the transcoding System in actual engineering

There are already many practical examples of applying transcoding systems in TV technical engineering. The following two engineering examples are used to further analyze the working principle and application prospects of the transcoding system based on computer devices.

I. Application of the transcoding System in the remote transmission of the mobile Nonlinear Editing System

With the increasing performance of laptops, merchants have been keenly aware of the application prospect of using a notebook-based mobile nonlinear editing system for remote editing and transmission. Software-based editing
The price of the editing system is greatly reduced, and the portability of devices makes it possible for on-site editing. However, these are not all the advantages of mobile NLE, but also an important feature that attracts users: using mobile NLE
With the corresponding network access device, you can use the existing public communication network for video data transmission. The use of cheap public network, telecommunications network or mobile communication network, instead of dedicated expensive,
It is possible to transmit video data through point-to-point communication lines.

The mobile editing system can replace microwave, fiber channel, satellite, and other dedicated and expensive data connection channels with public Interconnected Communication networks composed of low-cost broadband, ADSL lines, and GPRS wireless communication in cities and towns. video data transmission.

However, when using a public network to transmit video clips, it is inevitable to encounter bottlenecks in public network bandwidth. For example, if the bandwidth Interconnection Network of the Ethernet is connected, the maximum transmission rate will not exceed
4 Mbps, and the actual transmission rate will be lower according to different routes and the bandwidth limit of trunk lines. For MPEG2 full I frame encoding of 50 m code streams or DV of 25 m code streams
For encoding, the data transmission rate of the public network is intolerable. We use the DV 25 m code stream encoding method as an example. In Windows, the DV file in one minute is about
About 220 MB. It is transmitted at a speed of 200 kbps on the Internet. It takes about 4100 seconds, that is, about 68 minutes. That is, the ratio of video data length to transmission time is 1.
: 68
. Although this efficiency transmission method is feasible in theory, in actual application, due to different network conditions, the speed varies, in addition, any interruption during transmission may make the entire video file unavailable.
As a result, it must be re-transmitted from scratch. Therefore, this work method is not feasible in actual work.

So how can we use a public Interconnected Communication Network to efficiently and conveniently transmit program video data back to the editing location or directly use it for broadcasting? This problem can be solved using a video Data Transmission System Based on Software transcoding.

We can convert program video data to a specified format through the software transcoding system, specify the code stream encoding method, and divide the program video data into several suitable data packets by file segmentation.
The public network uses FTP
Sends these data packets to the remote acceptor and provides data verification methods. After receiving each packet, the acceptor encodes the packet into the data encoding method specified by the acceptor.
In case of packet loss, the receiving end requires the transmitter to resend the packet without re-transmitting the video data from the beginning.

For example, if you encounter a problem in your actual work: the job requires that you transmit the sudden news clips captured in different regions to TV stations in a timely manner. No dedicated video signal transmission line or dedicated line rent between two locations
It is too expensive, but public network access is very convenient. The original video is DV compression encoding format, TV editing and Broadcasting System Using MPEG-2
. To quickly, efficiently, and cheaply transfer program materials to TV stations, you can use the following methods.

First, the source video data (dv
Transcoding: Specifies the encoding method and code stream for video data files. Encoding methods and code streams are specified based on the user's specific needs, such as sudden news that focus on content and videos that do not need to be edited repeatedly.
Data, users can choose the appropriate sacrifice of video data image quality in exchange for higher compression ratio of files for transmission on the public network, such as every minute around 220 MB dv
Files are transcoded to 60 MB of High-compression MPEG-4 files per minute. When the network conditions remain unchanged, the transmission time can be reduced to direct transmission of DV
The cost of a file is 1/4 of the time it takes, at the expense of the image quality, but the loss of the image quality is almost the same with the naked eye. The MPEG-4 file is then split into several packets. Use ftp
Send these packets to the remote receiver of the TV station. MPEG-4 obtained by the acceptor after merging these files
File, based on the user-specified code stream and encoding method, the file is transcoded to a MPEG-2 file in the specified Encapsulation Format through the transcoding system, directly used for editing or broadcasting.

This transmission mode has the following features: users can control the size of the files to be transmitted and adjust the file according to their own needs and network conditions. Users can control the quality of video data and images.
In order to change the resolution and encoding method of the image while transmitting data, the video data file is split into several data packets for transmission, and the resources of the public Interconnected Communication network can be fully utilized, resumable Data Transfer
Function. You can add custom encryption and decryption methods when splitting and merging data packets to ensure data transmission over the Internet is more secure; file splitting, encoding transmission, and file merging can be performed at the same time,
For example, during the encoding process, the encoded part can be split into data packets and sent directly to the receiving end. The receiving end can merge the received part and encode the merged data, can greatly improve the work
Efficiency.

It is worth mentioning that the loss of image quality is determined by the size of the user-specified Transmission Encoding Method and code stream. Transcode the received video data to a high-bitrate encoding method when it is transmitted to the destination.
Only redundant information is added to the video data, but the image quality cannot be changed. Therefore, you can adjust the size of the transmission code stream to control the balance between image quality and transmission time based on your needs.

In this project, the transcoding system is mainly used to change the encoding mode and code stream size of video data, so as to be suitable for low-speed network transmission, and control the encoding mode and the large bitstream during transmission.
Small, to control the quality of transmitted images. In the following project example, we analyze how to use the transcoding system to efficiently include video material data, so as to explore another application of the transcoding system.
It focuses on encapsulation of video data encoding and Transcoding of redundant information. It rarely involves the encoding mode and code stream size of video data content, improves video data generated by different digital video devices
And reduce the impact of encoding/Decoding on the quality of video data.

II. Application of the transcoding System in the centralized recording system

Based on Ma trox digisuite DTV
In the program production network of the Board, a centralized upload system is designed to change the traditional way of uploading using the editing board itself, using the multi-channel Video Server, high stability and encoding flexibility.
Centralized upload of video data. The transcoding system converts the video file format generated by the server to the video data format available for the editing system, and obtains the video and audio files recorded by the satellite, existing video and audio files, and other channels.
The retrieved video source is introduced into the editing network through the transcoding system. This improves the efficiency and flexibility of video data uploading, reduces the time spent by the editing site on non-editing tasks, and compresses different encoding formats.
Video data can be easily introduced 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 step of centralized upload. The video input channel is consistent with the video recorder, camera, switching Platform, and other traditional programs.
. Recording control workstation through 422
The control matrix controls the input channel of the Video Server to upload program materials. The video files provided by the video server are stored in the local storage unit of the server. The video server uses the Gigabit asynchronous interface through the gateway
Connect to a Gigabit Ethernet switch using standard FTP
The Protocol transmits video files on the server to the hard disk storage array of the program production network through the transcoding system, and provides the editing environment for editing and production.

This work method is highly flexible after it is established. Traditional SDI
Devices that simulate the composite component interface can use the video server to connect and upload, while devices that provide Gigabit Ethernet interfaces, such as hard disk recorders, Sony
Video Recorder devices with standard Ethernet interfaces, blue disc recording devices based on the file system, P2 card devices, and so on can all be connected through standard Gigabit Ethernet interfaces and gigabit switches in the centralized upload system, pass
422 control or Ethernet network and control link connection. You can easily use ftp
When you add these devices, you do not need to make major adjustments or changes to the system configuration and control operations for centralized uploads. The transcoding system is at the core of the centralized recording system.

The transcoding system consists of the transcoding server, transcoding scheduling server, user control interface, and the corresponding Ethernet and Fiber Channel.
Network connection and exchange device composition. The specific transcoding Server responsible for transcoding is one or more servers with Gigabit Ethernet and FC
Interfaces of high-performance computer devices. The video data enters the transcoding server through the Gigabit Ethernet interface. After transcoding, the video data passes through the FC
The port is output to the hard disk storage array of the program production network or other storage institutions. You can configure and adjust the transcoding scheduling server on the user control interface to specify the transcoding encoding mode and code stream. Transcoding scheduling Server
Use an Ethernet connection to control the transcoding server for transcoding. The transcoding server can input video data from the Gigabit Ethernet interface to the fiber channel.
During the data migration process output by the interface, the video data encoding method or file Encapsulation Format is changed, convert a video data file from the file format supported by the video server to a video file recognized and available in the editing environment.
File format. Similarly, video devices that can provide Gigabit asynchronous interfaces can connect to a Gigabit Ethernet network through a gateway to transcode video data during data migration.

In this way, the transcoding system can reduce the encoding mode and the bitstream size of the video data as much as possible. For example
File. You can change the encapsulation mode and header file to edit the workstation. Similarly, all editing sites can handle the encoding method used, such as DTV board support processing MPEG-2,
Dv25 and dv50
Video data based on these encoding methods can be efficiently and conveniently introduced into the editing system, without the need to repeat the encoding and decoding of video data content data, this avoids transmission loops.
Image quality loss.

Since pure transcoding operations are no longer the bottleneck of transcoding speed in this task, the size of transcoding time depends on the speed of the data interface. For example, it can theoretically provide a Gigabit Ethernet
And FC interface, in only change the file packaging mode, in fact, can be MPEG-2 all I frame 50 m code stream file to 1/5 ~ 1/10
It takes a long time to import files, greatly reducing the time consumption caused by uploading materials.

 Summary

The above two engineering instances represent the application of the transcoding system in two key directions. When the transcoding system is mobile nonlinear editing and transmission of video data, it reduces the bitstream size by changing the bitstream, thus increasing
The speed of transmission, and the way to split the file, the overall data into small scattered data, thus reducing the transmission risk caused by channel instability. When you centrally include the system application transcoding system,
The high-speed and stable transmission channel is used to improve the universality of video data by changing the file or stream encapsulation mode. High-speed FTP
The transmission mode of video clips is introduced into the editing environment at Ultra-real-time speed.

Through the application analysis of these two specific projects, we can see that the application prospects of the transcoding System in the video field are very broad. Video data that was previously performed only with expensive professional hardware devices
Codec, code stream conversion, and other work can now be completed using transcoding software through increasingly powerful computer technology. At the same time, the transcoding technology can also provide good performance in the transmission, storage and versatility of video data.
Solution.

Transcoding Technology in the professional video field is developed from the general technology. In turn, it can greatly reduce the costs invested by professional video equipment and enhance its versatility and flexibility. This kind of stone borrowed from it,
There are already a considerable number of successful examples of the specialization of general product technologies in the industry, such as applications of Gigabit Ethernet interfaces and CD technology on hard disk recorders and blue disc devices, for example, a semiconductor storage device in p2
Applications on the card. We believe that this software-based transcoding system will be the next success example in the professional video field, and will bring about another change in the video field.

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.