man > ffmpeg-codecs(1)

๐Ÿ“– NAME

ffmpeg-codecs - FFmpeg codecs

๐Ÿš€ Quick Reference

Use CaseCommandDescription
๐Ÿ“‹ List all decodersffmpeg -decodersDisplay all enabled decoders
๐Ÿ“‹ List all encodersffmpeg -encodersDisplay all enabled encoders
๐ŸŽฌ Use a specific video codec-c:v libx264Select H.264 encoder
๐ŸŽต Use a specific audio codec-c:a aacSelect AAC encoder
๐Ÿ“Š Set video bitrate-b:v 2000kTarget video bitrate in bits/s
๐Ÿ“Š Set audio bitrate-b:a 128kTarget audio bitrate in bits/s
โญ Set video quality (VBR)-q:v 5Constant quality encoding (0-10, higher=better)
โญ Set CRF quality (x264/x265)-crf 23Constant Rate Factor (0-51, lower=better)
๐Ÿ–ผ๏ธ Set GOP size-g 48Keyframe interval in frames
โš™๏ธ Set encoder preset-preset mediumSpeed/quality tradeoff (ultrafast to placebo)
โš™๏ธ Set encoder profile-profile:v highProfile restrictions for codec
๐Ÿ”„ Set pixel format-pix_fmt yuv420pColor space and subsampling
๐Ÿ“ Set frame size-s 1920x1080Output video resolution
โฑ๏ธ Set frame rate-r 30Output frames per second
๐ŸŽ›๏ธ 2-pass encoding (pass 1)-flags +pass1First pass: analyze video
๐ŸŽ›๏ธ 2-pass encoding (pass 2)-flags +pass2Second pass: use analysis data
๐Ÿ”‡ Disable audio-anNo audio output
๐Ÿ–ผ๏ธ Disable video-vnNo video output

๐Ÿ“ Description

This document describes the codecs (decoders and encoders) provided by the libavcodec library.

โš™๏ธ Codec Options

libavcodec provides some generic global options, which can be set on all the encoders and decoders. In addition each codec may support so-called private options, which are specific for a given codec.

Sometimes, a global option may only affect a specific kind of codec, and may be nonsensical or ignored by another, so you need to be aware of the meaning of the specified options. Also some options are meant only for decoding or encoding.

Options may be set by specifying -option value in the FFmpeg tools, or by setting the value explicitly in the AVCodecContext options or using the libavutil/opt.h API for programmatic use.

๐Ÿ“Š Bitrate Options

๐Ÿท๏ธ Flags

flags flags (decoding/encoding,audio,video,subtitles) โ€” Set generic flags.

โฑ๏ธ Time / Frame Options

๐ŸŽฏ Quantization Options

๐Ÿ› Bug Workarounds

bug flags (decoding,video) โ€” Workaround not auto detected encoder bugs.

๐Ÿ“ Strictness

strict integer (decoding/encoding,audio,video) โ€” Specify how strictly to follow the standards.

๐Ÿ” Error Detection

err_detect flags (decoding,audio,video) โ€” Set error detection flags.

๐Ÿงฎ Quantization / DCT

๐Ÿ›ก๏ธ Error Concealment

ec flags (decoding,video) โ€” Set error concealment strategy.

๐Ÿ”ฌ Debug Options

debug flags (decoding/encoding,audio,video,subtitles) โ€” Print specific debug info.

๐Ÿ“ Comparison Functions

The following options accept comparison function values: cmp, subcmp, mbcmp, ildctcmp, precmp, skipcmp (all integer, encoding,video).

๐Ÿ” Motion Estimation

๐Ÿ“ฆ Encoder Settings

๐Ÿท๏ธ flags2

flags2 flags (decoding/encoding,audio,video,subtitles)

๐Ÿ“ค export_side_data

export_side_data flags (decoding/encoding,audio,video,subtitles)

๐Ÿงต Threading

๐ŸŽจ Color / Video Properties

๐ŸŽจ Color Properties

color_primaries integer (decoding/encoding,video)

color_trc integer (decoding/encoding,video)

colorspace integer (decoding/encoding,video)

color_range integer (decoding/encoding,video)

chroma_sample_location integer (decoding/encoding,video)

๐Ÿ”Š Audio Service

audio_service_type integer (encoding,audio)

๐Ÿ“ฅ Input Options

๐Ÿ“‹ Frame Skip Options

skip_loop_filter, skip_idct, skip_frame integer (decoding,video)

Default: default.

๐Ÿ“œ Log Level

log_level_offset integer โ€” Set the log level offset.

