Introduction to Audio/Video Encoding

Source: Internet
Author: User

Introduction to Audio/Video Encoding

1. Tools used:

Mplayer (command line-based player)

Mencoder (command line-based Transcoder)

Firefox (graphical browser)

2. Any video can be played in three steps: Unpacking-> decoding-> Rendering
, Corresponding to the player separator (demuxer)-> Decoder (decode)-> Renderer
.

 

(1) unpacking

That is, the process in which the player calls the separator to correctly extract the video track and audio track in the package.

Use the mplayer-demuxer HELP command to view the separators supported by the system.

 

(2) decoding

After the splitter correctly extracts the video track and audio track from the package, the player recognizes the file encoding format and calls the corresponding decoder for decoding.

You can use the mplayer-vc help command to view the video decoder supported by the system;

You can use the mplayer-ac help command to view the audio decoder supported by the system.

 

(3) Rendering

Audio and video are translated by the decoder and output by the Renderer. It can be understood that the screen is displayed on the screen, and the sound is well handled.

Use the mplayer-vf help command to view the rendering effect.

 

3. About menucoder

 

Install the appropriate decoder: sudo apt-Get install FFMPEG libavcodec-extra-52

(1) installation: sudo apt-Get install mencoder

(2) view the audio and video encodings supported by the system: mencoder-OVC help and mencoder-OAC help.

(3) view the supported Encapsulation Format: mencoder-of help

(4) compress a video: mencoder m001.mpg-O m001.mp4-OAC mp3lame-OVC x264-of lavf-VF lavcdeint.

In the above command, m001.mpg and m001.mp4 are the input and output file names respectively.-OAC is used to specify the Audio Encoder,-OVC specifies the video encoder,-
Specify the output file format. The lavf output file format is determined by the output file name. (You can use m001.mp4 to encapsulate the file in MP4 format and use m001.avi to seal the file in AVI format .)
The-VF lavcdeint parameter is used to remove the brushed stripe (sawtooth) in the video. If not, do not use this parameter.

(5) batch conversion script:

#! /Bin/bash
Find.-Type F/(-name "*. mpg"-o-name "*. MpEG"/) | while read line; do
Echo $ line
Mencoder $ line-O unzip line0000.mp4-OAC mp3lame-OVC x264-of lavf-VF lavcdeint

 

5. FFMPEG can also perform the preceding operations. See link: http://www.opensoce.com /? P = 1018

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.