Use FFMPEG to convert the file format and FFMPEG parameter description

Source: Internet
Author: User

Convert the file test. Avi to test. FLV.
FFmpeg-I test. Avi-AB 56-ar 22050-B 500-r 29.97-s 320x240 test. FLV
Thumbnail capture of files:
FFmpeg-I "test. Avi"-y-F image2-ss 4-T 0.001-s 350x240 test.jpg
Capture existing FLV files:
FFmpeg-I "test. FLV"-y-F image2-SS 8-T 0.001-s 350x240 test.jpg

FFmpeg conversion command (test failed)
FFmpeg-y-I test. Avi-bitexact-vcodec h263-B 128-R 15-s 176x144-acodec AAC-AC 2-ar 22500-AB 24-F 3GP test.3gp
FFmpeg-y-I test. Avi-Ac 1-acodec amr_nb-ar 8000-s 176x144-B 128-R 15 test.3gp
//------------------------------------
-Y (overwrite the output file, that is, if the 1. *** file already exists, it will be overwritten without prompt)
-I "1.avi" (the input file is a 1. AVI file in the same directory as FFMPEG. You can add the path and change the name)
-Title "test" (the title of the video displayed in PSP)
-Vcodec Xvid (videos are compressed using Xvid encoding and cannot be changed)
-S 368x208 (the output resolution is 368x208. Note that the source of the video must be or it will be deformed)
-R 29.97 (the number of frames. This is generally used)
-B 1500 (for video data traffic, use the-B XXXX command to use a fixed bit rate. The number can be changed as needed, and the value above 1500 does not work. Dynamic bit rates can also be used, for example: -The quality of qscale 4 and-qscale 6 is 6)
-Acodec aac (AAC for Audio Encoding)
-AC 2 (number of audio channels: 1 or 2)
-Ar 24000 (sound sampling frequency, as if PSP only supports 24000Hz)
-AB 128 (audio data traffic, usually 32, 64, 96, 128)
-Vol 200 (200% volume, change by yourself)
-F psp (dedicated output PSP format)
-Muxvb 768 (it seems to be the bit rate recognized by PSP machines. Generally, we select 384, 512, and 768. if I change it to 1500, PSP will say the file is damaged)
"1. ***" (output file name, you can also add a path to change the file name)

-AB bitrate: Set the audio bit rate.
-Ar freq: Set the audio Sampling Rate
-SS specifies the time point to start the conversion task (time_off set the Start Time Offset), followed by-SS in seconds.
-S 320x240 specify resolution
-R 29.97 percentile Rate
-Bitexact uses standard Bit Rate
-Use Xvid to compress vcodec Xvid

// -------------------------------------- (Convert)

Example: FFmpeg-y-I "1.avi"-title" test "-vcodec XviD-s 368x208-r 29.97-B 1500-acodec AAC-AC 2-ar 24000-AB 128-Vol 200-f psp-muxvisual 768 "1. ***"

Explanation: The preceding commands can be entered in the doscommand line or created to run in a batch file. However, the premise is that it should be executed in the directory where FFmpeg is located (the cores subdirectory under the directory where conversion is located ).
Parameters:
-Y (overwrite the output file, that is, if the 1. *** file already exists, it will be overwritten without prompt)
-I "1.avi" (the input file is a 1. AVI file in the same directory as FFMPEG. You can add the path and change the name)
-Title "test" (the title of the video displayed in PSP)
-Vcodec Xvid (videos are compressed using Xvid encoding and cannot be changed)
-S 368x208 (the output resolution is 368x208. Note that the source of the video must be or it will be deformed)
-R 29.97 (the number of frames. This is generally used)
-B 1500 (for video data traffic, use the-B XXXX command to use a fixed bit rate. The number can be changed as needed, and the value above 1500 does not work. Dynamic bit rates can also be used, for example: -The quality of qscale 4 and-qscale 6 is 6)
-Acodec aac (AAC for Audio Encoding)
-AC 2 (number of audio channels: 1 or 2)
-Ar 24000 (sound sampling frequency, as if PSP only supports 24000Hz)
-AB 128 (audio data traffic, usually 32, 64, 96, 128)
-Vol 200 (200% volume, change by yourself)
-F psp (dedicated output PSP format)
-Muxvb 768 (it seems to be the bit rate recognized by PSP machines. Generally, we select 384, 512, and 768. if I change it to 1500, PSP will say the file is damaged)
"1. ***" (output file name, you can also add a path to change the file name)
**************************************** **************************************** ******
A) General options

-L license

-H help

-Fromats displays available formats, codec, and protocols...

-F fmt forced the FMT Format

-I filename input file

-Y overwrites the output file

-T Duration: the recording time in HH: mm: ss [. xxx] format is also supported.

-SS position: the specified time [-] hh: mm: ss [. xxx] format is also supported.

-Title string: Set the title

-Author string: Set the author.

-Copyright string sets Copyright

-Comment string: Set comments.

-Target type: All the format options (bit rate, codec, and buffer size) of the target file type (VCD, SVCD, and DVD) are automatically set. You only need to enter the following parameters:
FFmpeg-I myfile. Avi-target VCD/tmp/VCD. mpg

-HQ activates high-quality settings