๐ŸŽฌ Decoders

Decoders are configured elements in FFmpeg which allow the decoding of multimedia streams.

When you configure your FFmpeg build, all the supported native decoders are enabled by default. Decoders requiring an external library must be enabled manually via the corresponding --enable-lib option. You can list all available decoders using the configure option --list-decoders.

You can disable all the decoders with --disable-decoders and selectively enable/disable single decoders with --enable-decoder=DECODER / --disable-decoder=DECODER.

The option -decoders of the ff* tools will display the list of enabled decoders.

๐Ÿ–ผ๏ธ Video Decoders

๐ŸŽž๏ธ av1

AOMedia Video 1 (AV1) decoder.

Options

๐ŸŽž๏ธ rawvideo

Raw video decoder.

Options

๐ŸŽž๏ธ libdav1d

dav1d AV1 decoder. Requires --enable-libdav1d.

Options

๐ŸŽž๏ธ libdavs2

AVS2-P2/IEEE1857.4 video decoder wrapper.

๐ŸŽž๏ธ libuavs3d

AVS3-P2/IEEE1857.10 video decoder. Requires --enable-libuavs3d.

Options

๐Ÿ”Š Audio Decoders

๐ŸŽต ac3

AC-3 audio decoder (ATSC A/52:2010, ETSI TS 102 366, RealAudio 3).

Options

๐ŸŽต flac

FLAC audio decoder.

Options

๐ŸŽต ffwavesynth

Internal wave synthesizer. Internal use only, format not publicly documented.

๐ŸŽต libcelt

libcelt decoder wrapper. Requires --enable-libcelt.

๐ŸŽต libgsm

libgsm decoder wrapper. Requires --enable-libgsm. Supports both ordinary GSM and Microsoft variant.

๐ŸŽต libilbc

libilbc decoder wrapper. Requires --enable-libilbc.

Options

๐ŸŽต libopencore-amrnb

libopencore-amrnb decoder wrapper. Requires --enable-libopencore-amrnb. Native AMR-NB decoder also exists.

๐ŸŽต libopencore-amrwb

libopencore-amrwb decoder wrapper. Requires --enable-libopencore-amrwb. Native AMR-WB decoder also exists.

๐ŸŽต libopus

libopus decoder wrapper. Requires --enable-libopus. Native Opus decoder also exists.

๐Ÿ“ Subtitles Decoders

๐Ÿ“บ libaribb24

ARIB STD-B24 caption decoder (profiles A and C).

Options

๐Ÿ“บ dvbsub

Options

๐Ÿ“บ dvdsub

Decodes bitmap subtitles used in DVDs, VobSub, and Matroska.

Options

๐Ÿ“บ libzvbi-teletext

DVB teletext decoder. Requires --enable-libzvbi.

Options

๐ŸŽฌ Encoders

Encoders are configured elements in FFmpeg which allow the encoding of multimedia streams.

When you configure your FFmpeg build, all the supported native encoders are enabled by default. Encoders requiring an external library must be enabled manually via the corresponding --enable-lib option. You can list all available encoders using the configure option --list-encoders.

You can disable all the encoders with --disable-encoders and selectively enable/disable single encoders with --enable-encoder=ENCODER / --disable-encoder=ENCODER.

The option -encoders of the ff* tools will display the list of enabled encoders.

๐Ÿ”Š Audio Encoders

๐ŸŽต aac

Advanced Audio Coding (AAC) encoder. Native FFmpeg implementation.

Options

๐ŸŽต ac3 and ac3_fixed

AC-3 audio encoders. ac3 uses floating-point, ac3_fixed uses fixed-point integer math.

Metadata Control Options

Downmix Levels

Audio Production Information

Other Metadata

Extended Bitstream Information - Part 1

Extended Bitstream Information - Part 2

Other AC-3 Encoding Options

Floating-Point-Only Options

๐ŸŽต flac

FLAC (Free Lossless Audio Codec) Encoder.

Options

๐ŸŽต opus

Native FFmpeg Opus encoder. Currently only implements CELT part. Quality is usually worse or equal to libopus.

Options

๐ŸŽต libfdk_aac

libfdk-aac AAC encoder wrapper. Requires --enable-libfdk-aac. Incompatible with GPL.

Options

VBR bit rates (approximate): 1=32, 2=40, 3=48-56, 4=64, 5=80-96 kbps/channel.

Examples

ffmpeg -i input.wav -codec:a libfdk_aac -vbr 3 output.m4a
ffmpeg -i input.wav -c:a libfdk_aac -profile:a aac_he -b:a 64k output.m4a

