FFmpeg parameter description

Source: Internet
Author: User

ffmpeg.exe-I f: \ hacker house \ hacker Song-AB 56-ar 22050-B 500-R 15-s 320x240 F: \ 11.flv
FFMPEG-I f: \ 01.wmv-AB 56-ar 22050-B 500-R 15-s 320x240 F: \ test. FLV
use the-SS parameter (time_off set the Start Time Offset) to start the conversion task from a specified time point. For example:
capture the thumbnail while converting the file format:
FFMPEG-I "test. avi "-y-F image2-SS 8-T 0.001-s 350x240 'test.jpg '
capture existing FLV images:
FFMPEG-I" test. FLV "-y-F image2-SS 8-T 0.001-s 350x240 'test.jpg '
the unit of time followed by-SS is second
FFMPEG conversion command
FFmpeg-y-I test. MPEG-bitexact-vcodec h263-B 128-R 15-s 176x144-acodec AAC-AC 2-ar 22500
-AB 24-F 3GP test.3gp
or
FFMPEG-y-I test. MPEG-Ac 1-acodec amr_nb-ar 8000-s 176x144-B 128-R 15 test.3gp

FFMPEG parameter setting explanation
-bitexact uses standard bit rate
-vcodec Xvid uses Xvid for compression
-s 320x240 specify resolution
-r 29.97 shard rate (which can be changed, make sure that the non-standard watermark rate will cause audio and video to be not synchronized, so it can only be set to 15 or 29.97)
select one of the image sections
-B specify the compression bit rate, it seems that FFmpeg is an automatic VBR. If it is specified, it is probably the average bit rate, for example,
0.01 is the
-qscale VBR of the original default Project, with a value of 255, the smaller the quality is, the better
-qmin sets the minimum quality, which is shared with-Qmax (set the maximum quality, for example,-qmin 10-Qmax 31
-sameq uses the same quality as the source
sound part
-acodec AAC sets sound encoding
-AC number of audio channels, 1 is the single-channel, 2 is the stereo, and the tvrip for single-channel conversion can use 1 (saving half of the capacity ), high Quality
DVDRip can be used with 2
-ar to set the sound sampling rate. psp recognizes only 24000
-AB to set the sound bit rate, the front-ac must be set to half the bit rate when it is set to stereo. For example, if it is set to 96 at kbps, the conversion
the default bit rate is small, if you want to hear high-quality sound, we recommend that you set it to 160 kbps (80) or above
-Vol to set the volume. For some DVDRip, the AC3 track volume is very small, this can be used to increase the volume during conversion. For example, 200 is twice the original volume.
to get a high-definition MP4 with low-volume sound quality, it is best not to use a fixed bit rate for the image first, the VBR parameter is used to determine the Program
, while the sound quality parameter can be improved a little based on the original one, it sounds much more comfortable and not too big (depending on the situation

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-muxvb 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: to execute it in the directory where FFmpeg is located (under the directory where conversion is located

Cores subdirectory ).
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: -qscale 4 and-qscale 6 and 4

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)

If the machine is strong, several more files can be opened for parallel processing.
E: \ ffmpeg.exe-I: \ 1.wmv-B 360-R 25-s 320x240-HQ-deinterlace-AB 56-ar 22050-Ac 1 D: \ 2.flv
========================================================== ===
Ffmpeg.exe-I f: \ pop-up house \ pop-up songs-AB 56-ar 22050-B 500-R 15-s 320x240 F: \ 11.flv FFMPEG-I f: \ 01.wmv-AB 56-ar 22050-B

500-R 15-s 320x240 F: \ test. FLV uses the-SS parameter (time_off set the Start Time Offset) to start the conversion task from a specified time point. For example:
Capture the thumbnail while converting the file format:
FFmpeg-I "test. Avi"-y-F image2-SS 8-T 0.001-s 350x240 'test.jpg'
Capture existing FLV images:
FFmpeg-I "test. FLV"-y-F image2-SS 8-T 0.001-s 350x240 'test.jpg'
-SS followed by the FFMPEG conversion command in seconds
FFmpeg-y-I test. MPEG-bitexact-vcodec h263-B 128-R 15-s 176x144-acodec AAC-AC 2-ar 22500-AB 24-F 3GP test.3gp
Or
FFmpeg-y-I test. MPEG-Ac 1-acodec amr_nb-ar 8000-s 176x144-B 128-R 15 test.3gp FFMPEG parameter setting explanation
-Bitexact uses standard Bit Rate
-Use Xvid to compress vcodec Xvid
-S 320x240 specify resolution
-R 29.97 attention rate (it can be changed to confirm that non-standard attention rate will cause audio and video not to be synchronized, so it can only be set to 15 or 29.97)

Select one of the image parts.
-B <bit rate> specifies the compression bit rate. It seems that FFmpeg is an automatic VBR. If it is specified, it is probably an average bit rate. For example, if it is set to 768,1500, it is in the original default project.
-Qscale <value> A <value> quality-based VBR. The value ranges from 0.01 to 255. The smaller the value, the better the quality.
-Qmin <value> sets the minimum quality, which is shared with-Qmax (sets the maximum quality), for example,-qmin 10-Qmax 31.
-Sameq uses the same quality sound as the source.
-Acodec AAC: Set the sound encoding.
-AC <value> specifies the number of audio channels. 1 indicates the single channel, and 2 indicates the stereo mode. You can use 1 (save half of the capacity) to convert the single channel tvrip, and use 2 for high-quality DVDRip.
-Ar <sampling rate> sets the sound sampling rate. psp only recognizes 24000.
-AB <bit rate> sets the sound bit rate. When the front-ac is set to stereo, it must be set to half the bit rate. For example, if the 192kbps is set to 96, the default bit rate of conversion is small, want to hear more advanced products

We recommend that you set the audio quality to 160 kbps (80) or above.
-Vol <percentage> sets the volume. For some DVDRip, the AC3 track volume is very small. You can use this method to increase the volume during conversion. For example, 200 is twice the original volume, to get a high-definition, low-volume audio

For MP4, it is better not to use a fixed bit rate on the screen first, but to use the VBR parameter to let the program determine it by itself. The sound quality parameter can be improved by a bit based on the original one, which sounds much more comfortable,

It will not be too large (see the case Adjustment 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-muxvb 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: to execute it in the directory where FFmpeg is located (under the directory where conversion is located

Cores subdirectory ).
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: -qscale 4 and-qscale 6 and 4

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)

P.s. If the moderator machine is strong, you can open several more batch files for parallel processing. E: \ ffmpeg.exe-I: \ 1.wmv-B 360-R 25-s 320x240-HQ-

Deinterlace-AB 56-ar 22050-Ac 1 D: \ 2.flv

 

FFmpeg syntax

FFmpeg [[Options] ['-I' input_file]... {[Options] output_file }...

If there is no input file, video/audio capturing will take effect.

As a general rule, the option is generally used for the next specific file. If you select-B 64, the next video rate will be set. For the original input file, the format option may be required

.

By default, FFMPEG tries to achieve lossless conversion as much as possible and uses the same audio and video parameters as the input.

3. Options

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. The timestamp when the offset is added to the input file. Defining a positive offset means that the corresponding

The stream is delayed for 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: sets the DCTAlgorithmAvailable 0 ff_dct_auto default DCT 1 ff_dct_fastint 2 ff_dct_int 3 ff_dct_mmx 4 ff_dct_mlib 5

Ff_dct_altivec

-Idct_algo algo: sets the IDCT algorithm. There are 0 ff_idct_auto default IDCT 1 ff_idct_int 2 ff_idct_simple 3 ff_idct_simplemmx 4 available

Ff_idct_libmp eg2mmx 5 ff_idct_ps2 6 ff_idct_mlib 7 ff_idct_arm 8 ff_idct_altivec 9 ff_idct_sh4 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 with greater losses

-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.