-Itsoffset offset is set to the Time Offset Based on seconds. This option affects all subsequent input files. This offset is added to the timestamp of the input file. Defining a positive offset means that the corresponding stream is delayed by Offset seconds. [-] Hh: mm: ss [. xxx] format is also supported

B) video options

-B bitrate: bit rate. The default value is kb/s.

-R fps: the default frame rate is 25.

-S size: Set the frame size format to WXH. The default value is 160x128. The following can also be used directly:
Sqcif 128x96 qcif 176x144 CIF 252x288 4cif 704x576

-Set aspect to or 1.3333 1.7777

-Croptop size: Specifies the size of the top part in pixels.

-Cropbottom size-cropleft size-cropright size

-Padtop size: set the size pixel unit filled at the top.

-Padbottom size-padleft size-padright size-padcolor color: Fill in the color (Hex, six hexadecimal numbers, Red: Green: blue, for example, 000000 indicates black)

-VN does not record videos

-BT tolerance: sets the video bit rate tolerance kbit/s.

-Maxrate bitrate: sets the maximum video bit rate tolerance.

-Minrate bitreate: sets the minimum video bit rate tolerance.

-Bufsize size: sets the bit rate to control the buffer size.

-Vcodec codec enforces codec encoding/decoding. If copy is used, the original codec data must be copied.

-Sameq uses the same video quality as the source (VBR)

-Pass N: Number of processing times (1 or 2 ). Two-time encoding is very useful. Statistical information is generated for the first time, and precise request bit rate is generated for the second time.

-Passlogfile: Select File as the record file twice.

C) advanced video options

-G gop_size: Set the image group size.

-Intra only applies to intra-frame encoding.

-Qscale Q uses a fixed video Quantization Scale (VBR)

-Qmin Q minimum video Quantization Scale (VBR)

-Qmax Q maximum video Quantization Scale (VBR)

-Maximum deviation between qdiff Q quantization scales (VBR)

-Qblur: Video quantization Scaling (VBR)

-Qcomp compression video Quantization Scale compression (VBR)

-The initial complexity of rc_init_cplx complexity Encoding

-B _qfactor: QP factor between P and B frames

 

-The QP factor of I _qfactor between P and I frames

-QP deviation of B _qoffset offset between P and B frames

-QP deviation of I _qoffset offset between P and I frames

-Rc_eq equation: sets the default bitrate control equation Tex ^ qcomp.

-Rc_override: speed control overload at a specific interval

-Me method: the available methods for setting motion estimation are zero phods log X1 EPZs (default) full

-Dct_algo algo: the default DCT 1 ff_dct_fastint 2 ff_dct_int 3 ff_dct_mmx 4 ff_dct_mlib 5 ff_dct_altivec can be used to set the DCT algorithm.

-Idct_algo algo: sets the IDCT algorithm. There are 0 ff_idct_auto default IDCT 1 ff_idct_int 2 ff_idct_simple 3 limit 4 limit 5 ff_idct_ps2 6 ff_idct_mlib 7 ff_idct_arm 8 limit 9 limit 10 ff_idct_simplearm

-Er N is set to N 1 ff_er_carefull default 2 ff_er_compliant 3 ff_er_aggressive 4 ff_er_very_aggressive

-EC bit_mask: sets an error mask to bit_mask. This value is the bit mask of the following value: 1 ff_ec_guess_mvs (default = enabled) 2 ff_ec_deblock (default = enabled)

-BF frames uses frames B frames and supports mpeg1, MPEG2, and MPEG4

-Mbd mode macro block decision 0 ff_mb_decision_simple use mb_cmp 1 ff_mb_decision_bits 2 ff_mb_decision_rd

-4mv: use four motion vectors for MPEG4 only

-Part uses data division only for MPEG4

-Bug Param bypass is not automatically detected with the Encoder

-Strict strictness and standard rigor

-AIC enables advanced in-frame encoding h263 +

-Umv enables infinite Motion Vector h263 +

-Deinterlace

-Interlace forced interlace encoding is only valid for MPEG2 and MPEG4. This option is used when your input is intertwined and you want to stay intertwined to minimize image loss. The optional method is not intertwined, but the loss is greater.

-Calculate the SNR of the compressed frame.

-Vstats outputs video encoding statistics to vstats_hhmmss.log

-The vhook module inserts a video processing module. The module name and parameters are separated by spaces.

D) Audio options

-AB bitrate: Set the audio bit rate.

-Ar freq: Set the audio Sampling Rate

-AC channels: Set the channel to 1 by default.

-An does not enable audio recording

-Acodec codec uses codec encoding/Decoding

E) audio/video capture options

-VD device: sets the video capture device. For example,/dev/video0

-VC channel: Specifies the dedicated video capture channel dv1394.

-Tvstd standard: sets the TV standard NTSC pal (SECAM)

-Set dv1394 to capture dv1394

-AV device: Set audio devices such as/dev/DSP

F) advanced options

-Map File: stream sets the input stream ing.

-Debug: Print specific debugging information

-Benchmark indicates the benchmark test time.

-Hex dumping each input package

-Bitexact only uses a bit Precise Algorithm for Codec testing.

-PS size: Set the package size, in bits.

-Re reads data at a local frame rate, which is mainly used to simulate capturing devices.

-Loop input stream. Only works on image streams for ffserver Testing

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.