๐ŸŽต libmp3lame

LAME MP3 encoder wrapper. Requires --enable-libmp3lame.

Options

๐ŸŽต libopencore-amrnb

OpenCORE Adaptive Multi-Rate Narrowband encoder. Requires --enable-libopencore-amrnb --enable-version3. Mono-only, 8000Hz officially (override with strict unofficial).

Options

๐ŸŽต libopus

libopus Opus encoder wrapper. Requires --enable-libopus.

Options

๐ŸŽต libshine

Shine Fixed-Point MP3 encoder wrapper. Requires --enable-libshine. Stereo/mono only, CBR-only.

Options

๐ŸŽต libtwolame

TwoLAME MP2 encoder wrapper. Requires --enable-libtwolame.

Options

๐ŸŽต libvo-amrwbenc

VisualOn Adaptive Multi-Rate Wideband encoder. Requires --enable-libvo-amrwbenc --enable-version3. Mono-only, 16000Hz officially (override with strict unofficial).

Options

๐ŸŽต libvorbis

libvorbis encoder wrapper. Requires --enable-libvorbis.

Options

๐ŸŽต mjpeg

Motion JPEG encoder.

Options

๐ŸŽต wavpack

WavPack lossless audio encoder.

Options

๐Ÿ–ผ๏ธ Video Encoders

๐ŸŽž๏ธ GIF

GIF image/animation encoder.

Options

๐ŸŽž๏ธ Hap

Vidvox Hap video encoder.

Options

๐ŸŽž๏ธ jpeg2000

Native JPEG 2000 encoder. Lossy by default (-q:v for quality). Lossless: -pred 1.

Options

ffmpeg -i input.bmp -c:v jpeg2000 -layer_rates "100,10,1" output.j2k

๐ŸŽž๏ธ librav1e

rav1e AV1 encoder wrapper. Requires --enable-librav1e.

Options

ffmpeg -i input -c:v librav1e -b:v 500K -rav1e-params speed=5:low_latency=true output.mp4

๐ŸŽž๏ธ libaom-av1

libaom AV1 encoder wrapper. Requires --enable-libaom.

Options

ffmpeg -i input -c:v libaom-av1 -b:v 500K -aom-params tune=psnr:enable-tpl-model=1 output.mp4

๐ŸŽž๏ธ libsvtav1

SVT-AV1 encoder wrapper. Requires --enable-libsvtav1.

Options

๐ŸŽž๏ธ libkvazaar

Kvazaar H.265/HEVC encoder. Requires --enable-libkvazaar.

Options

๐ŸŽž๏ธ libopenh264

Cisco libopenh264 H.264/MPEG-4 AVC encoder wrapper. Requires --enable-libopenh264.

Options

๐ŸŽž๏ธ libtheora

libtheora Theora encoder wrapper. Requires --enable-libtheora.

Options

Examples

ffmpeg -i INPUT -codec:v libtheora -q:v 10 OUTPUT.ogg
ffmpeg -i INPUT -codec:v libtheora -b:v 1000k OUTPUT.ogg

๐ŸŽž๏ธ libvpx

VP8/VP9 encoder wrapper. Requires --enable-libvpx.

Options

VP9-specific Options

๐ŸŽž๏ธ libwebp

libwebp WebP Image encoder wrapper. Supports YUV420 (lossy) and RGB (lossless).

Options

๐ŸŽž๏ธ libx264, libx264rgb

x264 H.264/MPEG-4 AVC encoder wrapper. Requires --enable-libx264. libx264rgb accepts packed RGB input.

Options

Examples

ffmpeg -i foo.mpg -c:v libx264 -x264opts keyint=123:min-keyint=20 -an out.mkv
ffmpeg -i INPUT -c:v libx264 -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 OUTPUT

๐ŸŽž๏ธ libx265

x265 H.265/HEVC encoder wrapper. Requires --enable-libx265.

Options

ffmpeg -i input -c:v libx265 -x265-params crf=26:psy-rd=1 output.mp4

๐ŸŽž๏ธ libxavs2

xavs2 AVS2-P2/IEEE1857.4 encoder wrapper. Requires --enable-libxavs2.

Options

ffmpeg -i input -c:v libxavs2 -xavs2-params RdoqLevel=0 output.avs2

๐ŸŽž๏ธ libxvid

Xvid MPEG-4 Part 2 encoder wrapper. Requires --enable-libxvid --enable-gpl.

Options

๐ŸŽž๏ธ MediaFoundation

