yading@10: @chapter Encoders yading@10: @c man begin ENCODERS yading@10: yading@10: Encoders are configured elements in FFmpeg which allow the encoding of yading@10: multimedia streams. yading@10: yading@10: When you configure your FFmpeg build, all the supported native encoders yading@10: are enabled by default. Encoders requiring an external library must be enabled yading@10: manually via the corresponding @code{--enable-lib} option. You can list all yading@10: available encoders using the configure option @code{--list-encoders}. yading@10: yading@10: You can disable all the encoders with the configure option yading@10: @code{--disable-encoders} and selectively enable / disable single encoders yading@10: with the options @code{--enable-encoder=@var{ENCODER}} / yading@10: @code{--disable-encoder=@var{ENCODER}}. yading@10: yading@10: The option @code{-codecs} of the ff* tools will display the list of yading@10: enabled encoders. yading@10: yading@10: @c man end ENCODERS yading@10: yading@10: @chapter Audio Encoders yading@10: @c man begin AUDIO ENCODERS yading@10: yading@10: A description of some of the currently available audio encoders yading@10: follows. yading@10: yading@10: @section ac3 and ac3_fixed yading@10: yading@10: AC-3 audio encoders. yading@10: yading@10: These encoders implement part of ATSC A/52:2010 and ETSI TS 102 366, as well as yading@10: the undocumented RealAudio 3 (a.k.a. dnet). yading@10: yading@10: The @var{ac3} encoder uses floating-point math, while the @var{ac3_fixed} yading@10: encoder only uses fixed-point integer math. This does not mean that one is yading@10: always faster, just that one or the other may be better suited to a yading@10: particular system. The floating-point encoder will generally produce better yading@10: quality audio for a given bitrate. The @var{ac3_fixed} encoder is not the yading@10: default codec for any of the output formats, so it must be specified explicitly yading@10: using the option @code{-acodec ac3_fixed} in order to use it. yading@10: yading@10: @subsection AC-3 Metadata yading@10: yading@10: The AC-3 metadata options are used to set parameters that describe the audio, yading@10: but in most cases do not affect the audio encoding itself. Some of the options yading@10: do directly affect or influence the decoding and playback of the resulting yading@10: bitstream, while others are just for informational purposes. A few of the yading@10: options will add bits to the output stream that could otherwise be used for yading@10: audio data, and will thus affect the quality of the output. Those will be yading@10: indicated accordingly with a note in the option list below. yading@10: yading@10: These parameters are described in detail in several publicly-available yading@10: documents. yading@10: @itemize yading@10: @item @uref{http://www.atsc.org/cms/standards/a_52-2010.pdf,A/52:2010 - Digital Audio Compression (AC-3) (E-AC-3) Standard} yading@10: @item @uref{http://www.atsc.org/cms/standards/a_54a_with_corr_1.pdf,A/54 - Guide to the Use of the ATSC Digital Television Standard} yading@10: @item @uref{http://www.dolby.com/uploadedFiles/zz-_Shared_Assets/English_PDFs/Professional/18_Metadata.Guide.pdf,Dolby Metadata Guide} yading@10: @item @uref{http://www.dolby.com/uploadedFiles/zz-_Shared_Assets/English_PDFs/Professional/46_DDEncodingGuidelines.pdf,Dolby Digital Professional Encoding Guidelines} yading@10: @end itemize yading@10: yading@10: @subsubsection Metadata Control Options yading@10: yading@10: @table @option yading@10: yading@10: @item -per_frame_metadata @var{boolean} yading@10: Allow Per-Frame Metadata. Specifies if the encoder should check for changing yading@10: metadata for each frame. yading@10: @table @option yading@10: @item 0 yading@10: The metadata values set at initialization will be used for every frame in the yading@10: stream. (default) yading@10: @item 1 yading@10: Metadata values can be changed before encoding each frame. yading@10: @end table yading@10: yading@10: @end table yading@10: yading@10: @subsubsection Downmix Levels yading@10: yading@10: @table @option yading@10: yading@10: @item -center_mixlev @var{level} yading@10: Center Mix Level. The amount of gain the decoder should apply to the center yading@10: channel when downmixing to stereo. This field will only be written to the yading@10: bitstream if a center channel is present. The value is specified as a scale yading@10: factor. There are 3 valid values: yading@10: @table @option yading@10: @item 0.707 yading@10: Apply -3dB gain yading@10: @item 0.595 yading@10: Apply -4.5dB gain (default) yading@10: @item 0.500 yading@10: Apply -6dB gain yading@10: @end table yading@10: yading@10: @item -surround_mixlev @var{level} yading@10: Surround Mix Level. The amount of gain the decoder should apply to the surround yading@10: channel(s) when downmixing to stereo. This field will only be written to the yading@10: bitstream if one or more surround channels are present. The value is specified yading@10: as a scale factor. There are 3 valid values: yading@10: @table @option yading@10: @item 0.707 yading@10: Apply -3dB gain yading@10: @item 0.500 yading@10: Apply -6dB gain (default) yading@10: @item 0.000 yading@10: Silence Surround Channel(s) yading@10: @end table yading@10: yading@10: @end table yading@10: yading@10: @subsubsection Audio Production Information yading@10: Audio Production Information is optional information describing the mixing yading@10: environment. Either none or both of the fields are written to the bitstream. yading@10: yading@10: @table @option yading@10: yading@10: @item -mixing_level @var{number} yading@10: Mixing Level. Specifies peak sound pressure level (SPL) in the production yading@10: environment when the mix was mastered. Valid values are 80 to 111, or -1 for yading@10: unknown or not indicated. The default value is -1, but that value cannot be yading@10: used if the Audio Production Information is written to the bitstream. Therefore, yading@10: if the @code{room_type} option is not the default value, the @code{mixing_level} yading@10: option must not be -1. yading@10: yading@10: @item -room_type @var{type} yading@10: Room Type. Describes the equalization used during the final mixing session at yading@10: the studio or on the dubbing stage. A large room is a dubbing stage with the yading@10: industry standard X-curve equalization; a small room has flat equalization. yading@10: This field will not be written to the bitstream if both the @code{mixing_level} yading@10: option and the @code{room_type} option have the default values. yading@10: @table @option yading@10: @item 0 yading@10: @itemx notindicated yading@10: Not Indicated (default) yading@10: @item 1 yading@10: @itemx large yading@10: Large Room yading@10: @item 2 yading@10: @itemx small yading@10: Small Room yading@10: @end table yading@10: yading@10: @end table yading@10: yading@10: @subsubsection Other Metadata Options yading@10: yading@10: @table @option yading@10: yading@10: @item -copyright @var{boolean} yading@10: Copyright Indicator. Specifies whether a copyright exists for this audio. yading@10: @table @option yading@10: @item 0 yading@10: @itemx off yading@10: No Copyright Exists (default) yading@10: @item 1 yading@10: @itemx on yading@10: Copyright Exists yading@10: @end table yading@10: yading@10: @item -dialnorm @var{value} yading@10: Dialogue Normalization. Indicates how far the average dialogue level of the yading@10: program is below digital 100% full scale (0 dBFS). This parameter determines a yading@10: level shift during audio reproduction that sets the average volume of the yading@10: dialogue to a preset level. The goal is to match volume level between program yading@10: sources. A value of -31dB will result in no volume level change, relative to yading@10: the source volume, during audio reproduction. Valid values are whole numbers in yading@10: the range -31 to -1, with -31 being the default. yading@10: yading@10: @item -dsur_mode @var{mode} yading@10: Dolby Surround Mode. Specifies whether the stereo signal uses Dolby Surround yading@10: (Pro Logic). This field will only be written to the bitstream if the audio yading@10: stream is stereo. Using this option does @b{NOT} mean the encoder will actually yading@10: apply Dolby Surround processing. yading@10: @table @option yading@10: @item 0 yading@10: @itemx notindicated yading@10: Not Indicated (default) yading@10: @item 1 yading@10: @itemx off yading@10: Not Dolby Surround Encoded yading@10: @item 2 yading@10: @itemx on yading@10: Dolby Surround Encoded yading@10: @end table yading@10: yading@10: @item -original @var{boolean} yading@10: Original Bit Stream Indicator. Specifies whether this audio is from the yading@10: original source and not a copy. yading@10: @table @option yading@10: @item 0 yading@10: @itemx off yading@10: Not Original Source yading@10: @item 1 yading@10: @itemx on yading@10: Original Source (default) yading@10: @end table yading@10: yading@10: @end table yading@10: yading@10: @subsection Extended Bitstream Information yading@10: The extended bitstream options are part of the Alternate Bit Stream Syntax as yading@10: specified in Annex D of the A/52:2010 standard. It is grouped into 2 parts. yading@10: If any one parameter in a group is specified, all values in that group will be yading@10: written to the bitstream. Default values are used for those that are written yading@10: but have not been specified. If the mixing levels are written, the decoder yading@10: will use these values instead of the ones specified in the @code{center_mixlev} yading@10: and @code{surround_mixlev} options if it supports the Alternate Bit Stream yading@10: Syntax. yading@10: yading@10: @subsubsection Extended Bitstream Information - Part 1 yading@10: yading@10: @table @option yading@10: yading@10: @item -dmix_mode @var{mode} yading@10: Preferred Stereo Downmix Mode. Allows the user to select either Lt/Rt yading@10: (Dolby Surround) or Lo/Ro (normal stereo) as the preferred stereo downmix mode. yading@10: @table @option yading@10: @item 0 yading@10: @itemx notindicated yading@10: Not Indicated (default) yading@10: @item 1 yading@10: @itemx ltrt yading@10: Lt/Rt Downmix Preferred yading@10: @item 2 yading@10: @itemx loro yading@10: Lo/Ro Downmix Preferred yading@10: @end table yading@10: yading@10: @item -ltrt_cmixlev @var{level} yading@10: Lt/Rt Center Mix Level. The amount of gain the decoder should apply to the yading@10: center channel when downmixing to stereo in Lt/Rt mode. yading@10: @table @option yading@10: @item 1.414 yading@10: Apply +3dB gain yading@10: @item 1.189 yading@10: Apply +1.5dB gain yading@10: @item 1.000 yading@10: Apply 0dB gain yading@10: @item 0.841 yading@10: Apply -1.5dB gain yading@10: @item 0.707 yading@10: Apply -3.0dB gain yading@10: @item 0.595 yading@10: Apply -4.5dB gain (default) yading@10: @item 0.500 yading@10: Apply -6.0dB gain yading@10: @item 0.000 yading@10: Silence Center Channel yading@10: @end table yading@10: yading@10: @item -ltrt_surmixlev @var{level} yading@10: Lt/Rt Surround Mix Level. The amount of gain the decoder should apply to the yading@10: surround channel(s) when downmixing to stereo in Lt/Rt mode. yading@10: @table @option yading@10: @item 0.841 yading@10: Apply -1.5dB gain yading@10: @item 0.707 yading@10: Apply -3.0dB gain yading@10: @item 0.595 yading@10: Apply -4.5dB gain yading@10: @item 0.500 yading@10: Apply -6.0dB gain (default) yading@10: @item 0.000 yading@10: Silence Surround Channel(s) yading@10: @end table yading@10: yading@10: @item -loro_cmixlev @var{level} yading@10: Lo/Ro Center Mix Level. The amount of gain the decoder should apply to the yading@10: center channel when downmixing to stereo in Lo/Ro mode. yading@10: @table @option yading@10: @item 1.414 yading@10: Apply +3dB gain yading@10: @item 1.189 yading@10: Apply +1.5dB gain yading@10: @item 1.000 yading@10: Apply 0dB gain yading@10: @item 0.841 yading@10: Apply -1.5dB gain yading@10: @item 0.707 yading@10: Apply -3.0dB gain yading@10: @item 0.595 yading@10: Apply -4.5dB gain (default) yading@10: @item 0.500 yading@10: Apply -6.0dB gain yading@10: @item 0.000 yading@10: Silence Center Channel yading@10: @end table yading@10: yading@10: @item -loro_surmixlev @var{level} yading@10: Lo/Ro Surround Mix Level. The amount of gain the decoder should apply to the yading@10: surround channel(s) when downmixing to stereo in Lo/Ro mode. yading@10: @table @option yading@10: @item 0.841 yading@10: Apply -1.5dB gain yading@10: @item 0.707 yading@10: Apply -3.0dB gain yading@10: @item 0.595 yading@10: Apply -4.5dB gain yading@10: @item 0.500 yading@10: Apply -6.0dB gain (default) yading@10: @item 0.000 yading@10: Silence Surround Channel(s) yading@10: @end table yading@10: yading@10: @end table yading@10: yading@10: @subsubsection Extended Bitstream Information - Part 2 yading@10: yading@10: @table @option yading@10: yading@10: @item -dsurex_mode @var{mode} yading@10: Dolby Surround EX Mode. Indicates whether the stream uses Dolby Surround EX yading@10: (7.1 matrixed to 5.1). Using this option does @b{NOT} mean the encoder will actually yading@10: apply Dolby Surround EX processing. yading@10: @table @option yading@10: @item 0 yading@10: @itemx notindicated yading@10: Not Indicated (default) yading@10: @item 1 yading@10: @itemx on yading@10: Dolby Surround EX Off yading@10: @item 2 yading@10: @itemx off yading@10: Dolby Surround EX On yading@10: @end table yading@10: yading@10: @item -dheadphone_mode @var{mode} yading@10: Dolby Headphone Mode. Indicates whether the stream uses Dolby Headphone yading@10: encoding (multi-channel matrixed to 2.0 for use with headphones). Using this yading@10: option does @b{NOT} mean the encoder will actually apply Dolby Headphone yading@10: processing. yading@10: @table @option yading@10: @item 0 yading@10: @itemx notindicated yading@10: Not Indicated (default) yading@10: @item 1 yading@10: @itemx on yading@10: Dolby Headphone Off yading@10: @item 2 yading@10: @itemx off yading@10: Dolby Headphone On yading@10: @end table yading@10: yading@10: @item -ad_conv_type @var{type} yading@10: A/D Converter Type. Indicates whether the audio has passed through HDCD A/D yading@10: conversion. yading@10: @table @option yading@10: @item 0 yading@10: @itemx standard yading@10: Standard A/D Converter (default) yading@10: @item 1 yading@10: @itemx hdcd yading@10: HDCD A/D Converter yading@10: @end table yading@10: yading@10: @end table yading@10: yading@10: @subsection Other AC-3 Encoding Options yading@10: yading@10: @table @option yading@10: yading@10: @item -stereo_rematrixing @var{boolean} yading@10: Stereo Rematrixing. Enables/Disables use of rematrixing for stereo input. This yading@10: is an optional AC-3 feature that increases quality by selectively encoding yading@10: the left/right channels as mid/side. This option is enabled by default, and it yading@10: is highly recommended that it be left as enabled except for testing purposes. yading@10: yading@10: @end table yading@10: yading@10: @subsection Floating-Point-Only AC-3 Encoding Options yading@10: yading@10: These options are only valid for the floating-point encoder and do not exist yading@10: for the fixed-point encoder due to the corresponding features not being yading@10: implemented in fixed-point. yading@10: yading@10: @table @option yading@10: yading@10: @item -channel_coupling @var{boolean} yading@10: Enables/Disables use of channel coupling, which is an optional AC-3 feature yading@10: that increases quality by combining high frequency information from multiple yading@10: channels into a single channel. The per-channel high frequency information is yading@10: sent with less accuracy in both the frequency and time domains. This allows yading@10: more bits to be used for lower frequencies while preserving enough information yading@10: to reconstruct the high frequencies. This option is enabled by default for the yading@10: floating-point encoder and should generally be left as enabled except for yading@10: testing purposes or to increase encoding speed. yading@10: @table @option yading@10: @item -1 yading@10: @itemx auto yading@10: Selected by Encoder (default) yading@10: @item 0 yading@10: @itemx off yading@10: Disable Channel Coupling yading@10: @item 1 yading@10: @itemx on yading@10: Enable Channel Coupling yading@10: @end table yading@10: yading@10: @item -cpl_start_band @var{number} yading@10: Coupling Start Band. Sets the channel coupling start band, from 1 to 15. If a yading@10: value higher than the bandwidth is used, it will be reduced to 1 less than the yading@10: coupling end band. If @var{auto} is used, the start band will be determined by yading@10: the encoder based on the bit rate, sample rate, and channel layout. This option yading@10: has no effect if channel coupling is disabled. yading@10: @table @option yading@10: @item -1 yading@10: @itemx auto yading@10: Selected by Encoder (default) yading@10: @end table yading@10: yading@10: @end table yading@10: yading@10: @c man end AUDIO ENCODERS yading@10: yading@10: @chapter Video Encoders yading@10: @c man begin VIDEO ENCODERS yading@10: yading@10: A description of some of the currently available video encoders yading@10: follows. yading@10: yading@10: @section libtheora yading@10: yading@10: Theora format supported through libtheora. yading@10: yading@10: Requires the presence of the libtheora headers and library during yading@10: configuration. You need to explicitly configure the build with yading@10: @code{--enable-libtheora}. yading@10: yading@10: @subsection Options yading@10: yading@10: The following global options are mapped to internal libtheora options yading@10: which affect the quality and the bitrate of the encoded stream. yading@10: yading@10: @table @option yading@10: @item b yading@10: Set the video bitrate, only works if the @code{qscale} flag in yading@10: @option{flags} is not enabled. yading@10: yading@10: @item flags yading@10: Used to enable constant quality mode encoding through the yading@10: @option{qscale} flag, and to enable the @code{pass1} and @code{pass2} yading@10: modes. yading@10: yading@10: @item g yading@10: Set the GOP size. yading@10: yading@10: @item global_quality yading@10: Set the global quality in lambda units, only works if the yading@10: @code{qscale} flag in @option{flags} is enabled. The value is clipped yading@10: in the [0 - 10*@code{FF_QP2LAMBDA}] range, and then multiplied for 6.3 yading@10: to get a value in the native libtheora range [0-63]. A higher value yading@10: corresponds to a higher quality. yading@10: yading@10: For example, to set maximum constant quality encoding with yading@10: @command{ffmpeg}: yading@10: @example yading@10: ffmpeg -i INPUT -flags:v qscale -global_quality:v "10*QP2LAMBDA" -codec:v libtheora OUTPUT.ogg yading@10: @end example yading@10: @end table yading@10: yading@10: @section libvpx yading@10: yading@10: VP8 format supported through libvpx. yading@10: yading@10: Requires the presence of the libvpx headers and library during configuration. yading@10: You need to explicitly configure the build with @code{--enable-libvpx}. yading@10: yading@10: @subsection Options yading@10: yading@10: Mapping from FFmpeg to libvpx options with conversion notes in parentheses. yading@10: yading@10: @table @option yading@10: yading@10: @item threads yading@10: g_threads yading@10: yading@10: @item profile yading@10: g_profile yading@10: yading@10: @item vb yading@10: rc_target_bitrate yading@10: yading@10: @item g yading@10: kf_max_dist yading@10: yading@10: @item keyint_min yading@10: kf_min_dist yading@10: yading@10: @item qmin yading@10: rc_min_quantizer yading@10: yading@10: @item qmax yading@10: rc_max_quantizer yading@10: yading@10: @item bufsize, vb yading@10: rc_buf_sz yading@10: @code{(bufsize * 1000 / vb)} yading@10: yading@10: rc_buf_optimal_sz yading@10: @code{(bufsize * 1000 / vb * 5 / 6)} yading@10: yading@10: @item rc_init_occupancy, vb yading@10: rc_buf_initial_sz yading@10: @code{(rc_init_occupancy * 1000 / vb)} yading@10: yading@10: @item rc_buffer_aggressivity yading@10: rc_undershoot_pct yading@10: yading@10: @item skip_threshold yading@10: rc_dropframe_thresh yading@10: yading@10: @item qcomp yading@10: rc_2pass_vbr_bias_pct yading@10: yading@10: @item maxrate, vb yading@10: rc_2pass_vbr_maxsection_pct yading@10: @code{(maxrate * 100 / vb)} yading@10: yading@10: @item minrate, vb yading@10: rc_2pass_vbr_minsection_pct yading@10: @code{(minrate * 100 / vb)} yading@10: yading@10: @item minrate, maxrate, vb yading@10: @code{VPX_CBR} yading@10: @code{(minrate == maxrate == vb)} yading@10: yading@10: @item crf yading@10: @code{VPX_CQ}, @code{VP8E_SET_CQ_LEVEL} yading@10: yading@10: @item quality yading@10: @table @option yading@10: @item @var{best} yading@10: @code{VPX_DL_BEST_QUALITY} yading@10: @item @var{good} yading@10: @code{VPX_DL_GOOD_QUALITY} yading@10: @item @var{realtime} yading@10: @code{VPX_DL_REALTIME} yading@10: @end table yading@10: yading@10: @item speed yading@10: @code{VP8E_SET_CPUUSED} yading@10: yading@10: @item nr yading@10: @code{VP8E_SET_NOISE_SENSITIVITY} yading@10: yading@10: @item mb_threshold yading@10: @code{VP8E_SET_STATIC_THRESHOLD} yading@10: yading@10: @item slices yading@10: @code{VP8E_SET_TOKEN_PARTITIONS} yading@10: yading@10: @item max-intra-rate yading@10: @code{VP8E_SET_MAX_INTRA_BITRATE_PCT} yading@10: yading@10: @item force_key_frames yading@10: @code{VPX_EFLAG_FORCE_KF} yading@10: yading@10: @item Alternate reference frame related yading@10: @table @option yading@10: @item vp8flags altref yading@10: @code{VP8E_SET_ENABLEAUTOALTREF} yading@10: @item @var{arnr_max_frames} yading@10: @code{VP8E_SET_ARNR_MAXFRAMES} yading@10: @item @var{arnr_type} yading@10: @code{VP8E_SET_ARNR_TYPE} yading@10: @item @var{arnr_strength} yading@10: @code{VP8E_SET_ARNR_STRENGTH} yading@10: @item @var{rc_lookahead} yading@10: g_lag_in_frames yading@10: @end table yading@10: yading@10: @item vp8flags error_resilient yading@10: g_error_resilient yading@10: yading@10: @end table yading@10: yading@10: For more information about libvpx see: yading@10: @url{http://www.webmproject.org/} yading@10: yading@10: @section libx264 yading@10: yading@10: x264 H.264/MPEG-4 AVC encoder wrapper yading@10: yading@10: Requires the presence of the libx264 headers and library during yading@10: configuration. You need to explicitly configure the build with yading@10: @code{--enable-libx264}. yading@10: yading@10: x264 supports an impressive number of features, including 8x8 and 4x4 adaptive yading@10: spatial transform, adaptive B-frame placement, CAVLC/CABAC entropy coding, yading@10: interlacing (MBAFF), lossless mode, psy optimizations for detail retention yading@10: (adaptive quantization, psy-RD, psy-trellis). yading@10: yading@10: The FFmpeg wrapper provides a mapping for most of them using global options yading@10: that match those of the encoders and provides private options for the unique yading@10: encoder options. Additionally an expert override is provided to directly pass yading@10: a list of key=value tuples as accepted by x264_param_parse. yading@10: yading@10: @subsection Option Mapping yading@10: yading@10: The following options are supported by the x264 wrapper, the x264-equivalent yading@10: options follow the FFmpeg ones. yading@10: yading@10: @multitable @columnfractions .2 .2 yading@10: @item b @tab bitrate yading@10: FFmpeg @code{b} option is expressed in bits/s, x264 @code{bitrate} in kilobits/s. yading@10: @item bf @tab bframes yading@10: Maximum number of B-frames. yading@10: @item g @tab keyint yading@10: Maximum GOP size. yading@10: @item qmin @tab qpmin yading@10: @item qmax @tab qpmax yading@10: @item qdiff @tab qpstep yading@10: @item qblur @tab qblur yading@10: @item qcomp @tab qcomp yading@10: @item refs @tab ref yading@10: @item sc_threshold @tab scenecut yading@10: @item trellis @tab trellis yading@10: @item nr @tab nr yading@10: Noise reduction. yading@10: @item me_range @tab merange yading@10: @item me_method @tab me yading@10: @item subq @tab subme yading@10: @item b_strategy @tab b-adapt yading@10: @item keyint_min @tab keyint-min yading@10: @item coder @tab cabac yading@10: Set coder to @code{ac} to use CABAC. yading@10: @item cmp @tab chroma-me yading@10: Set to @code{chroma} to use chroma motion estimation. yading@10: @item threads @tab threads yading@10: @item thread_type @tab sliced_threads yading@10: Set to @code{slice} to use sliced threading instead of frame threading. yading@10: @item flags -cgop @tab open-gop yading@10: Set @code{-cgop} to use recovery points to close GOPs. yading@10: @item rc_init_occupancy @tab vbv-init yading@10: Initial buffer occupancy. yading@10: @end multitable yading@10: yading@10: @subsection Private Options yading@10: @table @option yading@10: @item -preset @var{string} yading@10: Set the encoding preset (cf. x264 --fullhelp). yading@10: @item -tune @var{string} yading@10: Tune the encoding params (cf. x264 --fullhelp). yading@10: @item -profile @var{string} yading@10: Set profile restrictions (cf. x264 --fullhelp). yading@10: @item -fastfirstpass @var{integer} yading@10: Use fast settings when encoding first pass. yading@10: @item -crf @var{float} yading@10: Select the quality for constant quality mode. yading@10: @item -crf_max @var{float} yading@10: In CRF mode, prevents VBV from lowering quality beyond this point. yading@10: @item -qp @var{integer} yading@10: Constant quantization parameter rate control method. yading@10: @item -aq-mode @var{integer} yading@10: AQ method yading@10: yading@10: Possible values: yading@10: @table @samp yading@10: @item none yading@10: yading@10: @item variance yading@10: Variance AQ (complexity mask). yading@10: @item autovariance yading@10: Auto-variance AQ (experimental). yading@10: @end table yading@10: @item -aq-strength @var{float} yading@10: AQ strength, reduces blocking and blurring in flat and textured areas. yading@10: @item -psy @var{integer} yading@10: Use psychovisual optimizations. yading@10: @item -psy-rd @var{string} yading@10: Strength of psychovisual optimization, in : format. yading@10: @item -rc-lookahead @var{integer} yading@10: Number of frames to look ahead for frametype and ratecontrol. yading@10: @item -weightb @var{integer} yading@10: Weighted prediction for B-frames. yading@10: @item -weightp @var{integer} yading@10: Weighted prediction analysis method. yading@10: yading@10: Possible values: yading@10: @table @samp yading@10: @item none yading@10: yading@10: @item simple yading@10: yading@10: @item smart yading@10: yading@10: @end table yading@10: @item -ssim @var{integer} yading@10: Calculate and print SSIM stats. yading@10: @item -intra-refresh @var{integer} yading@10: Use Periodic Intra Refresh instead of IDR frames. yading@10: @item -b-bias @var{integer} yading@10: Influences how often B-frames are used. yading@10: @item -b-pyramid @var{integer} yading@10: Keep some B-frames as references. yading@10: yading@10: Possible values: yading@10: @table @samp yading@10: @item none yading@10: yading@10: @item strict yading@10: Strictly hierarchical pyramid. yading@10: @item normal yading@10: Non-strict (not Blu-ray compatible). yading@10: @end table yading@10: @item -mixed-refs @var{integer} yading@10: One reference per partition, as opposed to one reference per macroblock. yading@10: @item -8x8dct @var{integer} yading@10: High profile 8x8 transform. yading@10: @item -fast-pskip @var{integer} yading@10: @item -aud @var{integer} yading@10: Use access unit delimiters. yading@10: @item -mbtree @var{integer} yading@10: Use macroblock tree ratecontrol. yading@10: @item -deblock @var{string} yading@10: Loop filter parameters, in form. yading@10: @item -cplxblur @var{float} yading@10: Reduce fluctuations in QP (before curve compression). yading@10: @item -partitions @var{string} yading@10: A comma-separated list of partitions to consider, possible values: p8x8, p4x4, b8x8, i8x8, i4x4, none, all. yading@10: @item -direct-pred @var{integer} yading@10: Direct MV prediction mode yading@10: yading@10: Possible values: yading@10: @table @samp yading@10: @item none yading@10: yading@10: @item spatial yading@10: yading@10: @item temporal yading@10: yading@10: @item auto yading@10: yading@10: @end table yading@10: @item -slice-max-size @var{integer} yading@10: Limit the size of each slice in bytes. yading@10: @item -stats @var{string} yading@10: Filename for 2 pass stats. yading@10: @item -nal-hrd @var{integer} yading@10: Signal HRD information (requires vbv-bufsize; cbr not allowed in .mp4). yading@10: yading@10: Possible values: yading@10: @table @samp yading@10: @item none yading@10: yading@10: @item vbr yading@10: yading@10: @item cbr yading@10: yading@10: @end table yading@10: yading@10: @item x264opts @var{options} yading@10: Allow to set any x264 option, see @code{x264 --fullhelp} for a list. yading@10: yading@10: @var{options} is a list of @var{key}=@var{value} couples separated by yading@10: ":". In @var{filter} and @var{psy-rd} options that use ":" as a separator yading@10: themselves, use "," instead. They accept it as well since long ago but this yading@10: is kept undocumented for some reason. yading@10: yading@10: For example to specify libx264 encoding options with @command{ffmpeg}: yading@10: @example yading@10: ffmpeg -i foo.mpg -vcodec libx264 -x264opts keyint=123:min-keyint=20 -an out.mkv yading@10: @end example yading@10: yading@10: For more information about libx264 and the supported options see: yading@10: @url{http://www.videolan.org/developers/x264.html} yading@10: yading@10: @item -x264-params @var{string} yading@10: Override the x264 configuration using a :-separated list of key=value parameters. yading@10: @example yading@10: -x264-params level=30:bframes=0:weightp=0:cabac=0:ref=1:vbv-maxrate=768:vbv-bufsize=2000:analyse=all:me=umh:no-fast-pskip=1:subq=6:8x8dct=0:trellis=0 yading@10: @end example yading@10: @end table yading@10: yading@10: Encoding avpresets for common usages are provided so they can be used with the yading@10: general presets system (e.g. passing the @code{-pre} option). yading@10: yading@10: @section ProRes yading@10: yading@10: Apple ProRes encoder. yading@10: yading@10: FFmpeg contains 2 ProRes encoders, the prores-aw and prores-ks encoder. yading@10: The used encoder can be choosen with the @code{-vcodec} option. yading@10: yading@10: @subsection Private Options for prores-ks yading@10: yading@10: @table @option yading@10: @item profile @var{integer} yading@10: Select the ProRes profile to encode yading@10: @table @samp yading@10: @item proxy yading@10: @item lt yading@10: @item standard yading@10: @item hq yading@10: @end table yading@10: yading@10: @item quant_mat @var{integer} yading@10: Select quantization matrix. yading@10: @table @samp yading@10: @item auto yading@10: @item default yading@10: @item proxy yading@10: @item lt yading@10: @item standard yading@10: @item hq yading@10: @end table yading@10: If set to @var{auto}, the matrix matching the profile will be picked. yading@10: If not set, the matrix providing the highest quality, @var{default}, will be yading@10: picked. yading@10: yading@10: @item bits_per_mb @var{integer} yading@10: How many bits to allot for coding one macroblock. Different profiles use yading@10: between 200 and 2400 bits per macroblock, the maximum is 8000. yading@10: yading@10: @item mbs_per_slice @var{integer} yading@10: Number of macroblocks in each slice (1-8); the default value (8) yading@10: should be good in almost all situations. yading@10: yading@10: @item vendor @var{string} yading@10: Override the 4-byte vendor ID. yading@10: A custom vendor ID like @var{apl0} would claim the stream was produced by yading@10: the Apple encoder. yading@10: yading@10: @end table yading@10: yading@10: @subsection Speed considerations yading@10: yading@10: In the default mode of operation the encoder has to honor frame constraints yading@10: (i.e. not produc frames with size bigger than requested) while still making yading@10: output picture as good as possible. yading@10: A frame containing a lot of small details is harder to compress and the encoder yading@10: would spend more time searching for appropriate quantizers for each slice. yading@10: yading@10: Setting a higher @option{bits_per_mb} limit will improve the speed. yading@10: yading@10: For the fastest encoding speed set the @option{qscale} parameter (4 is the yading@10: recommended value) and do not set a size constraint. yading@10: yading@10: @c man end VIDEO ENCODERS