Wrappers to encoders in the MediaFoundation framework (SW and HW). Video encoders accept nv12 or yuv420p.

๐ŸŽž๏ธ mpeg2

MPEG-2 video encoder.

Options

๐ŸŽž๏ธ png

PNG image encoder.

Options

๐ŸŽž๏ธ ProRes

Apple ProRes encoder (prores-aw and prores-ks).

Options (prores-ks)

๐ŸŽž๏ธ QSV encoders

Intel QuickSync Video encoders (MPEG-2, H.264, HEVC, JPEG/MJPEG, VP9).

Rate control modes: CQP (with qscale), LA_ICQ (with look_ahead), ICQ, LA (with look_ahead), VCM (with vcm), CBR (maxrate=avg), VBR (maxrate>avg), AVBR (no maxrate).

Mapped options: g/gop_size โ†’ GopPicSize, bf/max_b_frames+1 โ†’ GopRefDist, slices โ†’ NumSlice, refs โ†’ NumRefFrame, coder vlc โ†’ CAVLC.

๐ŸŽž๏ธ snow

Options

๐ŸŽž๏ธ VAAPI encoders

Wrappers for hardware encoders via VAAPI. Input must be in VAAPI hardware surfaces (use hwupload filter).

Common options: g/gop_size, bf/max_b_frames, profile, level, b/bit_rate, maxrate/rc_max_rate, bufsize/rc_buffer_size, compression_level, q/global_quality, qmin/qmax, i_qfactor/b_qfactor, slices.

All encoders support:

h264_vaapi: coder (ac/cabac, vlc/cavlc), aud, sei (identifier, timing, recovery_point)

hevc_vaapi: aud, tier, sei (hdr), tiles

mjpeg_vaapi: jfif, huffman

mpeg2_vaapi: profile, level

vp8_vaapi: loop_filter_level, loop_filter_sharpness

vp9_vaapi: loop_filter_level, loop_filter_sharpness

๐ŸŽž๏ธ vc2

SMPTE VC-2 (BBC Dirac Pro). Supports yuv420, yuv422, yuv444 at 8/10/12 bits.

Options

๐Ÿ“ Subtitles Encoders

๐Ÿ“บ dvdsub

Encodes bitmap subtitle format used in DVDs (VOBSUB, Matroska).

Options

๐Ÿ“š See Also

ffmpeg(1), ffplay(1), ffprobe(1), libavcodec(3)

๐Ÿ‘ฅ Authors

The FFmpeg developers.

For details about the authorship, see the Git history of the project (git://source.ffmpeg.org/ffmpeg), e.g. by typing git log in the FFmpeg source directory, or browsing the online repository at http://source.ffmpeg.org.

Maintainers for the specific components are listed in the file MAINTAINERS in the source code tree.

ffmpeg-codecs(1)
๐Ÿ“– NAME ๐Ÿš€ Quick Reference ๐Ÿ“ Description โš™๏ธ Codec Options
๐Ÿ“Š Bitrate Options ๐Ÿท๏ธ Flags โฑ๏ธ Time / Frame Options ๐ŸŽฏ Quantization Options ๐Ÿ› Bug Workarounds ๐Ÿ“ Strictness ๐Ÿ” Error Detection ๐Ÿงฎ Quantization / DCT ๐Ÿ›ก๏ธ Error Concealment ๐Ÿ”ฌ Debug Options ๐Ÿ“ Comparison Functions ๐Ÿ” Motion Estimation ๐Ÿ“ฆ Encoder Settings ๐Ÿท๏ธ flags2 ๐Ÿ“ค export_side_data ๐Ÿงต Threading ๐ŸŽจ Color / Video Properties ๐ŸŽจ Color Properties ๐Ÿ”Š Audio Service ๐Ÿ“ฅ Input Options ๐Ÿ“‹ Frame Skip Options ๐Ÿ“œ Log Level
๐ŸŽฌ Decoders
๐Ÿ–ผ๏ธ Video Decoders ๐Ÿ”Š Audio Decoders ๐Ÿ“ Subtitles Decoders
๐ŸŽฌ Encoders
๐Ÿ”Š Audio Encoders ๐Ÿ–ผ๏ธ Video Encoders ๐Ÿ“ Subtitles Encoders
๐Ÿ“š See Also ๐Ÿ‘ฅ Authors

Generated by phpman v4.10.0-7-g98e9fd5 · Markdown · JSON · MCP Author: Che Dong Under GNU General Public License
2026-09-03 16:35 @216.73.216.51
CrawledBy Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
Valid XHTML 1.0 Transitional!Valid CSS!

^_top_^