Skip to content

encoders

FFmpeg encoders.

Functions:

Name Description
a64multi

Multicolor charset for Commodore 64 (codec a64_multi).

a64multi5

Multicolor charset for Commodore 64, extended with 5th color (colram) (codec a64_multi5).

aac

AAC (Advanced Audio Coding).

ac3

ATSC A/52A (AC-3).

ac3_fixed

ATSC A/52A (AC-3) (codec ac3).

adpcm_adx

SEGA CRI ADX ADPCM.

adpcm_argo

ADPCM Argonaut Games.

adpcm_ima_alp

ADPCM IMA High Voltage Software ALP.

adpcm_ima_amv

ADPCM IMA AMV.

adpcm_ima_apm

ADPCM IMA Ubisoft APM.

adpcm_ima_qt

ADPCM IMA QuickTime.

adpcm_ima_ssi

ADPCM IMA Simon & Schuster Interactive.

adpcm_ima_wav

ADPCM IMA WAV.

adpcm_ima_ws

ADPCM IMA Westwood.

adpcm_ms

ADPCM Microsoft.

adpcm_swf

ADPCM Shockwave Flash.

adpcm_yamaha

ADPCM Yamaha.

alac

ALAC (Apple Lossless Audio Codec).

alias_pix

Alias/Wavefront PIX image.

amv

AMV Video.

anull

Null audio.

apng

APNG (Animated Portable Network Graphics) image.

aptx

AptX (Audio Processing Technology for Bluetooth).

aptx_hd

AptX HD (Audio Processing Technology for Bluetooth).

ass

ASS (Advanced SubStation Alpha) subtitle.

asv1

ASUS V1.

asv2

ASUS V2.

av1_nvenc

NVIDIA NVENC av1 encoder (codec av1).

av1_vaapi

AV1 (VAAPI) (codec av1).

avrp

Avid 1:1 10-bit RGB Packer.

avui

Avid Meridien Uncompressed.

ayuv

Uncompressed packed MS 4:4:4:4.

bitpacked

Bitpacked.

bmp

BMP (Windows and OS/2 bitmap).

cfhd

GoPro CineForm HD.

cinepak

Cinepak.

cljr

Cirrus Logic AccuPak.

comfortnoise

RFC 3389 comfort noise generator.

dca

DCA (DTS Coherent Acoustics) (codec dts).

dfpwm

DFPWM1a audio.

dnxhd

VC3/DNxHD.

dpx

DPX (Digital Picture Exchange) image.

dvbsub

DVB subtitles (codec dvb_subtitle).

dvdsub

DVD subtitles (codec dvd_subtitle).

dvvideo

DV (Digital Video).

eac3

ATSC A/52 E-AC-3.

exr

OpenEXR image.

ffv1

FFmpeg video codec #1.

ffvhuff

Huffyuv FFmpeg variant.

fits

Flexible Image Transport System.

flac

FLAC (Free Lossless Audio Codec).

flashsv

Flash Screen Video.

flashsv2

Flash Screen Video Version 2.

flv

FLV / Sorenson Spark / Sorenson H.263 (Flash Video) (codec flv1).

g722

G.722 ADPCM (codec adpcm_g722).

g723_1

G.723.1.

g726

G.726 ADPCM (codec adpcm_g726).

g726le

G.726 little endian ADPCM ("right-justified") (codec adpcm_g726le).

gif

GIF (Graphics Interchange Format).

h261

H.261.

h263

H.263 / H.263-1996.

h263_v4l2m2m

V4L2 mem2mem H.263 encoder wrapper (codec h263).

h263p

H.263+ / H.263-1998 / H.263 version 2.

h264_nvenc

NVIDIA NVENC H.264 encoder (codec h264).

h264_v4l2m2m

V4L2 mem2mem H.264 encoder wrapper (codec h264).

h264_vaapi

H.264/AVC (VAAPI) (codec h264).

hap

Vidvox Hap.

hdr

HDR (Radiance RGBE format) image.

hevc_nvenc

NVIDIA NVENC hevc encoder (codec hevc).

hevc_v4l2m2m

V4L2 mem2mem HEVC encoder wrapper (codec hevc).

hevc_vaapi

H.265/HEVC (VAAPI) (codec hevc).

huffyuv

Huffyuv / HuffYUV.

jpeg2000

JPEG 2000.

jpegls

JPEG-LS.

libcodec2

codec2 encoder using libcodec2 (codec codec2).

libgsm

Libgsm GSM (codec gsm).

libgsm_ms

Libgsm GSM Microsoft variant (codec gsm_ms).

libjxl

Libjxl JPEG XL (codec jpegxl).

libmp3lame

libmp3lame MP3 (MPEG audio layer 3) (codec mp3).

libopenjpeg

OpenJPEG JPEG 2000 (codec jpeg2000).

libopus

Libopus Opus (codec opus).

librav1e

librav1e AV1 (codec av1).

libshine

Libshine MP3 (MPEG audio layer 3) (codec mp3).

libspeex

Libspeex Speex (codec speex).

libsvtav1

SVT-AV1(Scalable Video Technology for AV1) encoder (codec av1).

libtheora

Libtheora Theora (codec theora).

libtwolame

Libtwolame MP2 (MPEG audio layer 2) (codec mp2).

libvorbis

Libvorbis (codec vorbis).

libvpx

Libvpx VP8 (codec vp8).

libwebp

Libwebp WebP image (codec webp).

libwebp_anim

Libwebp WebP image (codec webp).

libx264

libx264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 (codec h264).

libx264rgb

libx264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 RGB (codec h264).

libx265

libx265 H.265 / HEVC (codec hevc).

libxvid

Libxvidcore MPEG-4 part 2 (codec mpeg4).

ljpeg

Lossless JPEG.

magicyuv

MagicYUV video.

mjpeg

MJPEG (Motion JPEG).

mjpeg_vaapi

MJPEG (VAAPI) (codec mjpeg).

mlp

MLP (Meridian Lossless Packing).

mov_text

3GPP Timed Text subtitle.

mp2

MP2 (MPEG audio layer 2).

mp2fixed

MP2 fixed point (MPEG audio layer 2) (codec mp2).

mpeg1video

MPEG-1 video.

mpeg2_vaapi

MPEG-2 (VAAPI) (codec mpeg2video).

mpeg2video

MPEG-2 video.

mpeg4

MPEG-4 part 2.

mpeg4_v4l2m2m

V4L2 mem2mem MPEG4 encoder wrapper (codec mpeg4).

msmpeg4

MPEG-4 part 2 Microsoft variant version 3 (codec msmpeg4v3).

msmpeg4v2

MPEG-4 part 2 Microsoft variant version 2.

msrle

Microsoft RLE.

msvideo1

Microsoft Video-1.

nellymoser

Nellymoser Asao.

opus

Opus.

pam

PAM (Portable AnyMap) image.

pbm

PBM (Portable BitMap) image.

pcm_alaw

PCM A-law / G.711 A-law.

pcm_bluray

PCM signed 16|20|24-bit big-endian for Blu-ray media.

pcm_dvd

PCM signed 16|20|24-bit big-endian for DVD media.

pcm_f32be

PCM 32-bit floating point big-endian.

pcm_f32le

PCM 32-bit floating point little-endian.

pcm_f64be

PCM 64-bit floating point big-endian.

pcm_f64le

PCM 64-bit floating point little-endian.

pcm_mulaw

PCM mu-law / G.711 mu-law.

pcm_s16be

PCM signed 16-bit big-endian.

pcm_s16be_planar

PCM signed 16-bit big-endian planar.

pcm_s16le

PCM signed 16-bit little-endian.

pcm_s16le_planar

PCM signed 16-bit little-endian planar.

pcm_s24be

PCM signed 24-bit big-endian.

pcm_s24daud

PCM D-Cinema audio signed 24-bit.

pcm_s24le

PCM signed 24-bit little-endian.

pcm_s24le_planar

PCM signed 24-bit little-endian planar.

pcm_s32be

PCM signed 32-bit big-endian.

pcm_s32le

PCM signed 32-bit little-endian.

pcm_s32le_planar

PCM signed 32-bit little-endian planar.

pcm_s64be

PCM signed 64-bit big-endian.

pcm_s64le

PCM signed 64-bit little-endian.

pcm_s8

PCM signed 8-bit.

pcm_s8_planar

PCM signed 8-bit planar.

pcm_u16be

PCM unsigned 16-bit big-endian.

pcm_u16le

PCM unsigned 16-bit little-endian.

pcm_u24be

PCM unsigned 24-bit big-endian.

pcm_u24le

PCM unsigned 24-bit little-endian.

pcm_u32be

PCM unsigned 32-bit big-endian.

pcm_u32le

PCM unsigned 32-bit little-endian.

pcm_u8

PCM unsigned 8-bit.

pcm_vidc

PCM Archimedes VIDC.

pcx

PC Paintbrush PCX image.

pfm

PFM (Portable FloatMap) image.

pgm

PGM (Portable GrayMap) image.

pgmyuv

PGMYUV (Portable GrayMap YUV) image.

phm

PHM (Portable HalfFloatMap) image.

png

PNG (Portable Network Graphics) image.

ppm

PPM (Portable PixelMap) image.

prores

Apple ProRes.

prores_aw

Apple ProRes (codec prores).

prores_ks

Apple ProRes (iCodec Pro) (codec prores).

qoi

QOI (Quite OK Image format) image.

qtrle

QuickTime Animation (RLE) video.

r10k

AJA Kona 10-bit RGB Codec.

r210

Uncompressed RGB 10-bit.

rawvideo

Raw video.

real_144

RealAudio 1.0 (14.4K) (codec ra_144).

roq_dpcm

Id RoQ DPCM.

roqvideo

Id RoQ video (codec roq).

rpza

QuickTime video (RPZA).

rv10

RealVideo 1.0.

rv20

RealVideo 2.0.

s302m

SMPTE 302M.

sbc

SBC (low-complexity subband codec).

sgi

SGI image.

smc

QuickTime Graphics (SMC).

snow

Snow.

sonic

Sonic.

sonicls

Sonic lossless.

speedhq

NewTek SpeedHQ.

srt

SubRip subtitle (codec subrip).

ssa

ASS (Advanced SubStation Alpha) subtitle (codec ass).

subrip

SubRip subtitle.

sunrast

Sun Rasterfile image.

svq1

Sorenson Vector Quantizer 1 / Sorenson Video 1 / SVQ1.

targa

Truevision Targa image.

text

Raw text subtitle.

tiff

TIFF image.

truehd

TrueHD.

tta

TTA (True Audio).

ttml

TTML subtitle.

utvideo

Ut Video.

v210

Uncompressed 4:2:2 10-bit.

v308

Uncompressed packed 4:4:4.

v408

Uncompressed packed QT 4:4:4:4.

v410

Uncompressed 4:4:4 10-bit.

vbn

Vizrt Binary Image.

vc2

SMPTE VC-2 (codec dirac).

vnull

Null video.

vorbis

Vorbis.

vp8_v4l2m2m

V4L2 mem2mem VP8 encoder wrapper (codec vp8).

vp8_vaapi

VP8 (VAAPI) (codec vp8).

vp9_vaapi

VP9 (VAAPI) (codec vp9).

wavpack

WavPack.

wbmp

WBMP (Wireless Application Protocol Bitmap) image.

webvtt

WebVTT subtitle.

wmav1

Windows Media Audio 1.

wmav2

Windows Media Audio 2.

wmv1

Windows Media Video 7.

wmv2

Windows Media Video 8.

wrapped_avframe

AVFrame to AVPacket passthrough.

xbm

XBM (X BitMap) image.

xface

X-face image.

xsub

DivX subtitles (XSUB).

xwd

XWD (X Window Dump) image.

y41p

Uncompressed YUV 4:1:1 12-bit.

yuv4

Uncompressed packed 4:2:0.

zlib

LCL (LossLess Codec Library) ZLIB.

zmbv

Zip Motion Blocks Video.

a64multi

a64multi() -> FFMpegEncoderOption

Multicolor charset for Commodore 64 (codec a64_multi).

Returns:

Type Description
FFMpegEncoderOption

the set codec options

a64multi5

a64multi5() -> FFMpegEncoderOption

Multicolor charset for Commodore 64, extended with 5th color (colram) (codec a64_multi5).

Returns:

Type Description
FFMpegEncoderOption

the set codec options

aac

aac(
    aac_coder: (
        int | None | Literal["anmr", "twoloop", "fast"]
    ) = None,
    aac_ms: bool | None = None,
    aac_is: bool | None = None,
    aac_pns: bool | None = None,
    aac_tns: bool | None = None,
    aac_ltp: bool | None = None,
    aac_pred: bool | None = None,
    aac_pce: bool | None = None,
) -> FFMpegEncoderOption

AAC (Advanced Audio Coding).

Parameters:

Name Type Description Default
aac_coder int | None | Literal['anmr', 'twoloop', 'fast']

Coding algorithm (from 0 to 2) (default twoloop)

None
aac_ms bool | None

Force M/S stereo coding (default auto)

None
aac_is bool | None

Intensity stereo coding (default true)

None
aac_pns bool | None

Perceptual noise substitution (default true)

None
aac_tns bool | None

Temporal noise shaping (default true)

None
aac_ltp bool | None

Long term prediction (default false)

None
aac_pred bool | None

AAC-Main prediction (default false)

None
aac_pce bool | None

Forces the use of PCEs (default false)

None

Returns:

Type Description
FFMpegEncoderOption

the set codec options

ac3

ac3(
    center_mixlev: float | None = None,
    surround_mixlev: float | None = None,
    mixing_level: int | None = None,
    room_type: (
        int
        | None
        | Literal["notindicated", "large", "small"]
    ) = None,
    per_frame_metadata: bool | None = None,
    copyright: int | None = None,
    dialnorm: int | None = None,
    dsur_mode: (
        int | None | Literal["notindicated", "on", "off"]
    ) = None,
    original: int | None = None,
    dmix_mode: (
        int
        | None
        | Literal["notindicated", "ltrt", "loro", "dplii"]
    ) = None,
    ltrt_cmixlev: float | None = None,
    ltrt_surmixlev: float | None = None,
    loro_cmixlev: float | None = None,
    loro_surmixlev: float | None = None,
    dsurex_mode: (
        int
        | None
        | Literal["notindicated", "on", "off", "dpliiz"]
    ) = None,
    dheadphone_mode: (
        int | None | Literal["notindicated", "on", "off"]
    ) = None,
    ad_conv_type: (
        int | None | Literal["standard", "hdcd"]
    ) = None,
    stereo_rematrixing: bool | None = None,
    channel_coupling: int | None | Literal["auto"] = None,
    cpl_start_band: int | None | Literal["auto"] = None,
) -> FFMpegEncoderOption

ATSC A/52A (AC-3).

Parameters:

Name Type Description Default
center_mixlev float | None

Center Mix Level (from 0 to 1) (default 0.594604)

None
surround_mixlev float | None

Surround Mix Level (from 0 to 1) (default 0.5)

None
mixing_level int | None

Mixing Level (from -1 to 111) (default -1)

None
room_type int | None | Literal['notindicated', 'large', 'small']

Room Type (from -1 to 2) (default -1)

None
per_frame_metadata bool | None

Allow Changing Metadata Per-Frame (default false)

None
copyright int | None

Copyright Bit (from -1 to 1) (default -1)

None
dialnorm int | None

Dialogue Level (dB) (from -31 to -1) (default -31)

None
dsur_mode int | None | Literal['notindicated', 'on', 'off']

Dolby Surround Mode (from -1 to 2) (default -1)

None
original int | None

Original Bit Stream (from -1 to 1) (default -1)

None
dmix_mode int | None | Literal['notindicated', 'ltrt', 'loro', 'dplii']

Preferred Stereo Downmix Mode (from -1 to 3) (default -1)

None
ltrt_cmixlev float | None

Lt/Rt Center Mix Level (from -1 to 2) (default -1)

None
ltrt_surmixlev float | None

Lt/Rt Surround Mix Level (from -1 to 2) (default -1)

None
loro_cmixlev float | None

Lo/Ro Center Mix Level (from -1 to 2) (default -1)

None
loro_surmixlev float | None

Lo/Ro Surround Mix Level (from -1 to 2) (default -1)

None
dsurex_mode int | None | Literal['notindicated', 'on', 'off', 'dpliiz']

Dolby Surround EX Mode (from -1 to 3) (default -1)

None
dheadphone_mode int | None | Literal['notindicated', 'on', 'off']

Dolby Headphone Mode (from -1 to 2) (default -1)

None
ad_conv_type int | None | Literal['standard', 'hdcd']

A/D Converter Type (from -1 to 1) (default -1)

None
stereo_rematrixing bool | None

Stereo Rematrixing (default true)

None
channel_coupling int | None | Literal['auto']

Channel Coupling (from -1 to 1) (default auto)

None
cpl_start_band int | None | Literal['auto']

Coupling Start Band (from -1 to 15) (default auto)

None

Returns:

Type Description
FFMpegEncoderOption

the set codec options

ac3_fixed

ac3_fixed(
    center_mixlev: float | None = None,
    surround_mixlev: float | None = None,
    mixing_level: int | None = None,
    room_type: (
        int
        | None
        | Literal["notindicated", "large", "small"]
    ) = None,
    per_frame_metadata: bool | None = None,
    copyright: int | None = None,
    dialnorm: int | None = None,
    dsur_mode: (
        int | None | Literal["notindicated", "on", "off"]
    ) = None,
    original: int | None = None,
    dmix_mode: (
        int
        | None
        | Literal["notindicated", "ltrt", "loro", "dplii"]
    ) = None,
    ltrt_cmixlev: float | None = None,
    ltrt_surmixlev: float | None = None,
    loro_cmixlev: float | None = None,
    loro_surmixlev: float | None = None,
    dsurex_mode: (
        int
        | None
        | Literal["notindicated", "on", "off", "dpliiz"]
    ) = None,
    dheadphone_mode: (
        int | None | Literal["notindicated", "on", "off"]
    ) = None,
    ad_conv_type: (
        int | None | Literal["standard", "hdcd"]
    ) = None,
    stereo_rematrixing: bool | None = None,
    channel_coupling: int | None | Literal["auto"] = None,
    cpl_start_band: int | None | Literal["auto"] = None,
) -> FFMpegEncoderOption

ATSC A/52A (AC-3) (codec ac3).

Parameters:

Name Type Description Default
center_mixlev float | None

Center Mix Level (from 0 to 1) (default 0.594604)

None
surround_mixlev float | None

Surround Mix Level (from 0 to 1) (default 0.5)

None
mixing_level int | None

Mixing Level (from -1 to 111) (default -1)

None
room_type int | None | Literal['notindicated', 'large', 'small']

Room Type (from -1 to 2) (default -1)

None
per_frame_metadata bool | None

Allow Changing Metadata Per-Frame (default false)

None
copyright int | None

Copyright Bit (from -1 to 1) (default -1)

None
dialnorm int | None

Dialogue Level (dB) (from -31 to -1) (default -31)

None
dsur_mode int | None | Literal['notindicated', 'on', 'off']

Dolby Surround Mode (from -1 to 2) (default -1)

None
original int | None

Original Bit Stream (from -1 to 1) (default -1)

None
dmix_mode int | None | Literal['notindicated', 'ltrt', 'loro', 'dplii']

Preferred Stereo Downmix Mode (from -1 to 3) (default -1)

None
ltrt_cmixlev float | None

Lt/Rt Center Mix Level (from -1 to 2) (default -1)

None
ltrt_surmixlev float | None

Lt/Rt Surround Mix Level (from -1 to 2) (default -1)

None
loro_cmixlev float | None

Lo/Ro Center Mix Level (from -1 to 2) (default -1)

None
loro_surmixlev float | None

Lo/Ro Surround Mix Level (from -1 to 2) (default -1)

None
dsurex_mode int | None | Literal['notindicated', 'on', 'off', 'dpliiz']

Dolby Surround EX Mode (from -1 to 3) (default -1)

None
dheadphone_mode int | None | Literal['notindicated', 'on', 'off']

Dolby Headphone Mode (from -1 to 2) (default -1)

None
ad_conv_type int | None | Literal['standard', 'hdcd']

A/D Converter Type (from -1 to 1) (default -1)

None
stereo_rematrixing bool | None

Stereo Rematrixing (default true)

None
channel_coupling int | None | Literal['auto']

Channel Coupling (from -1 to 1) (default auto)

None
cpl_start_band int | None | Literal['auto']

Coupling Start Band (from -1 to 15) (default auto)

None

Returns:

Type Description
FFMpegEncoderOption

the set codec options

adpcm_adx

adpcm_adx() -> FFMpegEncoderOption

SEGA CRI ADX ADPCM.

Returns:

Type Description
FFMpegEncoderOption

the set codec options

adpcm_argo

adpcm_argo(
    block_size: int | None = None,
) -> FFMpegEncoderOption

ADPCM Argonaut Games.

Parameters:

Name Type Description Default
block_size int | None

set the block size (from 32 to 8192) (default 1024)

None

Returns:

Type Description
FFMpegEncoderOption

the set codec options

adpcm_ima_alp

adpcm_ima_alp(
    block_size: int | None = None,
) -> FFMpegEncoderOption

ADPCM IMA High Voltage Software ALP.

Parameters:

Name Type Description Default
block_size int | None

set the block size (from 32 to 8192) (default 1024)

None

Returns:

Type Description
FFMpegEncoderOption

the set codec options

adpcm_ima_amv

adpcm_ima_amv(
    block_size: int | None = None,
) -> FFMpegEncoderOption

ADPCM IMA AMV.

Parameters:

Name Type Description Default
block_size int | None

set the block size (from 32 to 8192) (default 1024)

None

Returns:

Type Description
FFMpegEncoderOption

the set codec options

adpcm_ima_apm

adpcm_ima_apm(
    block_size: int | None = None,
) -> FFMpegEncoderOption

ADPCM IMA Ubisoft APM.

Parameters:

Name Type Description Default
block_size int | None

set the block size (from 32 to 8192) (default 1024)

None

Returns:

Type Description
FFMpegEncoderOption

the set codec options

adpcm_ima_qt

adpcm_ima_qt(
    block_size: int | None = None,
) -> FFMpegEncoderOption

ADPCM IMA QuickTime.

Parameters:

Name Type Description Default
block_size int | None

set the block size (from 32 to 8192) (default 1024)

None

Returns:

Type Description
FFMpegEncoderOption

the set codec options

adpcm_ima_ssi

adpcm_ima_ssi(
    block_size: int | None = None,
) -> FFMpegEncoderOption

ADPCM IMA Simon & Schuster Interactive.

Parameters:

Name Type Description Default
block_size int | None

set the block size (from 32 to 8192) (default 1024)

None

Returns:

Type Description
FFMpegEncoderOption

the set codec options

adpcm_ima_wav

adpcm_ima_wav(
    block_size: int | None = None,
) -> FFMpegEncoderOption

ADPCM IMA WAV.

Parameters:

Name Type Description Default
block_size int | None

set the block size (from 32 to 8192) (default 1024)

None

Returns:

Type Description
FFMpegEncoderOption

the set codec options

adpcm_ima_ws

adpcm_ima_ws(
    block_size: int | None = None,
) -> FFMpegEncoderOption

ADPCM IMA Westwood.

Parameters:

Name Type Description Default
block_size int | None

set the block size (from 32 to 8192) (default 1024)

None

Returns:

Type Description
FFMpegEncoderOption

the set codec options

adpcm_ms

adpcm_ms(
    block_size: int | None = None,
) -> FFMpegEncoderOption

ADPCM Microsoft.

Parameters:

Name Type Description Default
block_size int | None

set the block size (from 32 to 8192) (default 1024)

None

Returns:

Type Description
FFMpegEncoderOption

the set codec options

adpcm_swf

adpcm_swf(
    block_size: int | None = None,
) -> FFMpegEncoderOption

ADPCM Shockwave Flash.

Parameters:

Name Type Description Default
block_size int | None

set the block size (from 32 to 8192) (default 1024)

None

Returns:

Type Description
FFMpegEncoderOption

the set codec options

adpcm_yamaha

adpcm_yamaha(
    block_size: int | None = None,
) -> FFMpegEncoderOption

ADPCM Yamaha.

Parameters:

Name Type Description Default
block_size int | None

set the block size (from 32 to 8192) (default 1024)

None

Returns:

Type Description
FFMpegEncoderOption

the set codec options

alac

alac(
    min_prediction_order: int | None = None,
    max_prediction_order: int | None = None,
) -> FFMpegEncoderOption

ALAC (Apple Lossless Audio Codec).

Parameters:

Name Type Description Default
min_prediction_order int | None

(from 1 to 30) (default 4)

None
max_prediction_order int | None

(from 1 to 30) (default 6)

None

Returns:

Type Description
FFMpegEncoderOption

the set codec options

alias_pix

alias_pix() -> FFMpegEncoderOption

Alias/Wavefront PIX image.

Returns:

Type Description
FFMpegEncoderOption

the set codec options

amv

amv(
    mpv_flags: str | None = None,
    luma_elim_threshold: int | None = None,
    chroma_elim_threshold: int | None = None,
    quantizer_noise_shaping: int | None = None,
    error_rate: int | None = None,
    qsquish: float | None = None,
    rc_qmod_amp: float | None = None,
    rc_qmod_freq: int | None = None,
    rc_eq: str | None = None,
    rc_init_cplx: float | None = None,
    rc_buf_aggressivity: float | None = None,
    border_mask: float | None = None,
    lmin: int | None = None,
    lmax: int | None = None,
    skip_threshold: int | None = None,
    skip_factor: int | None = None,
    skip_exp: int | None = None,
    skip_cmp: (
        int
        | None
        | Literal[
            "sad",
            "sse",
            "satd",
            "dct",
            "psnr",
            "bit",
            "rd",
            "zero",
            "vsad",
            "vsse",
            "nsse",
            "dct264",
            "dctmax",
            "chroma",
            "msad",
        ]
    ) = None,
    sc_threshold: int | None = None,
    noise_reduction: int | None = None,
    ps: int | None = None,
    huffman: (
        int | None | Literal["default", "optimal"]
    ) = None,
    force_duplicated_matrix: bool | None = None,
) -> FFMpegEncoderOption

AMV Video.

Parameters:

Name Type Description Default
mpv_flags str | None

Flags common for all mpegvideo-based encoders. (default 0)

None
luma_elim_threshold int | None

single coefficient elimination threshold for luminance (negative values also consider dc coefficient) (from INT_MIN to INT_MAX) (default 0)

None
chroma_elim_threshold int | None

single coefficient elimination threshold for chrominance (negative values also consider dc coefficient) (from INT_MIN to INT_MAX) (default 0)

None
quantizer_noise_shaping int | None

(from 0 to INT_MAX) (default 0)

None
error_rate int | None

Simulate errors in the bitstream to test error concealment. (from 0 to INT_MAX) (default 0)

None
qsquish float | None

how to keep quantizer between qmin and qmax (0 = clip, 1 = use differentiable function) (from 0 to 99) (default 0)

None
rc_qmod_amp float | None

experimental quantizer modulation (from -FLT_MAX to FLT_MAX) (default 0)

None
rc_qmod_freq int | None

experimental quantizer modulation (from INT_MIN to INT_MAX) (default 0)

None
rc_eq str | None

Set rate control equation. When computing the expression, besides the standard functions defined in the section 'Expression Evaluation', the following functions are available: bits2qp(bits), qp2bits(qp). Also the following constants are available: iTex pTex tex mv fCode iCount mcVar var isI isP isB avgQP qComp avgIITex avgPITex avgPPTex avgBPTex avgTex.

None
rc_init_cplx float | None

initial complexity for 1-pass encoding (from -FLT_MAX to FLT_MAX) (default 0)

None
rc_buf_aggressivity float | None

currently useless (from -FLT_MAX to FLT_MAX) (default 1)

None
border_mask float | None

increase the quantizer for macroblocks close to borders (from -FLT_MAX to FLT_MAX) (default 0)

None
lmin int | None

minimum Lagrange factor (VBR) (from 0 to INT_MAX) (default 236)

None
lmax int | None

maximum Lagrange factor (VBR) (from 0 to INT_MAX) (default 3658)

None
skip_threshold int | None

Frame skip threshold (from INT_MIN to INT_MAX) (default 0)

None
skip_factor int | None

Frame skip factor (from INT_MIN to INT_MAX) (default 0)

None
skip_exp int | None

Frame skip exponent (from INT_MIN to INT_MAX) (default 0)

None
skip_cmp int | None | Literal['sad', 'sse', 'satd', 'dct', 'psnr', 'bit', 'rd', 'zero', 'vsad', 'vsse', 'nsse', 'dct264', 'dctmax', 'chroma', 'msad']

Frame skip compare function (from INT_MIN to INT_MAX) (default dctmax)

None
sc_threshold int | None

Scene change threshold (from INT_MIN to INT_MAX) (default 0)

None
noise_reduction int | None

Noise reduction (from INT_MIN to INT_MAX) (default 0)

None
ps int | None

RTP payload size in bytes (from INT_MIN to INT_MAX) (default 0)

None
huffman int | None | Literal['default', 'optimal']

Huffman table strategy (from 0 to 1) (default optimal)

None
force_duplicated_matrix bool | None

Always write luma and chroma matrix for mjpeg, useful for rtp streaming. (default false)

None

Returns:

Type Description
FFMpegEncoderOption

the set codec options

anull

Null audio.

Returns:

Type Description
FFMpegEncoderOption

the set codec options

apng

apng(
    dpi: int | None = None,
    dpm: int | None = None,
    pred: (
        int
        | None
        | Literal[
            "none", "sub", "up", "avg", "paeth", "mixed"
        ]
    ) = None,
) -> FFMpegEncoderOption

APNG (Animated Portable Network Graphics) image.

Parameters:

Name Type Description Default
dpi int | None

Set image resolution (in dots per inch) (from 0 to 65536) (default 0)

None
dpm int | None

Set image resolution (in dots per meter) (from 0 to 65536) (default 0)

None
pred int | None | Literal['none', 'sub', 'up', 'avg', 'paeth', 'mixed']

Prediction method (from 0 to 5) (default none)

None

Returns:

Type Description
FFMpegEncoderOption

the set codec options

aptx

AptX (Audio Processing Technology for Bluetooth).

Returns:

Type Description
FFMpegEncoderOption

the set codec options

aptx_hd

aptx_hd() -> FFMpegEncoderOption

AptX HD (Audio Processing Technology for Bluetooth).

Returns:

Type Description
FFMpegEncoderOption

the set codec options

ass

ASS (Advanced SubStation Alpha) subtitle.

Returns:

Type Description
FFMpegEncoderOption

the set codec options

asv1

ASUS V1.

Returns:

Type Description
FFMpegEncoderOption

the set codec options

asv2

ASUS V2.

Returns:

Type Description
FFMpegEncoderOption

the set codec options

av1_nvenc

av1_nvenc(
    preset: (
        int
        | None
        | Literal[
            "default",
            "slow",
            "medium",
            "fast",
            "p1",
            "p2",
            "p3",
            "p4",
            "p5",
            "p6",
            "p7",
        ]
    ) = None,
    tune: (
        int | None | Literal["hq", "ll", "ull", "lossless"]
    ) = None,
    level: (
        int
        | None
        | Literal[
            "auto",
            "2",
            "2.0",
            "2.1",
            "2.2",
            "2.3",
            "3",
            "3.0",
            "3.1",
            "3.2",
            "3.3",
            "4",
            "4.0",
            "4.1",
            "4.2",
            "4.3",
            "5",
            "5.0",
            "5.1",
            "5.2",
            "5.3",
            "6",
            "6.0",
            "6.1",
            "6.2",
            "6.3",
            "7",
            "7.0",
            "7.1",
            "7.2",
            "7.3",
        ]
    ) = None,
    tier: int | None | Literal["0", "1"] = None,
    rc: (
        int | None | Literal["constqp", "vbr", "cbr"]
    ) = None,
    multipass: (
        int | None | Literal["disabled", "qres", "fullres"]
    ) = None,
    highbitdepth: bool | None = None,
    tile_rows: int | None = None,
    tile_columns: int | None = None,
    surfaces: int | None = None,
    gpu: int | None | Literal["any", "list"] = None,
    rgb_mode: (
        int | None | Literal["yuv420", "yuv444", "disabled"]
    ) = None,
    delay: int | None = None,
    rc_lookahead: int | None = None,
    cq: float | None = None,
    init_qpP: int | None = None,
    init_qpB: int | None = None,
    init_qpI: int | None = None,
    qp: int | None = None,
    qp_cb_offset: int | None = None,
    qp_cr_offset: int | None = None,
    no_scenecut: bool | None = None,
    forced_idr: bool | None = None,
    b_adapt: bool | None = None,
    spatial_aq: bool | None = None,
    temporal_aq: bool | None = None,
    zerolatency: bool | None = None,
    nonref_p: bool | None = None,
    strict_gop: bool | None = None,
    aq_strength: int | None = None,
    weighted_pred: bool | None = None,
    b_ref_mode: (
        int | None | Literal["disabled", "each", "middle"]
    ) = None,
    dpb_size: int | None = None,
    ldkfs: int | None = None,
    intra_refresh: bool | None = None,
    timing_info: bool | None = None,
    extra_sei: bool | None = None,
    a53cc: bool | None = None,
    s12m_tc: bool | None = None,
) -> FFMpegEncoderOption

NVIDIA NVENC av1 encoder (codec av1).

Parameters:

Name Type Description Default
preset int | None | Literal['default', 'slow', 'medium', 'fast', 'p1', 'p2', 'p3', 'p4', 'p5', 'p6', 'p7']

Set the encoding preset (from 0 to 18) (default p4)

None
tune int | None | Literal['hq', 'll', 'ull', 'lossless']

Set the encoding tuning info (from 1 to 4) (default hq)

None
level int | None | Literal['auto', '2', '2.0', '2.1', '2.2', '2.3', '3', '3.0', '3.1', '3.2', '3.3', '4', '4.0', '4.1', '4.2', '4.3', '5', '5.0', '5.1', '5.2', '5.3', '6', '6.0', '6.1', '6.2', '6.3', '7', '7.0', '7.1', '7.2', '7.3']

Set the encoding level restriction (from 0 to 24) (default auto)

None
tier int | None | Literal['0', '1']

Set the encoding tier (from 0 to 1) (default 0)

None
rc int | None | Literal['constqp', 'vbr', 'cbr']

Override the preset rate-control (from -1 to INT_MAX) (default -1)

None
multipass int | None | Literal['disabled', 'qres', 'fullres']

Set the multipass encoding (from 0 to 2) (default disabled)

None
highbitdepth bool | None

Enable 10 bit encode for 8 bit input (default false)

None
tile_rows int | None

Number of tile rows to encode with (from -1 to 64) (default -1)

None
tile_columns int | None

Number of tile columns to encode with (from -1 to 64) (default -1)

None
surfaces int | None

Number of concurrent surfaces (from 0 to 64) (default 0)

None
gpu int | None | Literal['any', 'list']

Selects which NVENC capable GPU to use. First GPU is 0, second is 1, and so on. (from -2 to INT_MAX) (default any)

None
rgb_mode int | None | Literal['yuv420', 'yuv444', 'disabled']

Configure how nvenc handles packed RGB input. (from 0 to INT_MAX) (default yuv420)

None
delay int | None

Delay frame output by the given amount of frames (from 0 to INT_MAX) (default INT_MAX)

None
rc_lookahead int | None

Number of frames to look ahead for rate-control (from 0 to INT_MAX) (default 0)

None
cq float | None

Set target quality level (0 to 51, 0 means automatic) for constant quality mode in VBR rate control (from 0 to 51) (default 0)

None
init_qpP int | None

Initial QP value for P frame (from -1 to 255) (default -1)

None
init_qpB int | None

Initial QP value for B frame (from -1 to 255) (default -1)

None
init_qpI int | None

Initial QP value for I frame (from -1 to 255) (default -1)

None
qp int | None

Constant quantization parameter rate control method (from -1 to 255) (default -1)

None
qp_cb_offset int | None

Quantization parameter offset for cb channel (from -12 to 12) (default 0)

None
qp_cr_offset int | None

Quantization parameter offset for cr channel (from -12 to 12) (default 0)

None
no_scenecut bool | None

When lookahead is enabled, set this to 1 to disable adaptive I-frame insertion at scene cuts (default false)

None
forced_idr bool | None

If forcing keyframes, force them as IDR frames. (default false)

None
b_adapt bool | None

When lookahead is enabled, set this to 0 to disable adaptive B-frame decision (default true)

None
spatial_aq bool | None

set to 1 to enable Spatial AQ (default false)

None
temporal_aq bool | None

set to 1 to enable Temporal AQ (default false)

None
zerolatency bool | None

Set 1 to indicate zero latency operation (no reordering delay) (default false)

None
nonref_p bool | None

Set this to 1 to enable automatic insertion of non-reference P-frames (default false)

None
strict_gop bool | None

Set 1 to minimize GOP-to-GOP rate fluctuations (default false)

None
aq_strength int | None

When Spatial AQ is enabled, this field is used to specify AQ strength. AQ strength scale is from 1 (low) - 15 (aggressive) (from 1 to 15) (default 8)

None
weighted_pred bool | None

Enable weighted prediction (default false)

None
b_ref_mode int | None | Literal['disabled', 'each', 'middle']

Use B frames as references (from -1 to 2) (default -1)

None
dpb_size int | None

Specifies the DPB size used for encoding (0 means automatic) (from 0 to INT_MAX) (default 0)

None
ldkfs int | None

Low delay key frame scale; Specifies the Scene Change frame size increase allowed in case of single frame VBV and CBR (from 0 to 255) (default 0)

None
intra_refresh bool | None

Use Periodic Intra Refresh instead of IDR frames (default false)

None
timing_info bool | None

Include timing info in sequence/frame headers (default false)

None
extra_sei bool | None

Pass on extra SEI data (e.g. a53 cc) to be included in the bitstream (default true)

None
a53cc bool | None

Use A53 Closed Captions (if available) (default true)

None
s12m_tc bool | None

Use timecode (if available) (default true)

None

Returns:

Type Description
FFMpegEncoderOption

the set codec options

av1_vaapi

av1_vaapi(
    low_power: bool | None = None,
    idr_interval: int | None = None,
    b_depth: int | None = None,
    async_depth: int | None = None,
    max_frame_size: int | None = None,
    rc_mode: (
        int
        | None
        | Literal[
            "auto",
            "CQP",
            "CBR",
            "VBR",
            "ICQ",
            "QVBR",
            "AVBR",
        ]
    ) = None,
    profile: (
        int | None | Literal["main", "high", "professional"]
    ) = None,
    tier: int | None | Literal["main", "high"] = None,
    level: (
        int
        | None
        | Literal[
            "2.0",
            "2.1",
            "3.0",
            "3.1",
            "4.0",
            "4.1",
            "5.0",
            "5.1",
            "5.2",
            "5.3",
            "6.0",
            "6.1",
            "6.2",
            "6.3",
        ]
    ) = None,
    tiles: str | None = None,
    tile_groups: int | None = None,
) -> FFMpegEncoderOption

AV1 (VAAPI) (codec av1).

Parameters:

Name Type Description Default
low_power bool | None

Use low-power encoding mode (only available on some platforms; may not support all encoding features) (default false)

None
idr_interval int | None

Distance (in I-frames) between IDR frames (from 0 to INT_MAX) (default 0)

None
b_depth int | None

Maximum B-frame reference depth (from 1 to INT_MAX) (default 1)

None
async_depth int | None

Maximum processing parallelism. Increase this to improve single channel performance. This option doesn't work if driver doesn't implement vaSyncBuffer function. (from 1 to 64) (default 2)

None
max_frame_size int | None

Maximum frame size (in bytes) (from 0 to INT_MAX) (default 0)

None
rc_mode int | None | Literal['auto', 'CQP', 'CBR', 'VBR', 'ICQ', 'QVBR', 'AVBR']

Set rate control mode (from 0 to 6) (default auto)

None
profile int | None | Literal['main', 'high', 'professional']

Set profile (seq_profile) (from -99 to 255) (default -99)

None
tier int | None | Literal['main', 'high']

Set tier (seq_tier) (from 0 to 1) (default main)

None
level int | None | Literal['2.0', '2.1', '3.0', '3.1', '4.0', '4.1', '5.0', '5.1', '5.2', '5.3', '6.0', '6.1', '6.2', '6.3']

Set level (seq_level_idx) (from -99 to 31) (default -99)

None
tiles str | None

Tile columns x rows (Use minimal tile column/row number automatically by default)

None
tile_groups int | None

Number of tile groups for encoding (from 1 to 4096) (default 1)

None

Returns:

Type Description
FFMpegEncoderOption

the set codec options

avrp

Avid 1:1 10-bit RGB Packer.

Returns:

Type Description
FFMpegEncoderOption

the set codec options

avui

Avid Meridien Uncompressed.

Returns:

Type Description
FFMpegEncoderOption

the set codec options

ayuv

Uncompressed packed MS 4:4:4:4.

Returns:

Type Description
FFMpegEncoderOption

the set codec options

bitpacked

bitpacked() -> FFMpegEncoderOption

Bitpacked.

Returns:

Type Description
FFMpegEncoderOption

the set codec options

bmp

BMP (Windows and OS/2 bitmap).

Returns:

Type Description
FFMpegEncoderOption

the set codec options

cfhd

cfhd(
    quality: (
        int
        | None
        | Literal[
            "film3+",
            "film3",
            "film2+",
            "film2",
            "film1.5",
            "film1+",
            "film1",
            "high+",
            "high",
            "medium+",
            "medium",
            "low+",
            "low",
        ]
    ) = None,
) -> FFMpegEncoderOption

GoPro CineForm HD.

Parameters:

Name Type Description Default
quality int | None | Literal['film3+', 'film3', 'film2+', 'film2', 'film1.5', 'film1+', 'film1', 'high+', 'high', 'medium+', 'medium', 'low+', 'low']

set quality (from 0 to 12) (default film3+)

None

Returns:

Type Description
FFMpegEncoderOption

the set codec options

cinepak

cinepak(
    max_extra_cb_iterations: int | None = None,
    skip_empty_cb: bool | None = None,
    max_strips: int | None = None,
    min_strips: int | None = None,
    strip_number_adaptivity: int | None = None,
) -> FFMpegEncoderOption

Cinepak.

Parameters:

Name Type Description Default
max_extra_cb_iterations int | None

Max extra codebook recalculation passes, more is better and slower (from 0 to INT_MAX) (default 2)

None
skip_empty_cb bool | None

Avoid wasting bytes, ignore vintage MacOS decoder (default false)

None
max_strips int | None

Limit strips/frame, vintage compatible is 1..3, otherwise the more the better (from 1 to 32) (default 3)

None
min_strips int | None

Enforce min strips/frame, more is worse and faster, must be <= max_strips (from 1 to 32) (default 1)

None
strip_number_adaptivity int | None

How fast the strip number adapts, more is slightly better, much slower (from 0 to 31) (default 0)

None

Returns:

Type Description
FFMpegEncoderOption

the set codec options

cljr

cljr(dither_type: int | None = None) -> FFMpegEncoderOption

Cirrus Logic AccuPak.

Parameters:

Name Type Description Default
dither_type int | None

Dither type (from 0 to 2) (default 1)

None

Returns:

Type Description
FFMpegEncoderOption

the set codec options

comfortnoise

comfortnoise() -> FFMpegEncoderOption

RFC 3389 comfort noise generator.

Returns:

Type Description
FFMpegEncoderOption

the set codec options

dca

dca(dca_adpcm: bool | None = None) -> FFMpegEncoderOption

DCA (DTS Coherent Acoustics) (codec dts).

Parameters:

Name Type Description Default
dca_adpcm bool | None

Use ADPCM encoding (default false)

None

Returns:

Type Description
FFMpegEncoderOption

the set codec options

dfpwm

DFPWM1a audio.

Returns:

Type Description
FFMpegEncoderOption

the set codec options

dnxhd

dnxhd(
    nitris_compat: bool | None = None,
    ibias: int | None = None,
    profile: (
        int
        | None
        | Literal[
            "dnxhd",
            "dnxhr_444",
            "dnxhr_hqx",
            "dnxhr_hq",
            "dnxhr_sq",
            "dnxhr_lb",
        ]
    ) = None,
) -> FFMpegEncoderOption

VC3/DNxHD.

Parameters:

Name Type Description Default
nitris_compat bool | None

encode with Avid Nitris compatibility (default false)

None
ibias int | None

intra quant bias (from INT_MIN to INT_MAX) (default 0)

None
profile int | None | Literal['dnxhd', 'dnxhr_444', 'dnxhr_hqx', 'dnxhr_hq', 'dnxhr_sq', 'dnxhr_lb']

(from 0 to 5) (default dnxhd)

None

Returns:

Type Description
FFMpegEncoderOption

the set codec options

dpx

DPX (Digital Picture Exchange) image.

Returns:

Type Description
FFMpegEncoderOption

the set codec options

dvbsub

dvbsub() -> FFMpegEncoderOption

DVB subtitles (codec dvb_subtitle).

Returns:

Type Description
FFMpegEncoderOption

the set codec options

dvdsub

dvdsub(
    palette: str | None = None,
    even_rows_fix: bool | None = None,
) -> FFMpegEncoderOption

DVD subtitles (codec dvd_subtitle).

Parameters:

Name Type Description Default
palette str | None

set the global palette

None
even_rows_fix bool | None

Make number of rows even (workaround for some players) (default false)

None

Returns:

Type Description
FFMpegEncoderOption

the set codec options

dvvideo

dvvideo(
    quant_deadzone: int | None = None,
) -> FFMpegEncoderOption

DV (Digital Video).

Parameters:

Name Type Description Default
quant_deadzone int | None

Quantizer dead zone (from 0 to 1024) (default 7)

None

Returns:

Type Description
FFMpegEncoderOption

the set codec options

eac3

eac3(
    mixing_level: int | None = None,
    room_type: (
        int
        | None
        | Literal["notindicated", "large", "small"]
    ) = None,
    per_frame_metadata: bool | None = None,
    copyright: int | None = None,
    dialnorm: int | None = None,
    dsur_mode: (
        int | None | Literal["notindicated", "on", "off"]
    ) = None,
    original: int | None = None,
    dmix_mode: (
        int
        | None
        | Literal["notindicated", "ltrt", "loro", "dplii"]
    ) = None,
    ltrt_cmixlev: float | None = None,
    ltrt_surmixlev: float | None = None,
    loro_cmixlev: float | None = None,
    loro_surmixlev: float | None = None,
    dsurex_mode: (
        int
        | None
        | Literal["notindicated", "on", "off", "dpliiz"]
    ) = None,
    dheadphone_mode: (
        int | None | Literal["notindicated", "on", "off"]
    ) = None,
    ad_conv_type: (
        int | None | Literal["standard", "hdcd"]
    ) = None,
    stereo_rematrixing: bool | None = None,
    channel_coupling: int | None | Literal["auto"] = None,
    cpl_start_band: int | None | Literal["auto"] = None,
) -> FFMpegEncoderOption

ATSC A/52 E-AC-3.

Parameters:

Name Type Description Default
mixing_level int | None

Mixing Level (from -1 to 111) (default -1)

None
room_type int | None | Literal['notindicated', 'large', 'small']

Room Type (from -1 to 2) (default -1)

None
per_frame_metadata bool | None

Allow Changing Metadata Per-Frame (default false)

None
copyright int | None

Copyright Bit (from -1 to 1) (default -1)

None
dialnorm int | None

Dialogue Level (dB) (from -31 to -1) (default -31)

None
dsur_mode int | None | Literal['notindicated', 'on', 'off']

Dolby Surround Mode (from -1 to 2) (default -1)

None
original int | None

Original Bit Stream (from -1 to 1) (default -1)

None
dmix_mode int | None | Literal['notindicated', 'ltrt', 'loro', 'dplii']

Preferred Stereo Downmix Mode (from -1 to 3) (default -1)

None
ltrt_cmixlev float | None

Lt/Rt Center Mix Level (from -1 to 2) (default -1)

None
ltrt_surmixlev float | None

Lt/Rt Surround Mix Level (from -1 to 2) (default -1)

None
loro_cmixlev float | None

Lo/Ro Center Mix Level (from -1 to 2) (default -1)

None
loro_surmixlev float | None

Lo/Ro Surround Mix Level (from -1 to 2) (default -1)

None
dsurex_mode int | None | Literal['notindicated', 'on', 'off', 'dpliiz']

Dolby Surround EX Mode (from -1 to 3) (default -1)

None
dheadphone_mode int | None | Literal['notindicated', 'on', 'off']

Dolby Headphone Mode (from -1 to 2) (default -1)

None
ad_conv_type int | None | Literal['standard', 'hdcd']

A/D Converter Type (from -1 to 1) (default -1)

None
stereo_rematrixing bool | None

Stereo Rematrixing (default true)

None
channel_coupling int | None | Literal['auto']

Channel Coupling (from -1 to 1) (default auto)

None
cpl_start_band int | None | Literal['auto']

Coupling Start Band (from -1 to 15) (default auto)

None

Returns:

Type Description
FFMpegEncoderOption

the set codec options

exr

exr(
    compression: (
        int | None | Literal["none", "rle", "zip1", "zip16"]
    ) = None,
    format: int | None | Literal["half", "float"] = None,
    gamma: float | None = None,
) -> FFMpegEncoderOption

OpenEXR image.

Parameters:

Name Type Description Default
compression int | None | Literal['none', 'rle', 'zip1', 'zip16']

set compression type (from 0 to 3) (default none)

None
format int | None | Literal['half', 'float']

set pixel type (from 1 to 2) (default float)

None
gamma float | None

set gamma (from 0.001 to FLT_MAX) (default 1)

None

Returns:

Type Description
FFMpegEncoderOption

the set codec options

ffv1

ffv1(
    slicecrc: bool | None = None,
    coder: (
        int
        | None
        | Literal["rice", "range_def", "range_tab", "ac"]
    ) = None,
    context: int | None = None,
) -> FFMpegEncoderOption

FFmpeg video codec #1.

Parameters:

Name Type Description Default
slicecrc bool | None

Protect slices with CRCs (default auto)

None
coder int | None | Literal['rice', 'range_def', 'range_tab', 'ac']

Coder type (from -2 to 2) (default rice)

None
context int | None

Context model (from 0 to 1) (default 0)

None

Returns:

Type Description
FFMpegEncoderOption

the set codec options

ffvhuff

ffvhuff(
    non_deterministic: bool | None = None,
    pred: (
        int | None | Literal["left", "plane", "median"]
    ) = None,
    context: int | None = None,
) -> FFMpegEncoderOption

Huffyuv FFmpeg variant.

Parameters:

Name Type Description Default
non_deterministic bool | None

Allow multithreading for e.g. context=1 at the expense of determinism (default false)

None
pred int | None | Literal['left', 'plane', 'median']

Prediction method (from 0 to 2) (default left)

None
context int | None

Set per-frame huffman tables (from 0 to 1) (default 0)

None

Returns:

Type Description
FFMpegEncoderOption

the set codec options

fits

Flexible Image Transport System.

Returns:

Type Description
FFMpegEncoderOption

the set codec options

flac

flac(
    lpc_coeff_precision: int | None = None,
    lpc_type: (
        int
        | None
        | Literal["none", "fixed", "levinson", "cholesky"]
    ) = None,
    lpc_passes: int | None = None,
    min_partition_order: int | None = None,
    prediction_order_method: (
        int
        | None
        | Literal[
            "estimation",
            "2level",
            "4level",
            "8level",
            "search",
            "log",
        ]
    ) = None,
    ch_mode: (
        int
        | None
        | Literal[
            "auto",
            "indep",
            "left_side",
            "right_side",
            "mid_side",
        ]
    ) = None,
    exact_rice_parameters: bool | None = None,
    multi_dim_quant: bool | None = None,
    min_prediction_order: int | None = None,
) -> FFMpegEncoderOption

FLAC (Free Lossless Audio Codec).

Parameters:

Name Type Description Default
lpc_coeff_precision int | None

LPC coefficient precision (from 0 to 15) (default 15)

None
lpc_type int | None | Literal['none', 'fixed', 'levinson', 'cholesky']

LPC algorithm (from -1 to 3) (default -1)

None
lpc_passes int | None

Number of passes to use for Cholesky factorization during LPC analysis (from 1 to INT_MAX) (default 2)

None
min_partition_order int | None

(from -1 to 8) (default -1)

None
prediction_order_method int | None | Literal['estimation', '2level', '4level', '8level', 'search', 'log']

Search method for selecting prediction order (from -1 to 5) (default -1)

None
ch_mode int | None | Literal['auto', 'indep', 'left_side', 'right_side', 'mid_side']

Stereo decorrelation mode (from -1 to 3) (default auto)

None
exact_rice_parameters bool | None

Calculate rice parameters exactly (default false)

None
multi_dim_quant bool | None

Multi-dimensional quantization (default false)

None
min_prediction_order int | None

(from -1 to 32) (default -1)

None

Returns:

Type Description
FFMpegEncoderOption

the set codec options

flashsv

flashsv() -> FFMpegEncoderOption

Flash Screen Video.

Returns:

Type Description
FFMpegEncoderOption

the set codec options

flashsv2

flashsv2() -> FFMpegEncoderOption

Flash Screen Video Version 2.

Returns:

Type Description
FFMpegEncoderOption

the set codec options

flv

flv(
    mpv_flags: str | None = None,
    luma_elim_threshold: int | None = None,
    chroma_elim_threshold: int | None = None,
    quantizer_noise_shaping: int | None = None,
    error_rate: int | None = None,
    qsquish: float | None = None,
    rc_qmod_amp: float | None = None,
    rc_qmod_freq: int | None = None,
    rc_eq: str | None = None,
    rc_init_cplx: float | None = None,
    rc_buf_aggressivity: float | None = None,
    border_mask: float | None = None,
    lmin: int | None = None,
    lmax: int | None = None,
    skip_threshold: int | None = None,
    skip_factor: int | None = None,
    skip_exp: int | None = None,
    skip_cmp: (
        int
        | None
        | Literal[
            "sad",
            "sse",
            "satd",
            "dct",
            "psnr",
            "bit",
            "rd",
            "zero",
            "vsad",
            "vsse",
            "nsse",
            "dct264",
            "dctmax",
            "chroma",
            "msad",
        ]
    ) = None,
    sc_threshold: int | None = None,
    noise_reduction: int | None = None,
    ps: int | None = None,
    motion_est: (
        int | None | Literal["zero", "epzs", "xone"]
    ) = None,
    mepc: int | None = None,
    mepre: int | None = None,
    intra_penalty: int | None = None,
) -> FFMpegEncoderOption

FLV / Sorenson Spark / Sorenson H.263 (Flash Video) (codec flv1).

Parameters:

Name Type Description Default
mpv_flags str | None

Flags common for all mpegvideo-based encoders. (default 0)

None
luma_elim_threshold int | None

single coefficient elimination threshold for luminance (negative values also consider dc coefficient) (from INT_MIN to INT_MAX) (default 0)

None
chroma_elim_threshold int | None

single coefficient elimination threshold for chrominance (negative values also consider dc coefficient) (from INT_MIN to INT_MAX) (default 0)

None
quantizer_noise_shaping int | None

(from 0 to INT_MAX) (default 0)

None
error_rate int | None

Simulate errors in the bitstream to test error concealment. (from 0 to INT_MAX) (default 0)

None
qsquish float | None

how to keep quantizer between qmin and qmax (0 = clip, 1 = use differentiable function) (from 0 to 99) (default 0)

None
rc_qmod_amp float | None

experimental quantizer modulation (from -FLT_MAX to FLT_MAX) (default 0)

None
rc_qmod_freq int | None

experimental quantizer modulation (from INT_MIN to INT_MAX) (default 0)

None
rc_eq str | None

Set rate control equation. When computing the expression, besides the standard functions defined in the section 'Expression Evaluation', the following functions are available: bits2qp(bits), qp2bits(qp). Also the following constants are available: iTex pTex tex mv fCode iCount mcVar var isI isP isB avgQP qComp avgIITex avgPITex avgPPTex avgBPTex avgTex.

None
rc_init_cplx float | None

initial complexity for 1-pass encoding (from -FLT_MAX to FLT_MAX) (default 0)

None
rc_buf_aggressivity float | None

currently useless (from -FLT_MAX to FLT_MAX) (default 1)

None
border_mask float | None

increase the quantizer for macroblocks close to borders (from -FLT_MAX to FLT_MAX) (default 0)

None
lmin int | None

minimum Lagrange factor (VBR) (from 0 to INT_MAX) (default 236)

None
lmax int | None

maximum Lagrange factor (VBR) (from 0 to INT_MAX) (default 3658)

None
skip_threshold int | None

Frame skip threshold (from INT_MIN to INT_MAX) (default 0)

None
skip_factor int | None

Frame skip factor (from INT_MIN to INT_MAX) (default 0)

None
skip_exp int | None

Frame skip exponent (from INT_MIN to INT_MAX) (default 0)

None
skip_cmp int | None | Literal['sad', 'sse', 'satd', 'dct', 'psnr', 'bit', 'rd', 'zero', 'vsad', 'vsse', 'nsse', 'dct264', 'dctmax', 'chroma', 'msad']

Frame skip compare function (from INT_MIN to INT_MAX) (default dctmax)

None
sc_threshold int | None

Scene change threshold (from INT_MIN to INT_MAX) (default 0)

None
noise_reduction int | None

Noise reduction (from INT_MIN to INT_MAX) (default 0)

None
ps int | None

RTP payload size in bytes (from INT_MIN to INT_MAX) (default 0)

None
motion_est int | None | Literal['zero', 'epzs', 'xone']

motion estimation algorithm (from 0 to 2) (default epzs)

None
mepc int | None

Motion estimation bitrate penalty compensation (1.0 = 256) (from INT_MIN to INT_MAX) (default 256)

None
mepre int | None

pre motion estimation (from INT_MIN to INT_MAX) (default 0)

None
intra_penalty int | None

Penalty for intra blocks in block decision (from 0 to 1.07374e+09) (default 0)

None

Returns:

Type Description
FFMpegEncoderOption

the set codec options

g722

G.722 ADPCM (codec adpcm_g722).

Returns:

Type Description
FFMpegEncoderOption

the set codec options

g723_1

g723_1() -> FFMpegEncoderOption

G.723.1.

Returns:

Type Description
FFMpegEncoderOption

the set codec options

g726

g726(code_size: int | None = None) -> FFMpegEncoderOption

G.726 ADPCM (codec adpcm_g726).

Parameters:

Name Type Description Default
code_size int | None

Bits per code (from 2 to 5) (default 4)

None

Returns:

Type Description
FFMpegEncoderOption

the set codec options

g726le

g726le(code_size: int | None = None) -> FFMpegEncoderOption

G.726 little endian ADPCM ("right-justified") (codec adpcm_g726le).

Parameters:

Name Type Description Default
code_size int | None

Bits per code (from 2 to 5) (default 4)

None

Returns:

Type Description
FFMpegEncoderOption

the set codec options

gif

gif(
    gifflags: str | None = None,
    gifimage: bool | None = None,
    global_palette: bool | None = None,
) -> FFMpegEncoderOption

GIF (Graphics Interchange Format).

Parameters:

Name Type Description Default
gifflags str | None

set GIF flags (default offsetting+transdiff)

None
gifimage bool | None

enable encoding only images per frame (default false)

None
global_palette bool | None

write a palette to the global gif header where feasible (default true)

None

Returns:

Type Description
FFMpegEncoderOption

the set codec options

h261

h261(
    mpv_flags: str | None = None,
    luma_elim_threshold: int | None = None,
    chroma_elim_threshold: int | None = None,
    quantizer_noise_shaping: int | None = None,
    error_rate: int | None = None,
    qsquish: float | None = None,
    rc_qmod_amp: float | None = None,
    rc_qmod_freq: int | None = None,
    rc_eq: str | None = None,
    rc_init_cplx: float | None = None,
    rc_buf_aggressivity: float | None = None,
    border_mask: float | None = None,
    lmin: int | None = None,
    lmax: int | None = None,
    skip_threshold: int | None = None,
    skip_factor: int | None = None,
    skip_exp: int | None = None,
    skip_cmp: (
        int
        | None
        | Literal[
            "sad",
            "sse",
            "satd",
            "dct",
            "psnr",
            "bit",
            "rd",
            "zero",
            "vsad",
            "vsse",
            "nsse",
            "dct264",
            "dctmax",
            "chroma",
            "msad",
        ]
    ) = None,
    sc_threshold: int | None = None,
    noise_reduction: int | None = None,
    ps: int | None = None,
    motion_est: (
        int | None | Literal["zero", "epzs", "xone"]
    ) = None,
    mepc: int | None = None,
    mepre: int | None = None,
    intra_penalty: int | None = None,
) -> FFMpegEncoderOption

H.261.

Parameters:

Name Type Description Default
mpv_flags str | None

Flags common for all mpegvideo-based encoders. (default 0)

None
luma_elim_threshold int | None

single coefficient elimination threshold for luminance (negative values also consider dc coefficient) (from INT_MIN to INT_MAX) (default 0)

None
chroma_elim_threshold int | None

single coefficient elimination threshold for chrominance (negative values also consider dc coefficient) (from INT_MIN to INT_MAX) (default 0)

None
quantizer_noise_shaping int | None

(from 0 to INT_MAX) (default 0)

None
error_rate int | None

Simulate errors in the bitstream to test error concealment. (from 0 to INT_MAX) (default 0)

None
qsquish float | None

how to keep quantizer between qmin and qmax (0 = clip, 1 = use differentiable function) (from 0 to 99) (default 0)

None
rc_qmod_amp float | None

experimental quantizer modulation (from -FLT_MAX to FLT_MAX) (default 0)

None
rc_qmod_freq int | None

experimental quantizer modulation (from INT_MIN to INT_MAX) (default 0)

None
rc_eq str | None

Set rate control equation. When computing the expression, besides the standard functions defined in the section 'Expression Evaluation', the following functions are available: bits2qp(bits), qp2bits(qp). Also the following constants are available: iTex pTex tex mv fCode iCount mcVar var isI isP isB avgQP qComp avgIITex avgPITex avgPPTex avgBPTex avgTex.

None
rc_init_cplx float | None

initial complexity for 1-pass encoding (from -FLT_MAX to FLT_MAX) (default 0)

None
rc_buf_aggressivity float | None

currently useless (from -FLT_MAX to FLT_MAX) (default 1)

None
border_mask float | None

increase the quantizer for macroblocks close to borders (from -FLT_MAX to FLT_MAX) (default 0)

None
lmin int | None

minimum Lagrange factor (VBR) (from 0 to INT_MAX) (default 236)

None
lmax int | None

maximum Lagrange factor (VBR) (from 0 to INT_MAX) (default 3658)

None
skip_threshold int | None

Frame skip threshold (from INT_MIN to INT_MAX) (default 0)

None
skip_factor int | None

Frame skip factor (from INT_MIN to INT_MAX) (default 0)

None
skip_exp int | None

Frame skip exponent (from INT_MIN to INT_MAX) (default 0)

None
skip_cmp int | None | Literal['sad', 'sse', 'satd', 'dct', 'psnr', 'bit', 'rd', 'zero', 'vsad', 'vsse', 'nsse', 'dct264', 'dctmax', 'chroma', 'msad']

Frame skip compare function (from INT_MIN to INT_MAX) (default dctmax)

None
sc_threshold int | None

Scene change threshold (from INT_MIN to INT_MAX) (default 0)

None
noise_reduction int | None

Noise reduction (from INT_MIN to INT_MAX) (default 0)

None
ps int | None

RTP payload size in bytes (from INT_MIN to INT_MAX) (default 0)

None
motion_est int | None | Literal['zero', 'epzs', 'xone']

motion estimation algorithm (from 0 to 2) (default epzs)

None
mepc int | None

Motion estimation bitrate penalty compensation (1.0 = 256) (from INT_MIN to INT_MAX) (default 256)

None
mepre int | None

pre motion estimation (from INT_MIN to INT_MAX) (default 0)

None
intra_penalty int | None

Penalty for intra blocks in block decision (from 0 to 1.07374e+09) (default 0)

None

Returns:

Type Description
FFMpegEncoderOption

the set codec options

h263

h263(
    obmc: bool | None = None,
    mb_info: int | None = None,
    mpv_flags: str | None = None,
    luma_elim_threshold: int | None = None,
    chroma_elim_threshold: int | None = None,
    quantizer_noise_shaping: int | None = None,
    error_rate: int | None = None,
    qsquish: float | None = None,
    rc_qmod_amp: float | None = None,
    rc_qmod_freq: int | None = None,
    rc_eq: str | None = None,
    rc_init_cplx: float | None = None,
    rc_buf_aggressivity: float | None = None,
    border_mask: float | None = None,
    lmin: int | None = None,
    lmax: int | None = None,
    skip_threshold: int | None = None,
    skip_factor: int | None = None,
    skip_exp: int | None = None,
    skip_cmp: (
        int
        | None
        | Literal[
            "sad",
            "sse",
            "satd",
            "dct",
            "psnr",
            "bit",
            "rd",
            "zero",
            "vsad",
            "vsse",
            "nsse",
            "dct264",
            "dctmax",
            "chroma",
            "msad",
        ]
    ) = None,
    sc_threshold: int | None = None,
    noise_reduction: int | None = None,
    ps: int | None = None,
    motion_est: (
        int | None | Literal["zero", "epzs", "xone"]
    ) = None,
    mepc: int | None = None,
    mepre: int | None = None,
    intra_penalty: int | None = None,
) -> FFMpegEncoderOption

H.263 / H.263-1996.

Parameters:

Name Type Description Default
obmc bool | None

use overlapped block motion compensation. (default false)

None
mb_info int | None

emit macroblock info for RFC 2190 packetization, the parameter value is the maximum payload size (from 0 to INT_MAX) (default 0)

None
mpv_flags str | None

Flags common for all mpegvideo-based encoders. (default 0)

None
luma_elim_threshold int | None

single coefficient elimination threshold for luminance (negative values also consider dc coefficient) (from INT_MIN to INT_MAX) (default 0)

None
chroma_elim_threshold int | None

single coefficient elimination threshold for chrominance (negative values also consider dc coefficient) (from INT_MIN to INT_MAX) (default 0)

None
quantizer_noise_shaping int | None

(from 0 to INT_MAX) (default 0)

None
error_rate int | None

Simulate errors in the bitstream to test error concealment. (from 0 to INT_MAX) (default 0)

None
qsquish float | None

how to keep quantizer between qmin and qmax (0 = clip, 1 = use differentiable function) (from 0 to 99) (default 0)

None
rc_qmod_amp float | None

experimental quantizer modulation (from -FLT_MAX to FLT_MAX) (default 0)

None
rc_qmod_freq int | None

experimental quantizer modulation (from INT_MIN to INT_MAX) (default 0)

None
rc_eq str | None

Set rate control equation. When computing the expression, besides the standard functions defined in the section 'Expression Evaluation', the following functions are available: bits2qp(bits), qp2bits(qp). Also the following constants are available: iTex pTex tex mv fCode iCount mcVar var isI isP isB avgQP qComp avgIITex avgPITex avgPPTex avgBPTex avgTex.

None
rc_init_cplx float | None

initial complexity for 1-pass encoding (from -FLT_MAX to FLT_MAX) (default 0)

None
rc_buf_aggressivity float | None

currently useless (from -FLT_MAX to FLT_MAX) (default 1)

None
border_mask float | None

increase the quantizer for macroblocks close to borders (from -FLT_MAX to FLT_MAX) (default 0)

None
lmin int | None

minimum Lagrange factor (VBR) (from 0 to INT_MAX) (default 236)

None
lmax int | None

maximum Lagrange factor (VBR) (from 0 to INT_MAX) (default 3658)

None
skip_threshold int | None

Frame skip threshold (from INT_MIN to INT_MAX) (default 0)

None
skip_factor int | None

Frame skip factor (from INT_MIN to INT_MAX) (default 0)

None
skip_exp int | None

Frame skip exponent (from INT_MIN to INT_MAX) (default 0)

None
skip_cmp int | None | Literal['sad', 'sse', 'satd', 'dct', 'psnr', 'bit', 'rd', 'zero', 'vsad', 'vsse', 'nsse', 'dct264', 'dctmax', 'chroma', 'msad']

Frame skip compare function (from INT_MIN to INT_MAX) (default dctmax)

None
sc_threshold int | None

Scene change threshold (from INT_MIN to INT_MAX) (default 0)

None
noise_reduction int | None

Noise reduction (from INT_MIN to INT_MAX) (default 0)

None
ps int | None

RTP payload size in bytes (from INT_MIN to INT_MAX) (default 0)

None
motion_est int | None | Literal['zero', 'epzs', 'xone']

motion estimation algorithm (from 0 to 2) (default epzs)

None
mepc int | None

Motion estimation bitrate penalty compensation (1.0 = 256) (from INT_MIN to INT_MAX) (default 256)

None
mepre int | None

pre motion estimation (from INT_MIN to INT_MAX) (default 0)

None
intra_penalty int | None

Penalty for intra blocks in block decision (from 0 to 1.07374e+09) (default 0)

None

Returns:

Type Description
FFMpegEncoderOption

the set codec options

h263_v4l2m2m

h263_v4l2m2m(
    num_output_buffers: int | None = None,
    num_capture_buffers: int | None = None,
) -> FFMpegEncoderOption

V4L2 mem2mem H.263 encoder wrapper (codec h263).

Parameters:

Name Type Description Default
num_output_buffers int | None

Number of buffers in the output context (from 2 to INT_MAX) (default 16)

None
num_capture_buffers int | None

Number of buffers in the capture context (from 4 to INT_MAX) (default 4)

None

Returns:

Type Description
FFMpegEncoderOption

the set codec options

h263p

h263p(
    umv: bool | None = None,
    aiv: bool | None = None,
    obmc: bool | None = None,
    structured_slices: bool | None = None,
    mpv_flags: str | None = None,
    luma_elim_threshold: int | None = None,
    chroma_elim_threshold: int | None = None,
    quantizer_noise_shaping: int | None = None,
    error_rate: int | None = None,
    qsquish: float | None = None,
    rc_qmod_amp: float | None = None,
    rc_qmod_freq: int | None = None,
    rc_eq: str | None = None,
    rc_init_cplx: float | None = None,
    rc_buf_aggressivity: float | None = None,
    border_mask: float | None = None,
    lmin: int | None = None,
    lmax: int | None = None,
    skip_threshold: int | None = None,
    skip_factor: int | None = None,
    skip_exp: int | None = None,
    skip_cmp: (
        int
        | None
        | Literal[
            "sad",
            "sse",
            "satd",
            "dct",
            "psnr",
            "bit",
            "rd",
            "zero",
            "vsad",
            "vsse",
            "nsse",
            "dct264",
            "dctmax",
            "chroma",
            "msad",
        ]
    ) = None,
    sc_threshold: int | None = None,
    noise_reduction: int | None = None,
    ps: int | None = None,
    motion_est: (
        int | None | Literal["zero", "epzs", "xone"]
    ) = None,
    mepc: int | None = None,
    mepre: int | None = None,
    intra_penalty: int | None = None,
) -> FFMpegEncoderOption

H.263+ / H.263-1998 / H.263 version 2.

Parameters:

Name Type Description Default
umv bool | None

Use unlimited motion vectors. (default false)

None
aiv bool | None

Use alternative inter VLC. (default false)

None
obmc bool | None

use overlapped block motion compensation. (default false)

None
structured_slices bool | None

Write slice start position at every GOB header instead of just GOB number. (default false)

None
mpv_flags str | None

Flags common for all mpegvideo-based encoders. (default 0)

None
luma_elim_threshold int | None

single coefficient elimination threshold for luminance (negative values also consider dc coefficient) (from INT_MIN to INT_MAX) (default 0)

None
chroma_elim_threshold int | None

single coefficient elimination threshold for chrominance (negative values also consider dc coefficient) (from INT_MIN to INT_MAX) (default 0)

None
quantizer_noise_shaping int | None

(from 0 to INT_MAX) (default 0)

None
error_rate int | None

Simulate errors in the bitstream to test error concealment. (from 0 to INT_MAX) (default 0)

None
qsquish float | None

how to keep quantizer between qmin and qmax (0 = clip, 1 = use differentiable function) (from 0 to 99) (default 0)

None
rc_qmod_amp float | None

experimental quantizer modulation (from -FLT_MAX to FLT_MAX) (default 0)

None
rc_qmod_freq int | None

experimental quantizer modulation (from INT_MIN to INT_MAX) (default 0)

None
rc_eq str | None

Set rate control equation. When computing the expression, besides the standard functions defined in the section 'Expression Evaluation', the following functions are available: bits2qp(bits), qp2bits(qp). Also the following constants are available: iTex pTex tex mv fCode iCount mcVar var isI isP isB avgQP qComp avgIITex avgPITex avgPPTex avgBPTex avgTex.

None
rc_init_cplx float | None

initial complexity for 1-pass encoding (from -FLT_MAX to FLT_MAX) (default 0)

None
rc_buf_aggressivity float | None

currently useless (from -FLT_MAX to FLT_MAX) (default 1)

None
border_mask float | None

increase the quantizer for macroblocks close to borders (from -FLT_MAX to FLT_MAX) (default 0)

None
lmin int | None

minimum Lagrange factor (VBR) (from 0 to INT_MAX) (default 236)

None
lmax int | None

maximum Lagrange factor (VBR) (from 0 to INT_MAX) (default 3658)

None
skip_threshold int | None

Frame skip threshold (from INT_MIN to INT_MAX) (default 0)

None
skip_factor int | None

Frame skip factor (from INT_MIN to INT_MAX) (default 0)

None
skip_exp int | None

Frame skip exponent (from INT_MIN to INT_MAX) (default 0)

None
skip_cmp int | None | Literal['sad', 'sse', 'satd', 'dct', 'psnr', 'bit', 'rd', 'zero', 'vsad', 'vsse', 'nsse', 'dct264', 'dctmax', 'chroma', 'msad']

Frame skip compare function (from INT_MIN to INT_MAX) (default dctmax)

None
sc_threshold int | None

Scene change threshold (from INT_MIN to INT_MAX) (default 0)

None
noise_reduction int | None

Noise reduction (from INT_MIN to INT_MAX) (default 0)

None
ps int | None

RTP payload size in bytes (from INT_MIN to INT_MAX) (default 0)

None
motion_est int | None | Literal['zero', 'epzs', 'xone']

motion estimation algorithm (from 0 to 2) (default epzs)

None
mepc int | None

Motion estimation bitrate penalty compensation (1.0 = 256) (from INT_MIN to INT_MAX) (default 256)

None
mepre int | None

pre motion estimation (from INT_MIN to INT_MAX) (default 0)

None
intra_penalty int | None

Penalty for intra blocks in block decision (from 0 to 1.07374e+09) (default 0)

None

Returns:

Type Description
FFMpegEncoderOption

the set codec options

h264_nvenc

h264_nvenc(
    preset: (
        int
        | None
        | Literal[
            "default",
            "slow",
            "medium",
            "fast",
            "hp",
            "hq",
            "bd",
            "ll",
            "llhq",
            "llhp",
            "lossless",
            "losslesshp",
            "p1",
            "p2",
            "p3",
            "p4",
            "p5",
            "p6",
            "p7",
        ]
    ) = None,
    tune: (
        int | None | Literal["hq", "ll", "ull", "lossless"]
    ) = None,
    profile: (
        int
        | None
        | Literal["baseline", "main", "high", "high444p"]
    ) = None,
    level: (
        int
        | None
        | Literal[
            "auto",
            "1",
            "1.0",
            "1b",
            "1.0b",
            "1.1",
            "1.2",
            "1.3",
            "2",
            "2.0",
            "2.1",
            "2.2",
            "3",
            "3.0",
            "3.1",
            "3.2",
            "4",
            "4.0",
            "4.1",
            "4.2",
            "5",
            "5.0",
            "5.1",
            "5.2",
            "6.0",
            "6.1",
            "6.2",
        ]
    ) = None,
    rc: (
        int
        | None
        | Literal[
            "constqp",
            "vbr",
            "cbr",
            "vbr_minqp",
            "ll_2pass_quality",
            "ll_2pass_size",
            "vbr_2pass",
            "cbr_ld_hq",
            "cbr_hq",
            "vbr_hq",
        ]
    ) = None,
    rc_lookahead: int | None = None,
    surfaces: int | None = None,
    cbr: bool | None = None,
    _2pass: bool | None = None,
    gpu: int | None | Literal["any", "list"] = None,
    rgb_mode: (
        int | None | Literal["yuv420", "yuv444", "disabled"]
    ) = None,
    delay: int | None = None,
    no_scenecut: bool | None = None,
    forced_idr: bool | None = None,
    b_adapt: bool | None = None,
    spatial_aq: bool | None = None,
    temporal_aq: bool | None = None,
    zerolatency: bool | None = None,
    nonref_p: bool | None = None,
    strict_gop: bool | None = None,
    aq_strength: int | None = None,
    cq: float | None = None,
    aud: bool | None = None,
    bluray_compat: bool | None = None,
    init_qpP: int | None = None,
    init_qpB: int | None = None,
    init_qpI: int | None = None,
    qp: int | None = None,
    qp_cb_offset: int | None = None,
    qp_cr_offset: int | None = None,
    weighted_pred: int | None = None,
    coder: (
        int
        | None
        | Literal[
            "default", "auto", "cabac", "cavlc", "ac", "vlc"
        ]
    ) = None,
    b_ref_mode: (
        int | None | Literal["disabled", "each", "middle"]
    ) = None,
    a53cc: bool | None = None,
    dpb_size: int | None = None,
    multipass: (
        int | None | Literal["disabled", "qres", "fullres"]
    ) = None,
    ldkfs: int | None = None,
    extra_sei: bool | None = None,
    udu_sei: bool | None = None,
    intra_refresh: bool | None = None,
    single_slice_intra_refresh: bool | None = None,
    max_slice_size: int | None = None,
    constrained_encoding: bool | None = None,
) -> FFMpegEncoderOption

NVIDIA NVENC H.264 encoder (codec h264).

Parameters:

Name Type Description Default
preset int | None | Literal['default', 'slow', 'medium', 'fast', 'hp', 'hq', 'bd', 'll', 'llhq', 'llhp', 'lossless', 'losslesshp', 'p1', 'p2', 'p3', 'p4', 'p5', 'p6', 'p7']

Set the encoding preset (from 0 to 18) (default p4)

None
tune int | None | Literal['hq', 'll', 'ull', 'lossless']

Set the encoding tuning info (from 1 to 4) (default hq)

None
profile int | None | Literal['baseline', 'main', 'high', 'high444p']

Set the encoding profile (from 0 to 3) (default main)

None
level int | None | Literal['auto', '1', '1.0', '1b', '1.0b', '1.1', '1.2', '1.3', '2', '2.0', '2.1', '2.2', '3', '3.0', '3.1', '3.2', '4', '4.0', '4.1', '4.2', '5', '5.0', '5.1', '5.2', '6.0', '6.1', '6.2']

Set the encoding level restriction (from 0 to 62) (default auto)

None
rc int | None | Literal['constqp', 'vbr', 'cbr', 'vbr_minqp', 'll_2pass_quality', 'll_2pass_size', 'vbr_2pass', 'cbr_ld_hq', 'cbr_hq', 'vbr_hq']

Override the preset rate-control (from -1 to INT_MAX) (default -1)

None
rc_lookahead int | None

Number of frames to look ahead for rate-control (from 0 to INT_MAX) (default 0)

None
surfaces int | None

Number of concurrent surfaces (from 0 to 64) (default 0)

None
cbr bool | None

Use cbr encoding mode (default false)

None
_2pass bool | None

Use 2pass encoding mode (default auto)

None
gpu int | None | Literal['any', 'list']

Selects which NVENC capable GPU to use. First GPU is 0, second is 1, and so on. (from -2 to INT_MAX) (default any)

None
rgb_mode int | None | Literal['yuv420', 'yuv444', 'disabled']

Configure how nvenc handles packed RGB input. (from 0 to INT_MAX) (default yuv420)

None
delay int | None

Delay frame output by the given amount of frames (from 0 to INT_MAX) (default INT_MAX)

None
no_scenecut bool | None

When lookahead is enabled, set this to 1 to disable adaptive I-frame insertion at scene cuts (default false)

None
forced_idr bool | None

If forcing keyframes, force them as IDR frames. (default false)

None
b_adapt bool | None

When lookahead is enabled, set this to 0 to disable adaptive B-frame decision (default true)

None
spatial_aq bool | None

set to 1 to enable Spatial AQ (default false)

None
temporal_aq bool | None

set to 1 to enable Temporal AQ (default false)

None
zerolatency bool | None

Set 1 to indicate zero latency operation (no reordering delay) (default false)

None
nonref_p bool | None

Set this to 1 to enable automatic insertion of non-reference P-frames (default false)

None
strict_gop bool | None

Set 1 to minimize GOP-to-GOP rate fluctuations (default false)

None
aq_strength int | None

When Spatial AQ is enabled, this field is used to specify AQ strength. AQ strength scale is from 1 (low) - 15 (aggressive) (from 1 to 15) (default 8)

None
cq float | None

Set target quality level (0 to 51, 0 means automatic) for constant quality mode in VBR rate control (from 0 to 51) (default 0)

None
aud bool | None

Use access unit delimiters (default false)

None
bluray_compat bool | None

Bluray compatibility workarounds (default false)

None
init_qpP int | None

Initial QP value for P frame (from -1 to 51) (default -1)

None
init_qpB int | None

Initial QP value for B frame (from -1 to 51) (default -1)

None
init_qpI int | None

Initial QP value for I frame (from -1 to 51) (default -1)

None
qp int | None

Constant quantization parameter rate control method (from -1 to 51) (default -1)

None
qp_cb_offset int | None

Quantization parameter offset for cb channel (from -12 to 12) (default 0)

None
qp_cr_offset int | None

Quantization parameter offset for cr channel (from -12 to 12) (default 0)

None
weighted_pred int | None

Set 1 to enable weighted prediction (from 0 to 1) (default 0)

None
coder int | None | Literal['default', 'auto', 'cabac', 'cavlc', 'ac', 'vlc']

Coder type (from -1 to 2) (default default)

None
b_ref_mode int | None | Literal['disabled', 'each', 'middle']

Use B frames as references (from -1 to 2) (default -1)

None
a53cc bool | None

Use A53 Closed Captions (if available) (default true)

None
dpb_size int | None

Specifies the DPB size used for encoding (0 means automatic) (from 0 to INT_MAX) (default 0)

None
multipass int | None | Literal['disabled', 'qres', 'fullres']

Set the multipass encoding (from 0 to 2) (default disabled)

None
ldkfs int | None

Low delay key frame scale; Specifies the Scene Change frame size increase allowed in case of single frame VBV and CBR (from 0 to 255) (default 0)

None
extra_sei bool | None

Pass on extra SEI data (e.g. a53 cc) to be included in the bitstream (default true)

None
udu_sei bool | None

Pass on user data unregistered SEI if available (default false)

None
intra_refresh bool | None

Use Periodic Intra Refresh instead of IDR frames (default false)

None
single_slice_intra_refresh bool | None

Use single slice intra refresh (default false)

None
max_slice_size int | None

Maximum encoded slice size in bytes (from 0 to INT_MAX) (default 0)

None
constrained_encoding bool | None

Enable constrainedFrame encoding where each slice in the constrained picture is independent of other slices (default false)

None

Returns:

Type Description
FFMpegEncoderOption

the set codec options

h264_v4l2m2m

h264_v4l2m2m(
    num_output_buffers: int | None = None,
    num_capture_buffers: int | None = None,
) -> FFMpegEncoderOption

V4L2 mem2mem H.264 encoder wrapper (codec h264).

Parameters:

Name Type Description Default
num_output_buffers int | None

Number of buffers in the output context (from 2 to INT_MAX) (default 16)

None
num_capture_buffers int | None

Number of buffers in the capture context (from 4 to INT_MAX) (default 4)

None

Returns:

Type Description
FFMpegEncoderOption

the set codec options

h264_vaapi

h264_vaapi(
    low_power: bool | None = None,
    idr_interval: int | None = None,
    b_depth: int | None = None,
    async_depth: int | None = None,
    max_frame_size: int | None = None,
    rc_mode: (
        int
        | None
        | Literal[
            "auto",
            "CQP",
            "CBR",
            "VBR",
            "ICQ",
            "QVBR",
            "AVBR",
        ]
    ) = None,
    qp: int | None = None,
    quality: int | None = None,
    coder: (
        int | None | Literal["cavlc", "cabac", "vlc", "ac"]
    ) = None,
    aud: bool | None = None,
    sei: str | None = None,
    profile: (
        int
        | None
        | Literal[
            "constrained_baseline", "main", "high", "high10"
        ]
    ) = None,
    level: (
        int
        | None
        | Literal[
            "1",
            "1.1",
            "1.2",
            "1.3",
            "2",
            "2.1",
            "2.2",
            "3",
            "3.1",
            "3.2",
            "4",
            "4.1",
            "4.2",
            "5",
            "5.1",
            "5.2",
            "6",
            "6.1",
            "6.2",
        ]
    ) = None,
) -> FFMpegEncoderOption

H.264/AVC (VAAPI) (codec h264).

Parameters:

Name Type Description Default
low_power bool | None

Use low-power encoding mode (only available on some platforms; may not support all encoding features) (default false)

None
idr_interval int | None

Distance (in I-frames) between IDR frames (from 0 to INT_MAX) (default 0)

None
b_depth int | None

Maximum B-frame reference depth (from 1 to INT_MAX) (default 1)

None
async_depth int | None

Maximum processing parallelism. Increase this to improve single channel performance. This option doesn't work if driver doesn't implement vaSyncBuffer function. (from 1 to 64) (default 2)

None
max_frame_size int | None

Maximum frame size (in bytes) (from 0 to INT_MAX) (default 0)

None
rc_mode int | None | Literal['auto', 'CQP', 'CBR', 'VBR', 'ICQ', 'QVBR', 'AVBR']

Set rate control mode (from 0 to 6) (default auto)

None
qp int | None

Constant QP (for P-frames; scaled by qfactor/qoffset for I/B) (from 0 to 52) (default 0)

None
quality int | None

Set encode quality (trades off against speed, higher is faster) (from -1 to INT_MAX) (default -1)

None
coder int | None | Literal['cavlc', 'cabac', 'vlc', 'ac']

Entropy coder type (from 0 to 1) (default cabac)

None
aud bool | None

Include AUD (default false)

None
sei str | None

Set SEI to include (default identifier+timing+recovery_point+a53_cc)

None
profile int | None | Literal['constrained_baseline', 'main', 'high', 'high10']

Set profile (profile_idc and constraint_set*_flag) (from -99 to 65535) (default -99)

None
level int | None | Literal['1', '1.1', '1.2', '1.3', '2', '2.1', '2.2', '3', '3.1', '3.2', '4', '4.1', '4.2', '5', '5.1', '5.2', '6', '6.1', '6.2']

Set level (level_idc) (from -99 to 255) (default -99)

None

Returns:

Type Description
FFMpegEncoderOption

the set codec options

hap

hap(
    format: (
        int | None | Literal["hap", "hap_alpha", "hap_q"]
    ) = None,
    chunks: int | None = None,
    compressor: (
        int | None | Literal["none", "snappy"]
    ) = None,
) -> FFMpegEncoderOption

Vidvox Hap.

Parameters:

Name Type Description Default
format int | None | Literal['hap', 'hap_alpha', 'hap_q']

(from 11 to 15) (default hap)

None
chunks int | None

chunk count (from 1 to 64) (default 1)

None
compressor int | None | Literal['none', 'snappy']

second-stage compressor (from 160 to 176) (default snappy)

None

Returns:

Type Description
FFMpegEncoderOption

the set codec options

hdr

HDR (Radiance RGBE format) image.

Returns:

Type Description
FFMpegEncoderOption

the set codec options

hevc_nvenc

hevc_nvenc(
    preset: (
        int
        | None
        | Literal[
            "default",
            "slow",
            "medium",
            "fast",
            "hp",
            "hq",
            "bd",
            "ll",
            "llhq",
            "llhp",
            "lossless",
            "losslesshp",
            "p1",
            "p2",
            "p3",
            "p4",
            "p5",
            "p6",
            "p7",
        ]
    ) = None,
    tune: (
        int | None | Literal["hq", "ll", "ull", "lossless"]
    ) = None,
    profile: (
        int | None | Literal["main", "main10", "rext"]
    ) = None,
    level: (
        int
        | None
        | Literal[
            "auto",
            "1",
            "1.0",
            "2",
            "2.0",
            "2.1",
            "3",
            "3.0",
            "3.1",
            "4",
            "4.0",
            "4.1",
            "5",
            "5.0",
            "5.1",
            "5.2",
            "6",
            "6.0",
            "6.1",
            "6.2",
        ]
    ) = None,
    tier: int | None | Literal["main", "high"] = None,
    rc: (
        int
        | None
        | Literal[
            "constqp",
            "vbr",
            "cbr",
            "vbr_minqp",
            "ll_2pass_quality",
            "ll_2pass_size",
            "vbr_2pass",
            "cbr_ld_hq",
            "cbr_hq",
            "vbr_hq",
        ]
    ) = None,
    rc_lookahead: int | None = None,
    surfaces: int | None = None,
    cbr: bool | None = None,
    _2pass: bool | None = None,
    gpu: int | None | Literal["any", "list"] = None,
    rgb_mode: (
        int | None | Literal["yuv420", "yuv444", "disabled"]
    ) = None,
    delay: int | None = None,
    no_scenecut: bool | None = None,
    forced_idr: bool | None = None,
    spatial_aq: bool | None = None,
    temporal_aq: bool | None = None,
    zerolatency: bool | None = None,
    nonref_p: bool | None = None,
    strict_gop: bool | None = None,
    aq_strength: int | None = None,
    cq: float | None = None,
    aud: bool | None = None,
    bluray_compat: bool | None = None,
    init_qpP: int | None = None,
    init_qpB: int | None = None,
    init_qpI: int | None = None,
    qp: int | None = None,
    qp_cb_offset: int | None = None,
    qp_cr_offset: int | None = None,
    weighted_pred: int | None = None,
    b_ref_mode: (
        int | None | Literal["disabled", "each", "middle"]
    ) = None,
    a53cc: bool | None = None,
    s12m_tc: bool | None = None,
    dpb_size: int | None = None,
    multipass: (
        int | None | Literal["disabled", "qres", "fullres"]
    ) = None,
    ldkfs: int | None = None,
    extra_sei: bool | None = None,
    udu_sei: bool | None = None,
    intra_refresh: bool | None = None,
    single_slice_intra_refresh: bool | None = None,
    max_slice_size: int | None = None,
    constrained_encoding: bool | None = None,
) -> FFMpegEncoderOption

NVIDIA NVENC hevc encoder (codec hevc).

Parameters:

Name Type Description Default
preset int | None | Literal['default', 'slow', 'medium', 'fast', 'hp', 'hq', 'bd', 'll', 'llhq', 'llhp', 'lossless', 'losslesshp', 'p1', 'p2', 'p3', 'p4', 'p5', 'p6', 'p7']

Set the encoding preset (from 0 to 18) (default p4)

None
tune int | None | Literal['hq', 'll', 'ull', 'lossless']

Set the encoding tuning info (from 1 to 4) (default hq)

None
profile int | None | Literal['main', 'main10', 'rext']

Set the encoding profile (from 0 to 4) (default main)

None
level int | None | Literal['auto', '1', '1.0', '2', '2.0', '2.1', '3', '3.0', '3.1', '4', '4.0', '4.1', '5', '5.0', '5.1', '5.2', '6', '6.0', '6.1', '6.2']

Set the encoding level restriction (from 0 to 186) (default auto)

None
tier int | None | Literal['main', 'high']

Set the encoding tier (from 0 to 1) (default main)

None
rc int | None | Literal['constqp', 'vbr', 'cbr', 'vbr_minqp', 'll_2pass_quality', 'll_2pass_size', 'vbr_2pass', 'cbr_ld_hq', 'cbr_hq', 'vbr_hq']

Override the preset rate-control (from -1 to INT_MAX) (default -1)

None
rc_lookahead int | None

Number of frames to look ahead for rate-control (from 0 to INT_MAX) (default 0)

None
surfaces int | None

Number of concurrent surfaces (from 0 to 64) (default 0)

None
cbr bool | None

Use cbr encoding mode (default false)

None
_2pass bool | None

Use 2pass encoding mode (default auto)

None
gpu int | None | Literal['any', 'list']

Selects which NVENC capable GPU to use. First GPU is 0, second is 1, and so on. (from -2 to INT_MAX) (default any)

None
rgb_mode int | None | Literal['yuv420', 'yuv444', 'disabled']

Configure how nvenc handles packed RGB input. (from 0 to INT_MAX) (default yuv420)

None
delay int | None

Delay frame output by the given amount of frames (from 0 to INT_MAX) (default INT_MAX)

None
no_scenecut bool | None

When lookahead is enabled, set this to 1 to disable adaptive I-frame insertion at scene cuts (default false)

None
forced_idr bool | None

If forcing keyframes, force them as IDR frames. (default false)

None
spatial_aq bool | None

set to 1 to enable Spatial AQ (default false)

None
temporal_aq bool | None

set to 1 to enable Temporal AQ (default false)

None
zerolatency bool | None

Set 1 to indicate zero latency operation (no reordering delay) (default false)

None
nonref_p bool | None

Set this to 1 to enable automatic insertion of non-reference P-frames (default false)

None
strict_gop bool | None

Set 1 to minimize GOP-to-GOP rate fluctuations (default false)

None
aq_strength int | None

When Spatial AQ is enabled, this field is used to specify AQ strength. AQ strength scale is from 1 (low) - 15 (aggressive) (from 1 to 15) (default 8)

None
cq float | None

Set target quality level (0 to 51, 0 means automatic) for constant quality mode in VBR rate control (from 0 to 51) (default 0)

None
aud bool | None

Use access unit delimiters (default false)

None
bluray_compat bool | None

Bluray compatibility workarounds (default false)

None
init_qpP int | None

Initial QP value for P frame (from -1 to 51) (default -1)

None
init_qpB int | None

Initial QP value for B frame (from -1 to 51) (default -1)

None
init_qpI int | None

Initial QP value for I frame (from -1 to 51) (default -1)

None
qp int | None

Constant quantization parameter rate control method (from -1 to 51) (default -1)

None
qp_cb_offset int | None

Quantization parameter offset for cb channel (from -12 to 12) (default 0)

None
qp_cr_offset int | None

Quantization parameter offset for cr channel (from -12 to 12) (default 0)

None
weighted_pred int | None

Set 1 to enable weighted prediction (from 0 to 1) (default 0)

None
b_ref_mode int | None | Literal['disabled', 'each', 'middle']

Use B frames as references (from -1 to 2) (default -1)

None
a53cc bool | None

Use A53 Closed Captions (if available) (default true)

None
s12m_tc bool | None

Use timecode (if available) (default true)

None
dpb_size int | None

Specifies the DPB size used for encoding (0 means automatic) (from 0 to INT_MAX) (default 0)

None
multipass int | None | Literal['disabled', 'qres', 'fullres']

Set the multipass encoding (from 0 to 2) (default disabled)

None
ldkfs int | None

Low delay key frame scale; Specifies the Scene Change frame size increase allowed in case of single frame VBV and CBR (from 0 to 255) (default 0)

None
extra_sei bool | None

Pass on extra SEI data (e.g. a53 cc) to be included in the bitstream (default true)

None
udu_sei bool | None

Pass on user data unregistered SEI if available (default false)

None
intra_refresh bool | None

Use Periodic Intra Refresh instead of IDR frames (default false)

None
single_slice_intra_refresh bool | None

Use single slice intra refresh (default false)

None
max_slice_size int | None

Maximum encoded slice size in bytes (from 0 to INT_MAX) (default 0)

None
constrained_encoding bool | None

Enable constrainedFrame encoding where each slice in the constrained picture is independent of other slices (default false)

None

Returns:

Type Description
FFMpegEncoderOption

the set codec options

hevc_v4l2m2m

hevc_v4l2m2m(
    num_output_buffers: int | None = None,
    num_capture_buffers: int | None = None,
) -> FFMpegEncoderOption

V4L2 mem2mem HEVC encoder wrapper (codec hevc).

Parameters:

Name Type Description Default
num_output_buffers int | None

Number of buffers in the output context (from 2 to INT_MAX) (default 16)

None
num_capture_buffers int | None

Number of buffers in the capture context (from 4 to INT_MAX) (default 4)

None

Returns:

Type Description
FFMpegEncoderOption

the set codec options

hevc_vaapi

hevc_vaapi(
    low_power: bool | None = None,
    idr_interval: int | None = None,
    b_depth: int | None = None,
    async_depth: int | None = None,
    max_frame_size: int | None = None,
    rc_mode: (
        int
        | None
        | Literal[
            "auto",
            "CQP",
            "CBR",
            "VBR",
            "ICQ",
            "QVBR",
            "AVBR",
        ]
    ) = None,
    qp: int | None = None,
    aud: bool | None = None,
    profile: (
        int | None | Literal["main", "main10", "rext"]
    ) = None,
    tier: int | None | Literal["main", "high"] = None,
    level: (
        int
        | None
        | Literal[
            "1",
            "2",
            "2.1",
            "3",
            "3.1",
            "4",
            "4.1",
            "5",
            "5.1",
            "5.2",
            "6",
            "6.1",
            "6.2",
        ]
    ) = None,
    sei: str | None = None,
    tiles: str | None = None,
) -> FFMpegEncoderOption

H.265/HEVC (VAAPI) (codec hevc).

Parameters:

Name Type Description Default
low_power bool | None

Use low-power encoding mode (only available on some platforms; may not support all encoding features) (default false)

None
idr_interval int | None

Distance (in I-frames) between IDR frames (from 0 to INT_MAX) (default 0)

None
b_depth int | None

Maximum B-frame reference depth (from 1 to INT_MAX) (default 1)

None
async_depth int | None

Maximum processing parallelism. Increase this to improve single channel performance. This option doesn't work if driver doesn't implement vaSyncBuffer function. (from 1 to 64) (default 2)

None
max_frame_size int | None

Maximum frame size (in bytes) (from 0 to INT_MAX) (default 0)

None
rc_mode int | None | Literal['auto', 'CQP', 'CBR', 'VBR', 'ICQ', 'QVBR', 'AVBR']

Set rate control mode (from 0 to 6) (default auto)

None
qp int | None

Constant QP (for P-frames; scaled by qfactor/qoffset for I/B) (from 0 to 52) (default 0)

None
aud bool | None

Include AUD (default false)

None
profile int | None | Literal['main', 'main10', 'rext']

Set profile (general_profile_idc) (from -99 to 255) (default -99)

None
tier int | None | Literal['main', 'high']

Set tier (general_tier_flag) (from 0 to 1) (default main)

None
level int | None | Literal['1', '2', '2.1', '3', '3.1', '4', '4.1', '5', '5.1', '5.2', '6', '6.1', '6.2']

Set level (general_level_idc) (from -99 to 255) (default -99)

None
sei str | None

Set SEI to include (default hdr+a53_cc)

None
tiles str | None

Tile columns x rows

None

Returns:

Type Description
FFMpegEncoderOption

the set codec options

huffyuv

huffyuv(
    non_deterministic: bool | None = None,
    pred: (
        int | None | Literal["left", "plane", "median"]
    ) = None,
) -> FFMpegEncoderOption

Huffyuv / HuffYUV.

Parameters:

Name Type Description Default
non_deterministic bool | None

Allow multithreading for e.g. context=1 at the expense of determinism (default false)

None
pred int | None | Literal['left', 'plane', 'median']

Prediction method (from 0 to 2) (default left)

None

Returns:

Type Description
FFMpegEncoderOption

the set codec options

jpeg2000

jpeg2000(
    format: int | None | Literal["j2k", "jp2"] = None,
    tile_width: int | None = None,
    tile_height: int | None = None,
    pred: int | None | Literal["dwt97int", "dwt53"] = None,
    sop: int | None = None,
    eph: int | None = None,
    prog: (
        int
        | None
        | Literal["lrcp", "rlcp", "rpcl", "pcrl", "cprl"]
    ) = None,
    layer_rates: str | None = None,
) -> FFMpegEncoderOption

JPEG 2000.

Parameters:

Name Type Description Default
format int | None | Literal['j2k', 'jp2']

Codec Format (from 0 to 1) (default jp2)

None
tile_width int | None

Tile Width (from 1 to 1.07374e+09) (default 256)

None
tile_height int | None

Tile Height (from 1 to 1.07374e+09) (default 256)

None
pred int | None | Literal['dwt97int', 'dwt53']

DWT Type (from 0 to 1) (default dwt97int)

None
sop int | None

SOP marker (from 0 to 1) (default 0)

None
eph int | None

EPH marker (from 0 to 1) (default 0)

None
prog int | None | Literal['lrcp', 'rlcp', 'rpcl', 'pcrl', 'cprl']

Progression Order (from 0 to 4) (default lrcp)

None
layer_rates str | None

Layer Rates

None

Returns:

Type Description
FFMpegEncoderOption

the set codec options

jpegls

jpegls(
    pred: (
        int | None | Literal["left", "plane", "median"]
    ) = None,
) -> FFMpegEncoderOption

JPEG-LS.

Parameters:

Name Type Description Default
pred int | None | Literal['left', 'plane', 'median']

Prediction method (from 0 to 2) (default left)

None

Returns:

Type Description
FFMpegEncoderOption

the set codec options

libcodec2

libcodec2(
    mode: (
        int
        | None
        | Literal[
            "3200",
            "2400",
            "1600",
            "1400",
            "1300",
            "1200",
            "700",
            "700B",
            "700C",
        ]
    ) = None,
) -> FFMpegEncoderOption

codec2 encoder using libcodec2 (codec codec2).

Parameters:

Name Type Description Default
mode int | None | Literal['3200', '2400', '1600', '1400', '1300', '1200', '700', '700B', '700C']

codec2 mode (from 0 to 8) (default 1300)

None

Returns:

Type Description
FFMpegEncoderOption

the set codec options

libgsm

libgsm() -> FFMpegEncoderOption

Libgsm GSM (codec gsm).

Returns:

Type Description
FFMpegEncoderOption

the set codec options

libgsm_ms

libgsm_ms() -> FFMpegEncoderOption

Libgsm GSM Microsoft variant (codec gsm_ms).

Returns:

Type Description
FFMpegEncoderOption

the set codec options

libjxl

libjxl(
    effort: int | None = None,
    distance: float | None = None,
    modular: int | None = None,
) -> FFMpegEncoderOption

Libjxl JPEG XL (codec jpegxl).

Parameters:

Name Type Description Default
effort int | None

Encoding effort (from 1 to 9) (default 7)

None
distance float | None

Maximum Butteraugli distance (quality setting, lower = better, zero = lossless, default 1.0) (from -1 to 15) (default -1)

None
modular int | None

Force modular mode (from 0 to 1) (default 0)

None

Returns:

Type Description
FFMpegEncoderOption

the set codec options

libmp3lame

libmp3lame(
    reservoir: bool | None = None,
    joint_stereo: bool | None = None,
    abr: bool | None = None,
    copyright: bool | None = None,
    original: bool | None = None,
) -> FFMpegEncoderOption

libmp3lame MP3 (MPEG audio layer 3) (codec mp3).

Parameters:

Name Type Description Default
reservoir bool | None

use bit reservoir (default true)

None
joint_stereo bool | None

use joint stereo (default true)

None
abr bool | None

use ABR (default false)

None
copyright bool | None

set copyright flag (default false)

None
original bool | None

set original flag (default true)

None

Returns:

Type Description
FFMpegEncoderOption

the set codec options

libopenjpeg

libopenjpeg(
    format: int | None | Literal["j2k", "jp2"] = None,
    profile: (
        int
        | None
        | Literal["jpeg2000", "cinema2k", "cinema4k"]
    ) = None,
    cinema_mode: (
        int
        | None
        | Literal["off", "2k_24", "2k_48", "4k_24"]
    ) = None,
    prog_order: (
        int
        | None
        | Literal["lrcp", "rlcp", "rpcl", "pcrl", "cprl"]
    ) = None,
    numresolution: int | None = None,
    irreversible: int | None = None,
    disto_alloc: int | None = None,
    fixed_quality: int | None = None,
) -> FFMpegEncoderOption

OpenJPEG JPEG 2000 (codec jpeg2000).

Parameters:

Name Type Description Default
format int | None | Literal['j2k', 'jp2']

Codec Format (from 0 to 2) (default jp2)

None
profile int | None | Literal['jpeg2000', 'cinema2k', 'cinema4k']

(from 0 to 4) (default jpeg2000)

None
cinema_mode int | None | Literal['off', '2k_24', '2k_48', '4k_24']

Digital Cinema (from 0 to 3) (default off)

None
prog_order int | None | Literal['lrcp', 'rlcp', 'rpcl', 'pcrl', 'cprl']

Progression Order (from 0 to 4) (default lrcp)

None
numresolution int | None

(from 0 to 33) (default 6)

None
irreversible int | None

(from 0 to 1) (default 0)

None
disto_alloc int | None

(from 0 to 1) (default 1)

None
fixed_quality int | None

(from 0 to 1) (default 0)

None

Returns:

Type Description
FFMpegEncoderOption

the set codec options

libopus

libopus(
    application: (
        int | None | Literal["voip", "audio", "lowdelay"]
    ) = None,
    frame_duration: float | None = None,
    packet_loss: int | None = None,
    fec: bool | None = None,
    vbr: (
        int | None | Literal["off", "on", "constrained"]
    ) = None,
    mapping_family: int | None = None,
    apply_phase_inv: bool | None = None,
) -> FFMpegEncoderOption

Libopus Opus (codec opus).

Parameters:

Name Type Description Default
application int | None | Literal['voip', 'audio', 'lowdelay']

Intended application type (from 2048 to 2051) (default audio)

None
frame_duration float | None

Duration of a frame in milliseconds (from 2.5 to 120) (default 20)

None
packet_loss int | None

Expected packet loss percentage (from 0 to 100) (default 0)

None
fec bool | None

Enable inband FEC. Expected packet loss must be non-zero (default false)

None
vbr int | None | Literal['off', 'on', 'constrained']

Variable bit rate mode (from 0 to 2) (default on)

None
mapping_family int | None

Channel Mapping Family (from -1 to 255) (default -1)

None
apply_phase_inv bool | None

Apply intensity stereo phase inversion (default true)

None

Returns:

Type Description
FFMpegEncoderOption

the set codec options

librav1e

librav1e(
    qp: int | None = None,
    speed: int | None = None,
    tiles: int | None = None,
    tile_rows: int | None = None,
    tile_columns: int | None = None,
    rav1e_params: str | None = None,
) -> FFMpegEncoderOption

librav1e AV1 (codec av1).

Parameters:

Name Type Description Default
qp int | None

use constant quantizer mode (from -1 to 255) (default -1)

None
speed int | None

what speed preset to use (from -1 to 10) (default -1)

None
tiles int | None

number of tiles encode with (from -1 to I64_MAX) (default 0)

None
tile_rows int | None

number of tiles rows to encode with (from -1 to I64_MAX) (default 0)

None
tile_columns int | None

number of tiles columns to encode with (from -1 to I64_MAX) (default 0)

None
rav1e_params str | None

set the rav1e configuration using a :-separated list of key=value parameters

None

Returns:

Type Description
FFMpegEncoderOption

the set codec options

libshine

libshine() -> FFMpegEncoderOption

Libshine MP3 (MPEG audio layer 3) (codec mp3).

Returns:

Type Description
FFMpegEncoderOption

the set codec options

libspeex

libspeex(
    abr: int | None = None,
    cbr_quality: int | None = None,
    frames_per_packet: int | None = None,
    vad: int | None = None,
    dtx: int | None = None,
) -> FFMpegEncoderOption

Libspeex Speex (codec speex).

Parameters:

Name Type Description Default
abr int | None

Use average bit rate (from 0 to 1) (default 0)

None
cbr_quality int | None

Set quality value (0 to 10) for CBR (from 0 to 10) (default 8)

None
frames_per_packet int | None

Number of frames to encode in each packet (from 1 to 8) (default 1)

None
vad int | None

Voice Activity Detection (from 0 to 1) (default 0)

None
dtx int | None

Discontinuous Transmission (from 0 to 1) (default 0)

None

Returns:

Type Description
FFMpegEncoderOption

the set codec options

libsvtav1

libsvtav1(
    hielevel: (
        int | None | Literal["3level", "4level"]
    ) = None,
    la_depth: int | None = None,
    tier: int | None | Literal["main", "high"] = None,
    preset: int | None = None,
    crf: int | None = None,
    qp: int | None = None,
    sc_detection: bool | None = None,
    tile_columns: int | None = None,
    tile_rows: int | None = None,
    svtav1_params: str | None = None,
) -> FFMpegEncoderOption

SVT-AV1(Scalable Video Technology for AV1) encoder (codec av1).

Parameters:

Name Type Description Default
hielevel int | None | Literal['3level', '4level']

Hierarchical prediction levels setting (Deprecated, use svtav1-params) (from -1 to 4) (default -1)

None
la_depth int | None

Look ahead distance [0, 120] (Deprecated, use svtav1-params) (from -1 to 120) (default -1)

None
tier int | None | Literal['main', 'high']

Set operating point tier (Deprecated, use svtav1-params) (from -1 to 1) (default -1)

None
preset int | None

Encoding preset (from -2 to 13) (default -2)

None
crf int | None

Constant Rate Factor value (from 0 to 63) (default 0)

None
qp int | None

Initial Quantizer level value (from 0 to 63) (default 0)

None
sc_detection bool | None

Scene change detection (Deprecated, use svtav1-params) (default auto)

None
tile_columns int | None

Log2 of number of tile columns to use (Deprecated, use svtav1-params) (from -1 to 4) (default -1)

None
tile_rows int | None

Log2 of number of tile rows to use (Deprecated, use svtav1-params) (from -1 to 6) (default -1)

None
svtav1_params str | None

Set the SVT-AV1 configuration using a :-separated list of key=value parameters

None

Returns:

Type Description
FFMpegEncoderOption

the set codec options

libtheora

libtheora() -> FFMpegEncoderOption

Libtheora Theora (codec theora).

Returns:

Type Description
FFMpegEncoderOption

the set codec options

libtwolame

libtwolame(
    mode: (
        int
        | None
        | Literal[
            "auto",
            "stereo",
            "joint_stereo",
            "dual_channel",
            "mono",
        ]
    ) = None,
    psymodel: int | None = None,
    energy_levels: int | None = None,
    error_protection: int | None = None,
    copyright: int | None = None,
    original: int | None = None,
    verbosity: int | None = None,
) -> FFMpegEncoderOption

Libtwolame MP2 (MPEG audio layer 2) (codec mp2).

Parameters:

Name Type Description Default
mode int | None | Literal['auto', 'stereo', 'joint_stereo', 'dual_channel', 'mono']

Mpeg Mode (from -1 to 3) (default auto)

None
psymodel int | None

Psychoacoustic Model (from -1 to 4) (default 3)

None
energy_levels int | None

enable energy levels (from 0 to 1) (default 0)

None
error_protection int | None

enable CRC error protection (from 0 to 1) (default 0)

None
copyright int | None

set MPEG Audio Copyright flag (from 0 to 1) (default 0)

None
original int | None

set MPEG Audio Original flag (from 0 to 1) (default 0)

None
verbosity int | None

set library optput level (0-10) (from 0 to 10) (default 0)

None

Returns:

Type Description
FFMpegEncoderOption

the set codec options

libvorbis

libvorbis(
    iblock: float | None = None,
) -> FFMpegEncoderOption

Libvorbis (codec vorbis).

Parameters:

Name Type Description Default
iblock float | None

Sets the impulse block bias (from -15 to 0) (default 0)

None

Returns:

Type Description
FFMpegEncoderOption

the set codec options

libvpx

libvpx(
    lag_in_frames: int | None = None,
    arnr_maxframes: int | None = None,
    arnr_strength: int | None = None,
    arnr_type: (
        int
        | None
        | Literal["backward", "forward", "centered"]
    ) = None,
    tune: int | None | Literal["psnr", "ssim"] = None,
    deadline: (
        int | None | Literal["best", "good", "realtime"]
    ) = None,
    error_resilient: str | None = None,
    max_intra_rate: int | None = None,
    crf: int | None = None,
    static_thresh: int | None = None,
    drop_threshold: int | None = None,
    noise_sensitivity: int | None = None,
    undershoot_pct: int | None = None,
    overshoot_pct: int | None = None,
    ts_parameters: str | None = None,
    auto_alt_ref: int | None = None,
    cpu_used: int | None = None,
    speed: int | None = None,
    quality: (
        int | None | Literal["best", "good", "realtime"]
    ) = None,
    vp8flags: str | None = None,
    arnr_max_frames: int | None = None,
    rc_lookahead: int | None = None,
    sharpness: int | None = None,
) -> FFMpegEncoderOption

Libvpx VP8 (codec vp8).

Parameters:

Name Type Description Default
lag_in_frames int | None

Number of frames to look ahead for alternate reference frame selection (from -1 to INT_MAX) (default -1)

None
arnr_maxframes int | None

altref noise reduction max frame count (from -1 to INT_MAX) (default -1)

None
arnr_strength int | None

altref noise reduction filter strength (from -1 to INT_MAX) (default -1)

None
arnr_type int | None | Literal['backward', 'forward', 'centered']

altref noise reduction filter type (from -1 to INT_MAX) (default -1)

None
tune int | None | Literal['psnr', 'ssim']

Tune the encoding to a specific scenario (from -1 to INT_MAX) (default -1)

None
deadline int | None | Literal['best', 'good', 'realtime']

Time to spend encoding, in microseconds. (from INT_MIN to INT_MAX) (default good)

None
error_resilient str | None

Error resilience configuration (default 0)

None
max_intra_rate int | None

Maximum I-frame bitrate (pct) 0=unlimited (from -1 to INT_MAX) (default -1)

None
crf int | None

Select the quality for constant quality mode (from -1 to 63) (default -1)

None
static_thresh int | None

A change threshold on blocks below which they will be skipped by the encoder (from 0 to INT_MAX) (default 0)

None
drop_threshold int | None

Frame drop threshold (from INT_MIN to INT_MAX) (default 0)

None
noise_sensitivity int | None

Noise sensitivity (from 0 to 4) (default 0)

None
undershoot_pct int | None

Datarate undershoot (min) target (%) (from -1 to 100) (default -1)

None
overshoot_pct int | None

Datarate overshoot (max) target (%) (from -1 to 1000) (default -1)

None
ts_parameters str | None

Temporal scaling configuration using a :-separated list of key=value parameters

None
auto_alt_ref int | None

Enable use of alternate reference frames (2-pass only) (from -1 to 2) (default -1)

None
cpu_used int | None

Quality/Speed ratio modifier (from -16 to 16) (default 1)

None
speed int | None

(from -16 to 16) (default 1)

None
quality int | None | Literal['best', 'good', 'realtime']

(from INT_MIN to INT_MAX) (default good)

None
vp8flags str | None

(default 0)

None
arnr_max_frames int | None

altref noise reduction max frame count (from 0 to 15) (default 0)

None
rc_lookahead int | None

Number of frames to look ahead for alternate reference frame selection (from 0 to 25) (default 25)

None
sharpness int | None

Increase sharpness at the expense of lower PSNR (from -1 to 7) (default -1)

None

Returns:

Type Description
FFMpegEncoderOption

the set codec options

libwebp

libwebp(
    lossless: int | None = None,
    preset: (
        int
        | None
        | Literal[
            "none",
            "default",
            "picture",
            "photo",
            "drawing",
            "icon",
            "text",
        ]
    ) = None,
    cr_threshold: int | None = None,
    cr_size: int | None = None,
    quality: float | None = None,
) -> FFMpegEncoderOption

Libwebp WebP image (codec webp).

Parameters:

Name Type Description Default
lossless int | None

Use lossless mode (from 0 to 1) (default 0)

None
preset int | None | Literal['none', 'default', 'picture', 'photo', 'drawing', 'icon', 'text']

Configuration preset (from -1 to 5) (default none)

None
cr_threshold int | None

Conditional replenishment threshold (from 0 to INT_MAX) (default 0)

None
cr_size int | None

Conditional replenishment block size (from 0 to 256) (default 16)

None
quality float | None

Quality (from 0 to 100) (default 75)

None

Returns:

Type Description
FFMpegEncoderOption

the set codec options

libwebp_anim

libwebp_anim(
    lossless: int | None = None,
    preset: (
        int
        | None
        | Literal[
            "none",
            "default",
            "picture",
            "photo",
            "drawing",
            "icon",
            "text",
        ]
    ) = None,
    cr_threshold: int | None = None,
    cr_size: int | None = None,
    quality: float | None = None,
) -> FFMpegEncoderOption

Libwebp WebP image (codec webp).

Parameters:

Name Type Description Default
lossless int | None

Use lossless mode (from 0 to 1) (default 0)

None
preset int | None | Literal['none', 'default', 'picture', 'photo', 'drawing', 'icon', 'text']

Configuration preset (from -1 to 5) (default none)

None
cr_threshold int | None

Conditional replenishment threshold (from 0 to INT_MAX) (default 0)

None
cr_size int | None

Conditional replenishment block size (from 0 to 256) (default 16)

None
quality float | None

Quality (from 0 to 100) (default 75)

None

Returns:

Type Description
FFMpegEncoderOption

the set codec options

libx264

libx264(
    preset: str | None = None,
    tune: str | None = None,
    profile: str | None = None,
    fastfirstpass: bool | None = None,
    level: str | None = None,
    passlogfile: str | None = None,
    wpredp: str | None = None,
    a53cc: bool | None = None,
    x264opts: str | None = None,
    crf: float | None = None,
    crf_max: float | None = None,
    qp: int | None = None,
    aq_mode: (
        int
        | None
        | Literal[
            "none",
            "variance",
            "autovariance",
            "autovariance-biased",
        ]
    ) = None,
    aq_strength: float | None = None,
    psy: bool | None = None,
    psy_rd: str | None = None,
    rc_lookahead: int | None = None,
    weightb: bool | None = None,
    weightp: (
        int | None | Literal["none", "simple", "smart"]
    ) = None,
    ssim: bool | None = None,
    intra_refresh: bool | None = None,
    bluray_compat: bool | None = None,
    b_bias: int | None = None,
    b_pyramid: (
        int | None | Literal["none", "strict", "normal"]
    ) = None,
    mixed_refs: bool | None = None,
    _8x8dct: bool | None = None,
    fast_pskip: bool | None = None,
    aud: bool | None = None,
    mbtree: bool | None = None,
    deblock: str | None = None,
    cplxblur: float | None = None,
    partitions: str | None = None,
    direct_pred: (
        int
        | None
        | Literal["none", "spatial", "temporal", "auto"]
    ) = None,
    slice_max_size: int | None = None,
    stats: str | None = None,
    nal_hrd: (
        int | None | Literal["none", "vbr", "cbr"]
    ) = None,
    avcintra_class: int | None = None,
    me_method: (
        int
        | None
        | Literal["dia", "hex", "umh", "esa", "tesa"]
    ) = None,
    forced_idr: bool | None = None,
    coder: (
        int
        | None
        | Literal["default", "cavlc", "cabac", "vlc", "ac"]
    ) = None,
    b_strategy: int | None = None,
    chromaoffset: int | None = None,
    sc_threshold: int | None = None,
    noise_reduction: int | None = None,
    udu_sei: bool | None = None,
    x264_params: str | None = None,
    mb_info: bool | None = None,
) -> FFMpegEncoderOption

libx264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 (codec h264).

Parameters:

Name Type Description Default
preset str | None

Set the encoding preset (cf. x264 --fullhelp) (default "medium")

None
tune str | None

Tune the encoding params (cf. x264 --fullhelp)

None
profile str | None

Set profile restrictions (cf. x264 --fullhelp)

None
fastfirstpass bool | None

Use fast settings when encoding first pass (default true)

None
level str | None

Specify level (as defined by Annex A)

None
passlogfile str | None

Filename for 2 pass stats

None
wpredp str | None

Weighted prediction for P-frames

None
a53cc bool | None

Use A53 Closed Captions (if available) (default true)

None
x264opts str | None

x264 options

None
crf float | None

Select the quality for constant quality mode (from -1 to FLT_MAX) (default -1)

None
crf_max float | None

In CRF mode, prevents VBV from lowering quality beyond this point. (from -1 to FLT_MAX) (default -1)

None
qp int | None

Constant quantization parameter rate control method (from -1 to INT_MAX) (default -1)

None
aq_mode int | None | Literal['none', 'variance', 'autovariance', 'autovariance-biased']

AQ method (from -1 to INT_MAX) (default -1)

None
aq_strength float | None

AQ strength. Reduces blocking and blurring in flat and textured areas. (from -1 to FLT_MAX) (default -1)

None
psy bool | None

Use psychovisual optimizations. (default auto)

None
psy_rd str | None

Strength of psychovisual optimization, in : format.

None
rc_lookahead int | None

Number of frames to look ahead for frametype and ratecontrol (from -1 to INT_MAX) (default -1)

None
weightb bool | None

Weighted prediction for B-frames. (default auto)

None
weightp int | None | Literal['none', 'simple', 'smart']

Weighted prediction analysis method. (from -1 to INT_MAX) (default -1)

None
ssim bool | None

Calculate and print SSIM stats. (default auto)

None
intra_refresh bool | None

Use Periodic Intra Refresh instead of IDR frames. (default auto)

None
bluray_compat bool | None

Bluray compatibility workarounds. (default auto)

None
b_bias int | None

Influences how often B-frames are used (from INT_MIN to INT_MAX) (default INT_MIN)

None
b_pyramid int | None | Literal['none', 'strict', 'normal']

Keep some B-frames as references. (from -1 to INT_MAX) (default -1)

None
mixed_refs bool | None

One reference per partition, as opposed to one reference per macroblock (default auto)

None
_8x8dct bool | None

High profile 8x8 transform. (default auto)

None
fast_pskip bool | None

(default auto)

None
aud bool | None

Use access unit delimiters. (default auto)

None
mbtree bool | None

Use macroblock tree ratecontrol. (default auto)

None
deblock str | None

Loop filter parameters, in form.

None
cplxblur float | None

Reduce fluctuations in QP (before curve compression) (from -1 to FLT_MAX) (default -1)

None
partitions str | None

A comma-separated list of partitions to consider. Possible values: p8x8, p4x4, b8x8, i8x8, i4x4, none, all

None
direct_pred int | None | Literal['none', 'spatial', 'temporal', 'auto']

Direct MV prediction mode (from -1 to INT_MAX) (default -1)

None
slice_max_size int | None

Limit the size of each slice in bytes (from -1 to INT_MAX) (default -1)

None
stats str | None

Filename for 2 pass stats

None
nal_hrd int | None | Literal['none', 'vbr', 'cbr']

Signal HRD information (requires vbv-bufsize; cbr not allowed in .mp4) (from -1 to INT_MAX) (default -1)

None
avcintra_class int | None

AVC-Intra class 50/100/200/300/480 (from -1 to 480) (default -1)

None
me_method int | None | Literal['dia', 'hex', 'umh', 'esa', 'tesa']

Set motion estimation method (from -1 to 4) (default -1)

None
forced_idr bool | None

If forcing keyframes, force them as IDR frames. (default false)

None
coder int | None | Literal['default', 'cavlc', 'cabac', 'vlc', 'ac']

Coder type (from -1 to 1) (default default)

None
b_strategy int | None

Strategy to choose between I/P/B-frames (from -1 to 2) (default -1)

None
chromaoffset int | None

QP difference between chroma and luma (from INT_MIN to INT_MAX) (default 0)

None
sc_threshold int | None

Scene change threshold (from INT_MIN to INT_MAX) (default -1)

None
noise_reduction int | None

Noise reduction (from INT_MIN to INT_MAX) (default -1)

None
udu_sei bool | None

Use user data unregistered SEI if available (default false)

None
x264_params str | None

Override the x264 configuration using a :-separated list of key=value parameters

None
mb_info bool | None

Set mb_info data through AVSideData, only useful when used from the API (default false)

None

Returns:

Type Description
FFMpegEncoderOption

the set codec options

libx264rgb

libx264rgb(
    preset: str | None = None,
    tune: str | None = None,
    profile: str | None = None,
    fastfirstpass: bool | None = None,
    level: str | None = None,
    passlogfile: str | None = None,
    wpredp: str | None = None,
    a53cc: bool | None = None,
    x264opts: str | None = None,
    crf: float | None = None,
    crf_max: float | None = None,
    qp: int | None = None,
    aq_mode: (
        int
        | None
        | Literal[
            "none",
            "variance",
            "autovariance",
            "autovariance-biased",
        ]
    ) = None,
    aq_strength: float | None = None,
    psy: bool | None = None,
    psy_rd: str | None = None,
    rc_lookahead: int | None = None,
    weightb: bool | None = None,
    weightp: (
        int | None | Literal["none", "simple", "smart"]
    ) = None,
    ssim: bool | None = None,
    intra_refresh: bool | None = None,
    bluray_compat: bool | None = None,
    b_bias: int | None = None,
    b_pyramid: (
        int | None | Literal["none", "strict", "normal"]
    ) = None,
    mixed_refs: bool | None = None,
    _8x8dct: bool | None = None,
    fast_pskip: bool | None = None,
    aud: bool | None = None,
    mbtree: bool | None = None,
    deblock: str | None = None,
    cplxblur: float | None = None,
    partitions: str | None = None,
    direct_pred: (
        int
        | None
        | Literal["none", "spatial", "temporal", "auto"]
    ) = None,
    slice_max_size: int | None = None,
    stats: str | None = None,
    nal_hrd: (
        int | None | Literal["none", "vbr", "cbr"]
    ) = None,
    avcintra_class: int | None = None,
    me_method: (
        int
        | None
        | Literal["dia", "hex", "umh", "esa", "tesa"]
    ) = None,
    forced_idr: bool | None = None,
    coder: (
        int
        | None
        | Literal["default", "cavlc", "cabac", "vlc", "ac"]
    ) = None,
    b_strategy: int | None = None,
    chromaoffset: int | None = None,
    sc_threshold: int | None = None,
    noise_reduction: int | None = None,
    udu_sei: bool | None = None,
    x264_params: str | None = None,
    mb_info: bool | None = None,
) -> FFMpegEncoderOption

libx264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 RGB (codec h264).

Parameters:

Name Type Description Default
preset str | None

Set the encoding preset (cf. x264 --fullhelp) (default "medium")

None
tune str | None

Tune the encoding params (cf. x264 --fullhelp)

None
profile str | None

Set profile restrictions (cf. x264 --fullhelp)

None
fastfirstpass bool | None

Use fast settings when encoding first pass (default true)

None
level str | None

Specify level (as defined by Annex A)

None
passlogfile str | None

Filename for 2 pass stats

None
wpredp str | None

Weighted prediction for P-frames

None
a53cc bool | None

Use A53 Closed Captions (if available) (default true)

None
x264opts str | None

x264 options

None
crf float | None

Select the quality for constant quality mode (from -1 to FLT_MAX) (default -1)

None
crf_max float | None

In CRF mode, prevents VBV from lowering quality beyond this point. (from -1 to FLT_MAX) (default -1)

None
qp int | None

Constant quantization parameter rate control method (from -1 to INT_MAX) (default -1)

None
aq_mode int | None | Literal['none', 'variance', 'autovariance', 'autovariance-biased']

AQ method (from -1 to INT_MAX) (default -1)

None
aq_strength float | None

AQ strength. Reduces blocking and blurring in flat and textured areas. (from -1 to FLT_MAX) (default -1)

None
psy bool | None

Use psychovisual optimizations. (default auto)

None
psy_rd str | None

Strength of psychovisual optimization, in : format.

None
rc_lookahead int | None

Number of frames to look ahead for frametype and ratecontrol (from -1 to INT_MAX) (default -1)

None
weightb bool | None

Weighted prediction for B-frames. (default auto)

None
weightp int | None | Literal['none', 'simple', 'smart']

Weighted prediction analysis method. (from -1 to INT_MAX) (default -1)

None
ssim bool | None

Calculate and print SSIM stats. (default auto)

None
intra_refresh bool | None

Use Periodic Intra Refresh instead of IDR frames. (default auto)

None
bluray_compat bool | None

Bluray compatibility workarounds. (default auto)

None
b_bias int | None

Influences how often B-frames are used (from INT_MIN to INT_MAX) (default INT_MIN)

None
b_pyramid int | None | Literal['none', 'strict', 'normal']

Keep some B-frames as references. (from -1 to INT_MAX) (default -1)

None
mixed_refs bool | None

One reference per partition, as opposed to one reference per macroblock (default auto)

None
_8x8dct bool | None

High profile 8x8 transform. (default auto)

None
fast_pskip bool | None

(default auto)

None
aud bool | None

Use access unit delimiters. (default auto)

None
mbtree bool | None

Use macroblock tree ratecontrol. (default auto)

None
deblock str | None

Loop filter parameters, in form.

None
cplxblur float | None

Reduce fluctuations in QP (before curve compression) (from -1 to FLT_MAX) (default -1)

None
partitions str | None

A comma-separated list of partitions to consider. Possible values: p8x8, p4x4, b8x8, i8x8, i4x4, none, all

None
direct_pred int | None | Literal['none', 'spatial', 'temporal', 'auto']

Direct MV prediction mode (from -1 to INT_MAX) (default -1)

None
slice_max_size int | None

Limit the size of each slice in bytes (from -1 to INT_MAX) (default -1)

None
stats str | None

Filename for 2 pass stats

None
nal_hrd int | None | Literal['none', 'vbr', 'cbr']

Signal HRD information (requires vbv-bufsize; cbr not allowed in .mp4) (from -1 to INT_MAX) (default -1)

None
avcintra_class int | None

AVC-Intra class 50/100/200/300/480 (from -1 to 480) (default -1)

None
me_method int | None | Literal['dia', 'hex', 'umh', 'esa', 'tesa']

Set motion estimation method (from -1 to 4) (default -1)

None
forced_idr bool | None

If forcing keyframes, force them as IDR frames. (default false)

None
coder int | None | Literal['default', 'cavlc', 'cabac', 'vlc', 'ac']

Coder type (from -1 to 1) (default default)

None
b_strategy int | None

Strategy to choose between I/P/B-frames (from -1 to 2) (default -1)

None
chromaoffset int | None

QP difference between chroma and luma (from INT_MIN to INT_MAX) (default 0)

None
sc_threshold int | None

Scene change threshold (from INT_MIN to INT_MAX) (default -1)

None
noise_reduction int | None

Noise reduction (from INT_MIN to INT_MAX) (default -1)

None
udu_sei bool | None

Use user data unregistered SEI if available (default false)

None
x264_params str | None

Override the x264 configuration using a :-separated list of key=value parameters

None
mb_info bool | None

Set mb_info data through AVSideData, only useful when used from the API (default false)

None

Returns:

Type Description
FFMpegEncoderOption

the set codec options

libx265

libx265(
    crf: float | None = None,
    qp: int | None = None,
    forced_idr: bool | None = None,
    preset: str | None = None,
    tune: str | None = None,
    profile: str | None = None,
    udu_sei: bool | None = None,
    a53cc: bool | None = None,
    x265_params: str | None = None,
) -> FFMpegEncoderOption

libx265 H.265 / HEVC (codec hevc).

Parameters:

Name Type Description Default
crf float | None

set the x265 crf (from -1 to FLT_MAX) (default -1)

None
qp int | None

set the x265 qp (from -1 to INT_MAX) (default -1)

None
forced_idr bool | None

if forcing keyframes, force them as IDR frames (default false)

None
preset str | None

set the x265 preset

None
tune str | None

set the x265 tune parameter

None
profile str | None

set the x265 profile

None
udu_sei bool | None

Use user data unregistered SEI if available (default false)

None
a53cc bool | None

Use A53 Closed Captions (if available) (default true)

None
x265_params str | None

set the x265 configuration using a :-separated list of key=value parameters

None

Returns:

Type Description
FFMpegEncoderOption

the set codec options

libxvid

libxvid(
    lumi_aq: int | None = None,
    variance_aq: int | None = None,
    ssim: (
        int | None | Literal["off", "avg", "frame"]
    ) = None,
    ssim_acc: int | None = None,
    gmc: int | None = None,
    me_quality: int | None = None,
    mpeg_quant: int | None = None,
) -> FFMpegEncoderOption

Libxvidcore MPEG-4 part 2 (codec mpeg4).

Parameters:

Name Type Description Default
lumi_aq int | None

Luminance masking AQ (from 0 to 1) (default 0)

None
variance_aq int | None

Variance AQ (from 0 to 1) (default 0)

None
ssim int | None | Literal['off', 'avg', 'frame']

Show SSIM information to stdout (from 0 to 2) (default off)

None
ssim_acc int | None

SSIM accuracy (from 0 to 4) (default 2)

None
gmc int | None

use GMC (from 0 to 1) (default 0)

None
me_quality int | None

Motion estimation quality (from 0 to 6) (default 4)

None
mpeg_quant int | None

Use MPEG quantizers instead of H.263 (from 0 to 1) (default 0)

None

Returns:

Type Description
FFMpegEncoderOption

the set codec options

ljpeg

ljpeg(
    pred: (
        int | None | Literal["left", "plane", "median"]
    ) = None,
) -> FFMpegEncoderOption

Lossless JPEG.

Parameters:

Name Type Description Default
pred int | None | Literal['left', 'plane', 'median']

Prediction method (from 1 to 3) (default left)

None

Returns:

Type Description
FFMpegEncoderOption

the set codec options

magicyuv

magicyuv(
    pred: (
        int | None | Literal["left", "gradient", "median"]
    ) = None,
) -> FFMpegEncoderOption

MagicYUV video.

Parameters:

Name Type Description Default
pred int | None | Literal['left', 'gradient', 'median']

Prediction method (from 1 to 3) (default left)

None

Returns:

Type Description
FFMpegEncoderOption

the set codec options

mjpeg

mjpeg(
    mpv_flags: str | None = None,
    luma_elim_threshold: int | None = None,
    chroma_elim_threshold: int | None = None,
    quantizer_noise_shaping: int | None = None,
    error_rate: int | None = None,
    qsquish: float | None = None,
    rc_qmod_amp: float | None = None,
    rc_qmod_freq: int | None = None,
    rc_eq: str | None = None,
    rc_init_cplx: float | None = None,
    rc_buf_aggressivity: float | None = None,
    border_mask: float | None = None,
    lmin: int | None = None,
    lmax: int | None = None,
    skip_threshold: int | None = None,
    skip_factor: int | None = None,
    skip_exp: int | None = None,
    skip_cmp: (
        int
        | None
        | Literal[
            "sad",
            "sse",
            "satd",
            "dct",
            "psnr",
            "bit",
            "rd",
            "zero",
            "vsad",
            "vsse",
            "nsse",
            "dct264",
            "dctmax",
            "chroma",
            "msad",
        ]
    ) = None,
    sc_threshold: int | None = None,
    noise_reduction: int | None = None,
    ps: int | None = None,
    huffman: (
        int | None | Literal["default", "optimal"]
    ) = None,
    force_duplicated_matrix: bool | None = None,
) -> FFMpegEncoderOption

MJPEG (Motion JPEG).

Parameters:

Name Type Description Default
mpv_flags str | None

Flags common for all mpegvideo-based encoders. (default 0)

None
luma_elim_threshold int | None

single coefficient elimination threshold for luminance (negative values also consider dc coefficient) (from INT_MIN to INT_MAX) (default 0)

None
chroma_elim_threshold int | None

single coefficient elimination threshold for chrominance (negative values also consider dc coefficient) (from INT_MIN to INT_MAX) (default 0)

None
quantizer_noise_shaping int | None

(from 0 to INT_MAX) (default 0)

None
error_rate int | None

Simulate errors in the bitstream to test error concealment. (from 0 to INT_MAX) (default 0)

None
qsquish float | None

how to keep quantizer between qmin and qmax (0 = clip, 1 = use differentiable function) (from 0 to 99) (default 0)

None
rc_qmod_amp float | None

experimental quantizer modulation (from -FLT_MAX to FLT_MAX) (default 0)

None
rc_qmod_freq int | None

experimental quantizer modulation (from INT_MIN to INT_MAX) (default 0)

None
rc_eq str | None

Set rate control equation. When computing the expression, besides the standard functions defined in the section 'Expression Evaluation', the following functions are available: bits2qp(bits), qp2bits(qp). Also the following constants are available: iTex pTex tex mv fCode iCount mcVar var isI isP isB avgQP qComp avgIITex avgPITex avgPPTex avgBPTex avgTex.

None
rc_init_cplx float | None

initial complexity for 1-pass encoding (from -FLT_MAX to FLT_MAX) (default 0)

None
rc_buf_aggressivity float | None

currently useless (from -FLT_MAX to FLT_MAX) (default 1)

None
border_mask float | None

increase the quantizer for macroblocks close to borders (from -FLT_MAX to FLT_MAX) (default 0)

None
lmin int | None

minimum Lagrange factor (VBR) (from 0 to INT_MAX) (default 236)

None
lmax int | None

maximum Lagrange factor (VBR) (from 0 to INT_MAX) (default 3658)

None
skip_threshold int | None

Frame skip threshold (from INT_MIN to INT_MAX) (default 0)

None
skip_factor int | None

Frame skip factor (from INT_MIN to INT_MAX) (default 0)

None
skip_exp int | None

Frame skip exponent (from INT_MIN to INT_MAX) (default 0)

None
skip_cmp int | None | Literal['sad', 'sse', 'satd', 'dct', 'psnr', 'bit', 'rd', 'zero', 'vsad', 'vsse', 'nsse', 'dct264', 'dctmax', 'chroma', 'msad']

Frame skip compare function (from INT_MIN to INT_MAX) (default dctmax)

None
sc_threshold int | None

Scene change threshold (from INT_MIN to INT_MAX) (default 0)

None
noise_reduction int | None

Noise reduction (from INT_MIN to INT_MAX) (default 0)

None
ps int | None

RTP payload size in bytes (from INT_MIN to INT_MAX) (default 0)

None
huffman int | None | Literal['default', 'optimal']

Huffman table strategy (from 0 to 1) (default optimal)

None
force_duplicated_matrix bool | None

Always write luma and chroma matrix for mjpeg, useful for rtp streaming. (default false)

None

Returns:

Type Description
FFMpegEncoderOption

the set codec options

mjpeg_vaapi

mjpeg_vaapi(
    low_power: bool | None = None,
    idr_interval: int | None = None,
    b_depth: int | None = None,
    async_depth: int | None = None,
    max_frame_size: int | None = None,
    jfif: bool | None = None,
    huffman: bool | None = None,
) -> FFMpegEncoderOption

MJPEG (VAAPI) (codec mjpeg).

Parameters:

Name Type Description Default
low_power bool | None

Use low-power encoding mode (only available on some platforms; may not support all encoding features) (default false)

None
idr_interval int | None

Distance (in I-frames) between IDR frames (from 0 to INT_MAX) (default 0)

None
b_depth int | None

Maximum B-frame reference depth (from 1 to INT_MAX) (default 1)

None
async_depth int | None

Maximum processing parallelism. Increase this to improve single channel performance. This option doesn't work if driver doesn't implement vaSyncBuffer function. (from 1 to 64) (default 2)

None
max_frame_size int | None

Maximum frame size (in bytes) (from 0 to INT_MAX) (default 0)

None
jfif bool | None

Include JFIF header (default false)

None
huffman bool | None

Include huffman tables (default true)

None

Returns:

Type Description
FFMpegEncoderOption

the set codec options

mlp

mlp(
    max_interval: int | None = None,
    lpc_coeff_precision: int | None = None,
    lpc_type: (
        int | None | Literal["levinson", "cholesky"]
    ) = None,
    lpc_passes: int | None = None,
    codebook_search: int | None = None,
    prediction_order: (
        int | None | Literal["estimation", "search"]
    ) = None,
    rematrix_precision: int | None = None,
) -> FFMpegEncoderOption

MLP (Meridian Lossless Packing).

Parameters:

Name Type Description Default
max_interval int | None

Max number of frames between each new header (from 8 to 128) (default 16)

None
lpc_coeff_precision int | None

LPC coefficient precision (from 0 to 15) (default 15)

None
lpc_type int | None | Literal['levinson', 'cholesky']

LPC algorithm (from 2 to 3) (default levinson)

None
lpc_passes int | None

Number of passes to use for Cholesky factorization during LPC analysis (from 1 to INT_MAX) (default 2)

None
codebook_search int | None

Max number of codebook searches (from 1 to 100) (default 3)

None
prediction_order int | None | Literal['estimation', 'search']

Search method for selecting prediction order (from 0 to 4) (default estimation)

None
rematrix_precision int | None

Rematrix coefficient precision (from 0 to 14) (default 1)

None

Returns:

Type Description
FFMpegEncoderOption

the set codec options

mov_text

mov_text(height: int | None = None) -> FFMpegEncoderOption

3GPP Timed Text subtitle.

Parameters:

Name Type Description Default
height int | None

Frame height, usually video height (from 0 to INT_MAX) (default 0)

None

Returns:

Type Description
FFMpegEncoderOption

the set codec options

mp2

MP2 (MPEG audio layer 2).

Returns:

Type Description
FFMpegEncoderOption

the set codec options

mp2fixed

mp2fixed() -> FFMpegEncoderOption

MP2 fixed point (MPEG audio layer 2) (codec mp2).

Returns:

Type Description
FFMpegEncoderOption

the set codec options

mpeg1video

mpeg1video(
    gop_timecode: str | None = None,
    drop_frame_timecode: bool | None = None,
    scan_offset: bool | None = None,
    timecode_frame_start: int | None = None,
    b_strategy: int | None = None,
    b_sensitivity: int | None = None,
    brd_scale: int | None = None,
    mpv_flags: str | None = None,
    luma_elim_threshold: int | None = None,
    chroma_elim_threshold: int | None = None,
    quantizer_noise_shaping: int | None = None,
    error_rate: int | None = None,
    qsquish: float | None = None,
    rc_qmod_amp: float | None = None,
    rc_qmod_freq: int | None = None,
    rc_eq: str | None = None,
    rc_init_cplx: float | None = None,
    rc_buf_aggressivity: float | None = None,
    border_mask: float | None = None,
    lmin: int | None = None,
    lmax: int | None = None,
    skip_threshold: int | None = None,
    skip_factor: int | None = None,
    skip_exp: int | None = None,
    skip_cmp: (
        int
        | None
        | Literal[
            "sad",
            "sse",
            "satd",
            "dct",
            "psnr",
            "bit",
            "rd",
            "zero",
            "vsad",
            "vsse",
            "nsse",
            "dct264",
            "dctmax",
            "chroma",
            "msad",
        ]
    ) = None,
    sc_threshold: int | None = None,
    noise_reduction: int | None = None,
    ps: int | None = None,
    motion_est: (
        int | None | Literal["zero", "epzs", "xone"]
    ) = None,
    mepc: int | None = None,
    mepre: int | None = None,
    intra_penalty: int | None = None,
) -> FFMpegEncoderOption

MPEG-1 video.

Parameters:

Name Type Description Default
gop_timecode str | None

MPEG GOP Timecode in hh:mm:ss[:;.]ff format. Overrides timecode_frame_start.

None
drop_frame_timecode bool | None

Timecode is in drop frame format. (default false)

None
scan_offset bool | None

Reserve space for SVCD scan offset user data. (default false)

None
timecode_frame_start int | None

GOP timecode frame start number, in non-drop-frame format (from -1 to I64_MAX) (default -1)

None
b_strategy int | None

Strategy to choose between I/P/B-frames (from 0 to 2) (default 0)

None
b_sensitivity int | None

Adjust sensitivity of b_frame_strategy 1 (from 1 to INT_MAX) (default 40)

None
brd_scale int | None

Downscale frames for dynamic B-frame decision (from 0 to 3) (default 0)

None
mpv_flags str | None

Flags common for all mpegvideo-based encoders. (default 0)

None
luma_elim_threshold int | None

single coefficient elimination threshold for luminance (negative values also consider dc coefficient) (from INT_MIN to INT_MAX) (default 0)

None
chroma_elim_threshold int | None

single coefficient elimination threshold for chrominance (negative values also consider dc coefficient) (from INT_MIN to INT_MAX) (default 0)

None
quantizer_noise_shaping int | None

(from 0 to INT_MAX) (default 0)

None
error_rate int | None

Simulate errors in the bitstream to test error concealment. (from 0 to INT_MAX) (default 0)

None
qsquish float | None

how to keep quantizer between qmin and qmax (0 = clip, 1 = use differentiable function) (from 0 to 99) (default 0)

None
rc_qmod_amp float | None

experimental quantizer modulation (from -FLT_MAX to FLT_MAX) (default 0)

None
rc_qmod_freq int | None

experimental quantizer modulation (from INT_MIN to INT_MAX) (default 0)

None
rc_eq str | None

Set rate control equation. When computing the expression, besides the standard functions defined in the section 'Expression Evaluation', the following functions are available: bits2qp(bits), qp2bits(qp). Also the following constants are available: iTex pTex tex mv fCode iCount mcVar var isI isP isB avgQP qComp avgIITex avgPITex avgPPTex avgBPTex avgTex.

None
rc_init_cplx float | None

initial complexity for 1-pass encoding (from -FLT_MAX to FLT_MAX) (default 0)

None
rc_buf_aggressivity float | None

currently useless (from -FLT_MAX to FLT_MAX) (default 1)

None
border_mask float | None

increase the quantizer for macroblocks close to borders (from -FLT_MAX to FLT_MAX) (default 0)

None
lmin int | None

minimum Lagrange factor (VBR) (from 0 to INT_MAX) (default 236)

None
lmax int | None

maximum Lagrange factor (VBR) (from 0 to INT_MAX) (default 3658)

None
skip_threshold int | None

Frame skip threshold (from INT_MIN to INT_MAX) (default 0)

None
skip_factor int | None

Frame skip factor (from INT_MIN to INT_MAX) (default 0)

None
skip_exp int | None

Frame skip exponent (from INT_MIN to INT_MAX) (default 0)

None
skip_cmp int | None | Literal['sad', 'sse', 'satd', 'dct', 'psnr', 'bit', 'rd', 'zero', 'vsad', 'vsse', 'nsse', 'dct264', 'dctmax', 'chroma', 'msad']

Frame skip compare function (from INT_MIN to INT_MAX) (default dctmax)

None
sc_threshold int | None

Scene change threshold (from INT_MIN to INT_MAX) (default 0)

None
noise_reduction int | None

Noise reduction (from INT_MIN to INT_MAX) (default 0)

None
ps int | None

RTP payload size in bytes (from INT_MIN to INT_MAX) (default 0)

None
motion_est int | None | Literal['zero', 'epzs', 'xone']

motion estimation algorithm (from 0 to 2) (default epzs)

None
mepc int | None

Motion estimation bitrate penalty compensation (1.0 = 256) (from INT_MIN to INT_MAX) (default 256)

None
mepre int | None

pre motion estimation (from INT_MIN to INT_MAX) (default 0)

None
intra_penalty int | None

Penalty for intra blocks in block decision (from 0 to 1.07374e+09) (default 0)

None

Returns:

Type Description
FFMpegEncoderOption

the set codec options

mpeg2_vaapi

mpeg2_vaapi(
    low_power: bool | None = None,
    idr_interval: int | None = None,
    b_depth: int | None = None,
    async_depth: int | None = None,
    max_frame_size: int | None = None,
    rc_mode: (
        int
        | None
        | Literal[
            "auto",
            "CQP",
            "CBR",
            "VBR",
            "ICQ",
            "QVBR",
            "AVBR",
        ]
    ) = None,
    profile: int | None | Literal["simple", "main"] = None,
    level: (
        int
        | None
        | Literal["low", "main", "high_1440", "high"]
    ) = None,
) -> FFMpegEncoderOption

MPEG-2 (VAAPI) (codec mpeg2video).

Parameters:

Name Type Description Default
low_power bool | None

Use low-power encoding mode (only available on some platforms; may not support all encoding features) (default false)

None
idr_interval int | None

Distance (in I-frames) between IDR frames (from 0 to INT_MAX) (default 0)

None
b_depth int | None

Maximum B-frame reference depth (from 1 to INT_MAX) (default 1)

None
async_depth int | None

Maximum processing parallelism. Increase this to improve single channel performance. This option doesn't work if driver doesn't implement vaSyncBuffer function. (from 1 to 64) (default 2)

None
max_frame_size int | None

Maximum frame size (in bytes) (from 0 to INT_MAX) (default 0)

None
rc_mode int | None | Literal['auto', 'CQP', 'CBR', 'VBR', 'ICQ', 'QVBR', 'AVBR']

Set rate control mode (from 0 to 6) (default auto)

None
profile int | None | Literal['simple', 'main']

Set profile (in profile_and_level_indication) (from -99 to 7) (default -99)

None
level int | None | Literal['low', 'main', 'high_1440', 'high']

Set level (in profile_and_level_indication) (from 0 to 15) (default high)

None

Returns:

Type Description
FFMpegEncoderOption

the set codec options

mpeg2video

mpeg2video(
    gop_timecode: str | None = None,
    drop_frame_timecode: bool | None = None,
    scan_offset: bool | None = None,
    timecode_frame_start: int | None = None,
    b_strategy: int | None = None,
    b_sensitivity: int | None = None,
    brd_scale: int | None = None,
    intra_vlc: bool | None = None,
    non_linear_quant: bool | None = None,
    alternate_scan: bool | None = None,
    a53cc: bool | None = None,
    seq_disp_ext: (
        int | None | Literal["auto", "never", "always"]
    ) = None,
    video_format: (
        int
        | None
        | Literal[
            "component",
            "pal",
            "ntsc",
            "secam",
            "mac",
            "unspecified",
        ]
    ) = None,
    mpv_flags: str | None = None,
    luma_elim_threshold: int | None = None,
    chroma_elim_threshold: int | None = None,
    quantizer_noise_shaping: int | None = None,
    error_rate: int | None = None,
    qsquish: float | None = None,
    rc_qmod_amp: float | None = None,
    rc_qmod_freq: int | None = None,
    rc_eq: str | None = None,
    rc_init_cplx: float | None = None,
    rc_buf_aggressivity: float | None = None,
    border_mask: float | None = None,
    lmin: int | None = None,
    lmax: int | None = None,
    skip_threshold: int | None = None,
    skip_factor: int | None = None,
    skip_exp: int | None = None,
    skip_cmp: (
        int
        | None
        | Literal[
            "sad",
            "sse",
            "satd",
            "dct",
            "psnr",
            "bit",
            "rd",
            "zero",
            "vsad",
            "vsse",
            "nsse",
            "dct264",
            "dctmax",
            "chroma",
            "msad",
        ]
    ) = None,
    sc_threshold: int | None = None,
    noise_reduction: int | None = None,
    ps: int | None = None,
    motion_est: (
        int | None | Literal["zero", "epzs", "xone"]
    ) = None,
    mepc: int | None = None,
    mepre: int | None = None,
    intra_penalty: int | None = None,
) -> FFMpegEncoderOption

MPEG-2 video.

Parameters:

Name Type Description Default
gop_timecode str | None

MPEG GOP Timecode in hh:mm:ss[:;.]ff format. Overrides timecode_frame_start.

None
drop_frame_timecode bool | None

Timecode is in drop frame format. (default false)

None
scan_offset bool | None

Reserve space for SVCD scan offset user data. (default false)

None
timecode_frame_start int | None

GOP timecode frame start number, in non-drop-frame format (from -1 to I64_MAX) (default -1)

None
b_strategy int | None

Strategy to choose between I/P/B-frames (from 0 to 2) (default 0)

None
b_sensitivity int | None

Adjust sensitivity of b_frame_strategy 1 (from 1 to INT_MAX) (default 40)

None
brd_scale int | None

Downscale frames for dynamic B-frame decision (from 0 to 3) (default 0)

None
intra_vlc bool | None

Use MPEG-2 intra VLC table. (default false)

None
non_linear_quant bool | None

Use nonlinear quantizer. (default false)

None
alternate_scan bool | None

Enable alternate scantable. (default false)

None
a53cc bool | None

Use A53 Closed Captions (if available) (default true)

None
seq_disp_ext int | None | Literal['auto', 'never', 'always']

Write sequence_display_extension blocks. (from -1 to 1) (default auto)

None
video_format int | None | Literal['component', 'pal', 'ntsc', 'secam', 'mac', 'unspecified']

Video_format in the sequence_display_extension indicating the source of the video. (from 0 to 7) (default unspecified)

None
mpv_flags str | None

Flags common for all mpegvideo-based encoders. (default 0)

None
luma_elim_threshold int | None

single coefficient elimination threshold for luminance (negative values also consider dc coefficient) (from INT_MIN to INT_MAX) (default 0)

None
chroma_elim_threshold int | None

single coefficient elimination threshold for chrominance (negative values also consider dc coefficient) (from INT_MIN to INT_MAX) (default 0)

None
quantizer_noise_shaping int | None

(from 0 to INT_MAX) (default 0)

None
error_rate int | None

Simulate errors in the bitstream to test error concealment. (from 0 to INT_MAX) (default 0)

None
qsquish float | None

how to keep quantizer between qmin and qmax (0 = clip, 1 = use differentiable function) (from 0 to 99) (default 0)

None
rc_qmod_amp float | None

experimental quantizer modulation (from -FLT_MAX to FLT_MAX) (default 0)

None
rc_qmod_freq int | None

experimental quantizer modulation (from INT_MIN to INT_MAX) (default 0)

None
rc_eq str | None

Set rate control equation. When computing the expression, besides the standard functions defined in the section 'Expression Evaluation', the following functions are available: bits2qp(bits), qp2bits(qp). Also the following constants are available: iTex pTex tex mv fCode iCount mcVar var isI isP isB avgQP qComp avgIITex avgPITex avgPPTex avgBPTex avgTex.

None
rc_init_cplx float | None

initial complexity for 1-pass encoding (from -FLT_MAX to FLT_MAX) (default 0)

None
rc_buf_aggressivity float | None

currently useless (from -FLT_MAX to FLT_MAX) (default 1)

None
border_mask float | None

increase the quantizer for macroblocks close to borders (from -FLT_MAX to FLT_MAX) (default 0)

None
lmin int | None

minimum Lagrange factor (VBR) (from 0 to INT_MAX) (default 236)

None
lmax int | None

maximum Lagrange factor (VBR) (from 0 to INT_MAX) (default 3658)

None
skip_threshold int | None

Frame skip threshold (from INT_MIN to INT_MAX) (default 0)

None
skip_factor int | None

Frame skip factor (from INT_MIN to INT_MAX) (default 0)

None
skip_exp int | None

Frame skip exponent (from INT_MIN to INT_MAX) (default 0)

None
skip_cmp int | None | Literal['sad', 'sse', 'satd', 'dct', 'psnr', 'bit', 'rd', 'zero', 'vsad', 'vsse', 'nsse', 'dct264', 'dctmax', 'chroma', 'msad']

Frame skip compare function (from INT_MIN to INT_MAX) (default dctmax)

None
sc_threshold int | None

Scene change threshold (from INT_MIN to INT_MAX) (default 0)

None
noise_reduction int | None

Noise reduction (from INT_MIN to INT_MAX) (default 0)

None
ps int | None

RTP payload size in bytes (from INT_MIN to INT_MAX) (default 0)

None
motion_est int | None | Literal['zero', 'epzs', 'xone']

motion estimation algorithm (from 0 to 2) (default epzs)

None
mepc int | None

Motion estimation bitrate penalty compensation (1.0 = 256) (from INT_MIN to INT_MAX) (default 256)

None
mepre int | None

pre motion estimation (from INT_MIN to INT_MAX) (default 0)

None
intra_penalty int | None

Penalty for intra blocks in block decision (from 0 to 1.07374e+09) (default 0)

None

Returns:

Type Description
FFMpegEncoderOption

the set codec options

mpeg4

mpeg4(
    data_partitioning: bool | None = None,
    alternate_scan: bool | None = None,
    mpeg_quant: int | None = None,
    b_strategy: int | None = None,
    b_sensitivity: int | None = None,
    brd_scale: int | None = None,
    mpv_flags: str | None = None,
    luma_elim_threshold: int | None = None,
    chroma_elim_threshold: int | None = None,
    quantizer_noise_shaping: int | None = None,
    error_rate: int | None = None,
    qsquish: float | None = None,
    rc_qmod_amp: float | None = None,
    rc_qmod_freq: int | None = None,
    rc_eq: str | None = None,
    rc_init_cplx: float | None = None,
    rc_buf_aggressivity: float | None = None,
    border_mask: float | None = None,
    lmin: int | None = None,
    lmax: int | None = None,
    skip_threshold: int | None = None,
    skip_factor: int | None = None,
    skip_exp: int | None = None,
    skip_cmp: (
        int
        | None
        | Literal[
            "sad",
            "sse",
            "satd",
            "dct",
            "psnr",
            "bit",
            "rd",
            "zero",
            "vsad",
            "vsse",
            "nsse",
            "dct264",
            "dctmax",
            "chroma",
            "msad",
        ]
    ) = None,
    sc_threshold: int | None = None,
    noise_reduction: int | None = None,
    ps: int | None = None,
    motion_est: (
        int | None | Literal["zero", "epzs", "xone"]
    ) = None,
    mepc: int | None = None,
    mepre: int | None = None,
    intra_penalty: int | None = None,
) -> FFMpegEncoderOption

MPEG-4 part 2.

Parameters:

Name Type Description Default
data_partitioning bool | None

Use data partitioning. (default false)

None
alternate_scan bool | None

Enable alternate scantable. (default false)

None
mpeg_quant int | None

Use MPEG quantizers instead of H.263 (from 0 to 1) (default 0)

None
b_strategy int | None

Strategy to choose between I/P/B-frames (from 0 to 2) (default 0)

None
b_sensitivity int | None

Adjust sensitivity of b_frame_strategy 1 (from 1 to INT_MAX) (default 40)

None
brd_scale int | None

Downscale frames for dynamic B-frame decision (from 0 to 3) (default 0)

None
mpv_flags str | None

Flags common for all mpegvideo-based encoders. (default 0)

None
luma_elim_threshold int | None

single coefficient elimination threshold for luminance (negative values also consider dc coefficient) (from INT_MIN to INT_MAX) (default 0)

None
chroma_elim_threshold int | None

single coefficient elimination threshold for chrominance (negative values also consider dc coefficient) (from INT_MIN to INT_MAX) (default 0)

None
quantizer_noise_shaping int | None

(from 0 to INT_MAX) (default 0)

None
error_rate int | None

Simulate errors in the bitstream to test error concealment. (from 0 to INT_MAX) (default 0)

None
qsquish float | None

how to keep quantizer between qmin and qmax (0 = clip, 1 = use differentiable function) (from 0 to 99) (default 0)

None
rc_qmod_amp float | None

experimental quantizer modulation (from -FLT_MAX to FLT_MAX) (default 0)

None
rc_qmod_freq int | None

experimental quantizer modulation (from INT_MIN to INT_MAX) (default 0)

None
rc_eq str | None

Set rate control equation. When computing the expression, besides the standard functions defined in the section 'Expression Evaluation', the following functions are available: bits2qp(bits), qp2bits(qp). Also the following constants are available: iTex pTex tex mv fCode iCount mcVar var isI isP isB avgQP qComp avgIITex avgPITex avgPPTex avgBPTex avgTex.

None
rc_init_cplx float | None

initial complexity for 1-pass encoding (from -FLT_MAX to FLT_MAX) (default 0)

None
rc_buf_aggressivity float | None

currently useless (from -FLT_MAX to FLT_MAX) (default 1)

None
border_mask float | None

increase the quantizer for macroblocks close to borders (from -FLT_MAX to FLT_MAX) (default 0)

None
lmin int | None

minimum Lagrange factor (VBR) (from 0 to INT_MAX) (default 236)

None
lmax int | None

maximum Lagrange factor (VBR) (from 0 to INT_MAX) (default 3658)

None
skip_threshold int | None

Frame skip threshold (from INT_MIN to INT_MAX) (default 0)

None
skip_factor int | None

Frame skip factor (from INT_MIN to INT_MAX) (default 0)

None
skip_exp int | None

Frame skip exponent (from INT_MIN to INT_MAX) (default 0)

None
skip_cmp int | None | Literal['sad', 'sse', 'satd', 'dct', 'psnr', 'bit', 'rd', 'zero', 'vsad', 'vsse', 'nsse', 'dct264', 'dctmax', 'chroma', 'msad']

Frame skip compare function (from INT_MIN to INT_MAX) (default dctmax)

None
sc_threshold int | None

Scene change threshold (from INT_MIN to INT_MAX) (default 0)

None
noise_reduction int | None

Noise reduction (from INT_MIN to INT_MAX) (default 0)

None
ps int | None

RTP payload size in bytes (from INT_MIN to INT_MAX) (default 0)

None
motion_est int | None | Literal['zero', 'epzs', 'xone']

motion estimation algorithm (from 0 to 2) (default epzs)

None
mepc int | None

Motion estimation bitrate penalty compensation (1.0 = 256) (from INT_MIN to INT_MAX) (default 256)

None
mepre int | None

pre motion estimation (from INT_MIN to INT_MAX) (default 0)

None
intra_penalty int | None

Penalty for intra blocks in block decision (from 0 to 1.07374e+09) (default 0)

None

Returns:

Type Description
FFMpegEncoderOption

the set codec options

mpeg4_v4l2m2m

mpeg4_v4l2m2m(
    num_output_buffers: int | None = None,
    num_capture_buffers: int | None = None,
) -> FFMpegEncoderOption

V4L2 mem2mem MPEG4 encoder wrapper (codec mpeg4).

Parameters:

Name Type Description Default
num_output_buffers int | None

Number of buffers in the output context (from 2 to INT_MAX) (default 16)

None
num_capture_buffers int | None

Number of buffers in the capture context (from 4 to INT_MAX) (default 4)

None

Returns:

Type Description
FFMpegEncoderOption

the set codec options

msmpeg4

msmpeg4(
    mpv_flags: str | None = None,
    luma_elim_threshold: int | None = None,
    chroma_elim_threshold: int | None = None,
    quantizer_noise_shaping: int | None = None,
    error_rate: int | None = None,
    qsquish: float | None = None,
    rc_qmod_amp: float | None = None,
    rc_qmod_freq: int | None = None,
    rc_eq: str | None = None,
    rc_init_cplx: float | None = None,
    rc_buf_aggressivity: float | None = None,
    border_mask: float | None = None,
    lmin: int | None = None,
    lmax: int | None = None,
    skip_threshold: int | None = None,
    skip_factor: int | None = None,
    skip_exp: int | None = None,
    skip_cmp: (
        int
        | None
        | Literal[
            "sad",
            "sse",
            "satd",
            "dct",
            "psnr",
            "bit",
            "rd",
            "zero",
            "vsad",
            "vsse",
            "nsse",
            "dct264",
            "dctmax",
            "chroma",
            "msad",
        ]
    ) = None,
    sc_threshold: int | None = None,
    noise_reduction: int | None = None,
    ps: int | None = None,
    motion_est: (
        int | None | Literal["zero", "epzs", "xone"]
    ) = None,
    mepc: int | None = None,
    mepre: int | None = None,
    intra_penalty: int | None = None,
) -> FFMpegEncoderOption

MPEG-4 part 2 Microsoft variant version 3 (codec msmpeg4v3).

Parameters:

Name Type Description Default
mpv_flags str | None

Flags common for all mpegvideo-based encoders. (default 0)

None
luma_elim_threshold int | None

single coefficient elimination threshold for luminance (negative values also consider dc coefficient) (from INT_MIN to INT_MAX) (default 0)

None
chroma_elim_threshold int | None

single coefficient elimination threshold for chrominance (negative values also consider dc coefficient) (from INT_MIN to INT_MAX) (default 0)

None
quantizer_noise_shaping int | None

(from 0 to INT_MAX) (default 0)

None
error_rate int | None

Simulate errors in the bitstream to test error concealment. (from 0 to INT_MAX) (default 0)

None
qsquish float | None

how to keep quantizer between qmin and qmax (0 = clip, 1 = use differentiable function) (from 0 to 99) (default 0)

None
rc_qmod_amp float | None

experimental quantizer modulation (from -FLT_MAX to FLT_MAX) (default 0)

None
rc_qmod_freq int | None

experimental quantizer modulation (from INT_MIN to INT_MAX) (default 0)

None
rc_eq str | None

Set rate control equation. When computing the expression, besides the standard functions defined in the section 'Expression Evaluation', the following functions are available: bits2qp(bits), qp2bits(qp). Also the following constants are available: iTex pTex tex mv fCode iCount mcVar var isI isP isB avgQP qComp avgIITex avgPITex avgPPTex avgBPTex avgTex.

None
rc_init_cplx float | None

initial complexity for 1-pass encoding (from -FLT_MAX to FLT_MAX) (default 0)

None
rc_buf_aggressivity float | None

currently useless (from -FLT_MAX to FLT_MAX) (default 1)

None
border_mask float | None

increase the quantizer for macroblocks close to borders (from -FLT_MAX to FLT_MAX) (default 0)

None
lmin int | None

minimum Lagrange factor (VBR) (from 0 to INT_MAX) (default 236)

None
lmax int | None

maximum Lagrange factor (VBR) (from 0 to INT_MAX) (default 3658)

None
skip_threshold int | None

Frame skip threshold (from INT_MIN to INT_MAX) (default 0)

None
skip_factor int | None

Frame skip factor (from INT_MIN to INT_MAX) (default 0)

None
skip_exp int | None

Frame skip exponent (from INT_MIN to INT_MAX) (default 0)

None
skip_cmp int | None | Literal['sad', 'sse', 'satd', 'dct', 'psnr', 'bit', 'rd', 'zero', 'vsad', 'vsse', 'nsse', 'dct264', 'dctmax', 'chroma', 'msad']

Frame skip compare function (from INT_MIN to INT_MAX) (default dctmax)

None
sc_threshold int | None

Scene change threshold (from INT_MIN to INT_MAX) (default 0)

None
noise_reduction int | None

Noise reduction (from INT_MIN to INT_MAX) (default 0)

None
ps int | None

RTP payload size in bytes (from INT_MIN to INT_MAX) (default 0)

None
motion_est int | None | Literal['zero', 'epzs', 'xone']

motion estimation algorithm (from 0 to 2) (default epzs)

None
mepc int | None

Motion estimation bitrate penalty compensation (1.0 = 256) (from INT_MIN to INT_MAX) (default 256)

None
mepre int | None

pre motion estimation (from INT_MIN to INT_MAX) (default 0)

None
intra_penalty int | None

Penalty for intra blocks in block decision (from 0 to 1.07374e+09) (default 0)

None

Returns:

Type Description
FFMpegEncoderOption

the set codec options

msmpeg4v2

msmpeg4v2(
    mpv_flags: str | None = None,
    luma_elim_threshold: int | None = None,
    chroma_elim_threshold: int | None = None,
    quantizer_noise_shaping: int | None = None,
    error_rate: int | None = None,
    qsquish: float | None = None,
    rc_qmod_amp: float | None = None,
    rc_qmod_freq: int | None = None,
    rc_eq: str | None = None,
    rc_init_cplx: float | None = None,
    rc_buf_aggressivity: float | None = None,
    border_mask: float | None = None,
    lmin: int | None = None,
    lmax: int | None = None,
    skip_threshold: int | None = None,
    skip_factor: int | None = None,
    skip_exp: int | None = None,
    skip_cmp: (
        int
        | None
        | Literal[
            "sad",
            "sse",
            "satd",
            "dct",
            "psnr",
            "bit",
            "rd",
            "zero",
            "vsad",
            "vsse",
            "nsse",
            "dct264",
            "dctmax",
            "chroma",
            "msad",
        ]
    ) = None,
    sc_threshold: int | None = None,
    noise_reduction: int | None = None,
    ps: int | None = None,
    motion_est: (
        int | None | Literal["zero", "epzs", "xone"]
    ) = None,
    mepc: int | None = None,
    mepre: int | None = None,
    intra_penalty: int | None = None,
) -> FFMpegEncoderOption

MPEG-4 part 2 Microsoft variant version 2.

Parameters:

Name Type Description Default
mpv_flags str | None

Flags common for all mpegvideo-based encoders. (default 0)

None
luma_elim_threshold int | None

single coefficient elimination threshold for luminance (negative values also consider dc coefficient) (from INT_MIN to INT_MAX) (default 0)

None
chroma_elim_threshold int | None

single coefficient elimination threshold for chrominance (negative values also consider dc coefficient) (from INT_MIN to INT_MAX) (default 0)

None
quantizer_noise_shaping int | None

(from 0 to INT_MAX) (default 0)

None
error_rate int | None

Simulate errors in the bitstream to test error concealment. (from 0 to INT_MAX) (default 0)

None
qsquish float | None

how to keep quantizer between qmin and qmax (0 = clip, 1 = use differentiable function) (from 0 to 99) (default 0)

None
rc_qmod_amp float | None

experimental quantizer modulation (from -FLT_MAX to FLT_MAX) (default 0)

None
rc_qmod_freq int | None

experimental quantizer modulation (from INT_MIN to INT_MAX) (default 0)

None
rc_eq str | None

Set rate control equation. When computing the expression, besides the standard functions defined in the section 'Expression Evaluation', the following functions are available: bits2qp(bits), qp2bits(qp). Also the following constants are available: iTex pTex tex mv fCode iCount mcVar var isI isP isB avgQP qComp avgIITex avgPITex avgPPTex avgBPTex avgTex.

None
rc_init_cplx float | None

initial complexity for 1-pass encoding (from -FLT_MAX to FLT_MAX) (default 0)

None
rc_buf_aggressivity float | None

currently useless (from -FLT_MAX to FLT_MAX) (default 1)

None
border_mask float | None

increase the quantizer for macroblocks close to borders (from -FLT_MAX to FLT_MAX) (default 0)

None
lmin int | None

minimum Lagrange factor (VBR) (from 0 to INT_MAX) (default 236)

None
lmax int | None

maximum Lagrange factor (VBR) (from 0 to INT_MAX) (default 3658)

None
skip_threshold int | None

Frame skip threshold (from INT_MIN to INT_MAX) (default 0)

None
skip_factor int | None

Frame skip factor (from INT_MIN to INT_MAX) (default 0)

None
skip_exp int | None

Frame skip exponent (from INT_MIN to INT_MAX) (default 0)

None
skip_cmp int | None | Literal['sad', 'sse', 'satd', 'dct', 'psnr', 'bit', 'rd', 'zero', 'vsad', 'vsse', 'nsse', 'dct264', 'dctmax', 'chroma', 'msad']

Frame skip compare function (from INT_MIN to INT_MAX) (default dctmax)

None
sc_threshold int | None

Scene change threshold (from INT_MIN to INT_MAX) (default 0)

None
noise_reduction int | None

Noise reduction (from INT_MIN to INT_MAX) (default 0)

None
ps int | None

RTP payload size in bytes (from INT_MIN to INT_MAX) (default 0)

None
motion_est int | None | Literal['zero', 'epzs', 'xone']

motion estimation algorithm (from 0 to 2) (default epzs)

None
mepc int | None

Motion estimation bitrate penalty compensation (1.0 = 256) (from INT_MIN to INT_MAX) (default 256)

None
mepre int | None

pre motion estimation (from INT_MIN to INT_MAX) (default 0)

None
intra_penalty int | None

Penalty for intra blocks in block decision (from 0 to 1.07374e+09) (default 0)

None

Returns:

Type Description
FFMpegEncoderOption

the set codec options

msrle

Microsoft RLE.

Returns:

Type Description
FFMpegEncoderOption

the set codec options

msvideo1

msvideo1() -> FFMpegEncoderOption

Microsoft Video-1.

Returns:

Type Description
FFMpegEncoderOption

the set codec options

nellymoser

nellymoser() -> FFMpegEncoderOption

Nellymoser Asao.

Returns:

Type Description
FFMpegEncoderOption

the set codec options

opus

opus(
    opus_delay: float | None = None,
    apply_phase_inv: bool | None = None,
) -> FFMpegEncoderOption

Opus.

Parameters:

Name Type Description Default
opus_delay float | None

Maximum delay in milliseconds (from 2.5 to 360) (default 360)

None
apply_phase_inv bool | None

Apply intensity stereo phase inversion (default true)

None

Returns:

Type Description
FFMpegEncoderOption

the set codec options

pam

PAM (Portable AnyMap) image.

Returns:

Type Description
FFMpegEncoderOption

the set codec options

pbm

PBM (Portable BitMap) image.

Returns:

Type Description
FFMpegEncoderOption

the set codec options

pcm_alaw

pcm_alaw() -> FFMpegEncoderOption

PCM A-law / G.711 A-law.

Returns:

Type Description
FFMpegEncoderOption

the set codec options

pcm_bluray

pcm_bluray() -> FFMpegEncoderOption

PCM signed 16|20|24-bit big-endian for Blu-ray media.

Returns:

Type Description
FFMpegEncoderOption

the set codec options

pcm_dvd

pcm_dvd() -> FFMpegEncoderOption

PCM signed 16|20|24-bit big-endian for DVD media.

Returns:

Type Description
FFMpegEncoderOption

the set codec options

pcm_f32be

pcm_f32be() -> FFMpegEncoderOption

PCM 32-bit floating point big-endian.

Returns:

Type Description
FFMpegEncoderOption

the set codec options

pcm_f32le

pcm_f32le() -> FFMpegEncoderOption

PCM 32-bit floating point little-endian.

Returns:

Type Description
FFMpegEncoderOption

the set codec options

pcm_f64be

pcm_f64be() -> FFMpegEncoderOption

PCM 64-bit floating point big-endian.

Returns:

Type Description
FFMpegEncoderOption

the set codec options

pcm_f64le

pcm_f64le() -> FFMpegEncoderOption

PCM 64-bit floating point little-endian.

Returns:

Type Description
FFMpegEncoderOption

the set codec options

pcm_mulaw

pcm_mulaw() -> FFMpegEncoderOption

PCM mu-law / G.711 mu-law.

Returns:

Type Description
FFMpegEncoderOption

the set codec options

pcm_s16be

pcm_s16be() -> FFMpegEncoderOption

PCM signed 16-bit big-endian.

Returns:

Type Description
FFMpegEncoderOption

the set codec options

pcm_s16be_planar

pcm_s16be_planar() -> FFMpegEncoderOption

PCM signed 16-bit big-endian planar.

Returns:

Type Description
FFMpegEncoderOption

the set codec options

pcm_s16le

pcm_s16le() -> FFMpegEncoderOption

PCM signed 16-bit little-endian.

Returns:

Type Description
FFMpegEncoderOption

the set codec options

pcm_s16le_planar

pcm_s16le_planar() -> FFMpegEncoderOption

PCM signed 16-bit little-endian planar.

Returns:

Type Description
FFMpegEncoderOption

the set codec options

pcm_s24be

pcm_s24be() -> FFMpegEncoderOption

PCM signed 24-bit big-endian.

Returns:

Type Description
FFMpegEncoderOption

the set codec options

pcm_s24daud

pcm_s24daud() -> FFMpegEncoderOption

PCM D-Cinema audio signed 24-bit.

Returns:

Type Description
FFMpegEncoderOption

the set codec options

pcm_s24le

pcm_s24le() -> FFMpegEncoderOption

PCM signed 24-bit little-endian.

Returns:

Type Description
FFMpegEncoderOption

the set codec options

pcm_s24le_planar

pcm_s24le_planar() -> FFMpegEncoderOption

PCM signed 24-bit little-endian planar.

Returns:

Type Description
FFMpegEncoderOption

the set codec options

pcm_s32be

pcm_s32be() -> FFMpegEncoderOption

PCM signed 32-bit big-endian.

Returns:

Type Description
FFMpegEncoderOption

the set codec options

pcm_s32le

pcm_s32le() -> FFMpegEncoderOption

PCM signed 32-bit little-endian.

Returns:

Type Description
FFMpegEncoderOption

the set codec options

pcm_s32le_planar

pcm_s32le_planar() -> FFMpegEncoderOption

PCM signed 32-bit little-endian planar.

Returns:

Type Description
FFMpegEncoderOption

the set codec options

pcm_s64be

pcm_s64be() -> FFMpegEncoderOption

PCM signed 64-bit big-endian.

Returns:

Type Description
FFMpegEncoderOption

the set codec options

pcm_s64le

pcm_s64le() -> FFMpegEncoderOption

PCM signed 64-bit little-endian.

Returns:

Type Description
FFMpegEncoderOption

the set codec options

pcm_s8

pcm_s8() -> FFMpegEncoderOption

PCM signed 8-bit.

Returns:

Type Description
FFMpegEncoderOption

the set codec options

pcm_s8_planar

pcm_s8_planar() -> FFMpegEncoderOption

PCM signed 8-bit planar.

Returns:

Type Description
FFMpegEncoderOption

the set codec options

pcm_u16be

pcm_u16be() -> FFMpegEncoderOption

PCM unsigned 16-bit big-endian.

Returns:

Type Description
FFMpegEncoderOption

the set codec options

pcm_u16le

pcm_u16le() -> FFMpegEncoderOption

PCM unsigned 16-bit little-endian.

Returns:

Type Description
FFMpegEncoderOption

the set codec options

pcm_u24be

pcm_u24be() -> FFMpegEncoderOption

PCM unsigned 24-bit big-endian.

Returns:

Type Description
FFMpegEncoderOption

the set codec options

pcm_u24le

pcm_u24le() -> FFMpegEncoderOption

PCM unsigned 24-bit little-endian.

Returns:

Type Description
FFMpegEncoderOption

the set codec options

pcm_u32be

pcm_u32be() -> FFMpegEncoderOption

PCM unsigned 32-bit big-endian.

Returns:

Type Description
FFMpegEncoderOption

the set codec options

pcm_u32le

pcm_u32le() -> FFMpegEncoderOption

PCM unsigned 32-bit little-endian.

Returns:

Type Description
FFMpegEncoderOption

the set codec options

pcm_u8

pcm_u8() -> FFMpegEncoderOption

PCM unsigned 8-bit.

Returns:

Type Description
FFMpegEncoderOption

the set codec options

pcm_vidc

pcm_vidc() -> FFMpegEncoderOption

PCM Archimedes VIDC.

Returns:

Type Description
FFMpegEncoderOption

the set codec options

pcx

PC Paintbrush PCX image.

Returns:

Type Description
FFMpegEncoderOption

the set codec options

pfm

PFM (Portable FloatMap) image.

Returns:

Type Description
FFMpegEncoderOption

the set codec options

pgm

PGM (Portable GrayMap) image.

Returns:

Type Description
FFMpegEncoderOption

the set codec options

pgmyuv

pgmyuv() -> FFMpegEncoderOption

PGMYUV (Portable GrayMap YUV) image.

Returns:

Type Description
FFMpegEncoderOption

the set codec options

phm

PHM (Portable HalfFloatMap) image.

Returns:

Type Description
FFMpegEncoderOption

the set codec options

png

png(
    dpi: int | None = None,
    dpm: int | None = None,
    pred: (
        int
        | None
        | Literal[
            "none", "sub", "up", "avg", "paeth", "mixed"
        ]
    ) = None,
) -> FFMpegEncoderOption

PNG (Portable Network Graphics) image.

Parameters:

Name Type Description Default
dpi int | None

Set image resolution (in dots per inch) (from 0 to 65536) (default 0)

None
dpm int | None

Set image resolution (in dots per meter) (from 0 to 65536) (default 0)

None
pred int | None | Literal['none', 'sub', 'up', 'avg', 'paeth', 'mixed']

Prediction method (from 0 to 5) (default none)

None

Returns:

Type Description
FFMpegEncoderOption

the set codec options

ppm

PPM (Portable PixelMap) image.

Returns:

Type Description
FFMpegEncoderOption

the set codec options

prores

prores(vendor: str | None = None) -> FFMpegEncoderOption

Apple ProRes.

Parameters:

Name Type Description Default
vendor str | None

vendor ID (default "fmpg")

None

Returns:

Type Description
FFMpegEncoderOption

the set codec options

prores_aw

prores_aw(vendor: str | None = None) -> FFMpegEncoderOption

Apple ProRes (codec prores).

Parameters:

Name Type Description Default
vendor str | None

vendor ID (default "fmpg")

None

Returns:

Type Description
FFMpegEncoderOption

the set codec options

prores_ks

prores_ks(
    mbs_per_slice: int | None = None,
    profile: (
        int
        | None
        | Literal[
            "auto",
            "proxy",
            "lt",
            "standard",
            "hq",
            "4444",
            "4444xq",
        ]
    ) = None,
    vendor: str | None = None,
    bits_per_mb: int | None = None,
    quant_mat: (
        int
        | None
        | Literal[
            "auto",
            "proxy",
            "lt",
            "standard",
            "hq",
            "default",
        ]
    ) = None,
    alpha_bits: int | None = None,
) -> FFMpegEncoderOption

Apple ProRes (iCodec Pro) (codec prores).

Parameters:

Name Type Description Default
mbs_per_slice int | None

macroblocks per slice (from 1 to 8) (default 8)

None
profile int | None | Literal['auto', 'proxy', 'lt', 'standard', 'hq', '4444', '4444xq']

(from -1 to 5) (default auto)

None
vendor str | None

vendor ID (default "Lavc")

None
bits_per_mb int | None

desired bits per macroblock (from 0 to 8192) (default 0)

None
quant_mat int | None | Literal['auto', 'proxy', 'lt', 'standard', 'hq', 'default']

quantiser matrix (from -1 to 6) (default auto)

None
alpha_bits int | None

bits for alpha plane (from 0 to 16) (default 16)

None

Returns:

Type Description
FFMpegEncoderOption

the set codec options

qoi

QOI (Quite OK Image format) image.

Returns:

Type Description
FFMpegEncoderOption

the set codec options

qtrle

QuickTime Animation (RLE) video.

Returns:

Type Description
FFMpegEncoderOption

the set codec options

r10k

AJA Kona 10-bit RGB Codec.

Returns:

Type Description
FFMpegEncoderOption

the set codec options

r210

Uncompressed RGB 10-bit.

Returns:

Type Description
FFMpegEncoderOption

the set codec options

rawvideo

rawvideo() -> FFMpegEncoderOption

Raw video.

Returns:

Type Description
FFMpegEncoderOption

the set codec options

real_144

real_144() -> FFMpegEncoderOption

RealAudio 1.0 (14.4K) (codec ra_144).

Returns:

Type Description
FFMpegEncoderOption

the set codec options

roq_dpcm

roq_dpcm() -> FFMpegEncoderOption

Id RoQ DPCM.

Returns:

Type Description
FFMpegEncoderOption

the set codec options

roqvideo

roqvideo(
    quake3_compat: bool | None = None,
) -> FFMpegEncoderOption

Id RoQ video (codec roq).

Parameters:

Name Type Description Default
quake3_compat bool | None

Whether to respect known limitations in Quake 3 decoder (default true)

None

Returns:

Type Description
FFMpegEncoderOption

the set codec options

rpza

rpza(
    skip_frame_thresh: int | None = None,
    continue_one_color_thresh: int | None = None,
    sixteen_color_thresh: int | None = None,
) -> FFMpegEncoderOption

QuickTime video (RPZA).

Parameters:

Name Type Description Default
skip_frame_thresh int | None

(from 0 to 24) (default 1)

None
continue_one_color_thresh int | None

(from 0 to 24) (default 0)

None
sixteen_color_thresh int | None

(from 0 to 24) (default 1)

None

Returns:

Type Description
FFMpegEncoderOption

the set codec options

rv10

rv10(
    mpv_flags: str | None = None,
    luma_elim_threshold: int | None = None,
    chroma_elim_threshold: int | None = None,
    quantizer_noise_shaping: int | None = None,
    error_rate: int | None = None,
    qsquish: float | None = None,
    rc_qmod_amp: float | None = None,
    rc_qmod_freq: int | None = None,
    rc_eq: str | None = None,
    rc_init_cplx: float | None = None,
    rc_buf_aggressivity: float | None = None,
    border_mask: float | None = None,
    lmin: int | None = None,
    lmax: int | None = None,
    skip_threshold: int | None = None,
    skip_factor: int | None = None,
    skip_exp: int | None = None,
    skip_cmp: (
        int
        | None
        | Literal[
            "sad",
            "sse",
            "satd",
            "dct",
            "psnr",
            "bit",
            "rd",
            "zero",
            "vsad",
            "vsse",
            "nsse",
            "dct264",
            "dctmax",
            "chroma",
            "msad",
        ]
    ) = None,
    sc_threshold: int | None = None,
    noise_reduction: int | None = None,
    ps: int | None = None,
    motion_est: (
        int | None | Literal["zero", "epzs", "xone"]
    ) = None,
    mepc: int | None = None,
    mepre: int | None = None,
    intra_penalty: int | None = None,
) -> FFMpegEncoderOption

RealVideo 1.0.

Parameters:

Name Type Description Default
mpv_flags str | None

Flags common for all mpegvideo-based encoders. (default 0)

None
luma_elim_threshold int | None

single coefficient elimination threshold for luminance (negative values also consider dc coefficient) (from INT_MIN to INT_MAX) (default 0)

None
chroma_elim_threshold int | None

single coefficient elimination threshold for chrominance (negative values also consider dc coefficient) (from INT_MIN to INT_MAX) (default 0)

None
quantizer_noise_shaping int | None

(from 0 to INT_MAX) (default 0)

None
error_rate int | None

Simulate errors in the bitstream to test error concealment. (from 0 to INT_MAX) (default 0)

None
qsquish float | None

how to keep quantizer between qmin and qmax (0 = clip, 1 = use differentiable function) (from 0 to 99) (default 0)

None
rc_qmod_amp float | None

experimental quantizer modulation (from -FLT_MAX to FLT_MAX) (default 0)

None
rc_qmod_freq int | None

experimental quantizer modulation (from INT_MIN to INT_MAX) (default 0)

None
rc_eq str | None

Set rate control equation. When computing the expression, besides the standard functions defined in the section 'Expression Evaluation', the following functions are available: bits2qp(bits), qp2bits(qp). Also the following constants are available: iTex pTex tex mv fCode iCount mcVar var isI isP isB avgQP qComp avgIITex avgPITex avgPPTex avgBPTex avgTex.

None
rc_init_cplx float | None

initial complexity for 1-pass encoding (from -FLT_MAX to FLT_MAX) (default 0)

None
rc_buf_aggressivity float | None

currently useless (from -FLT_MAX to FLT_MAX) (default 1)

None
border_mask float | None

increase the quantizer for macroblocks close to borders (from -FLT_MAX to FLT_MAX) (default 0)

None
lmin int | None

minimum Lagrange factor (VBR) (from 0 to INT_MAX) (default 236)

None
lmax int | None

maximum Lagrange factor (VBR) (from 0 to INT_MAX) (default 3658)

None
skip_threshold int | None

Frame skip threshold (from INT_MIN to INT_MAX) (default 0)

None
skip_factor int | None

Frame skip factor (from INT_MIN to INT_MAX) (default 0)

None
skip_exp int | None

Frame skip exponent (from INT_MIN to INT_MAX) (default 0)

None
skip_cmp int | None | Literal['sad', 'sse', 'satd', 'dct', 'psnr', 'bit', 'rd', 'zero', 'vsad', 'vsse', 'nsse', 'dct264', 'dctmax', 'chroma', 'msad']

Frame skip compare function (from INT_MIN to INT_MAX) (default dctmax)

None
sc_threshold int | None

Scene change threshold (from INT_MIN to INT_MAX) (default 0)

None
noise_reduction int | None

Noise reduction (from INT_MIN to INT_MAX) (default 0)

None
ps int | None

RTP payload size in bytes (from INT_MIN to INT_MAX) (default 0)

None
motion_est int | None | Literal['zero', 'epzs', 'xone']

motion estimation algorithm (from 0 to 2) (default epzs)

None
mepc int | None

Motion estimation bitrate penalty compensation (1.0 = 256) (from INT_MIN to INT_MAX) (default 256)

None
mepre int | None

pre motion estimation (from INT_MIN to INT_MAX) (default 0)

None
intra_penalty int | None

Penalty for intra blocks in block decision (from 0 to 1.07374e+09) (default 0)

None

Returns:

Type Description
FFMpegEncoderOption

the set codec options

rv20

rv20(
    mpv_flags: str | None = None,
    luma_elim_threshold: int | None = None,
    chroma_elim_threshold: int | None = None,
    quantizer_noise_shaping: int | None = None,
    error_rate: int | None = None,
    qsquish: float | None = None,
    rc_qmod_amp: float | None = None,
    rc_qmod_freq: int | None = None,
    rc_eq: str | None = None,
    rc_init_cplx: float | None = None,
    rc_buf_aggressivity: float | None = None,
    border_mask: float | None = None,
    lmin: int | None = None,
    lmax: int | None = None,
    skip_threshold: int | None = None,
    skip_factor: int | None = None,
    skip_exp: int | None = None,
    skip_cmp: (
        int
        | None
        | Literal[
            "sad",
            "sse",
            "satd",
            "dct",
            "psnr",
            "bit",
            "rd",
            "zero",
            "vsad",
            "vsse",
            "nsse",
            "dct264",
            "dctmax",
            "chroma",
            "msad",
        ]
    ) = None,
    sc_threshold: int | None = None,
    noise_reduction: int | None = None,
    ps: int | None = None,
    motion_est: (
        int | None | Literal["zero", "epzs", "xone"]
    ) = None,
    mepc: int | None = None,
    mepre: int | None = None,
    intra_penalty: int | None = None,
) -> FFMpegEncoderOption

RealVideo 2.0.

Parameters:

Name Type Description Default
mpv_flags str | None

Flags common for all mpegvideo-based encoders. (default 0)

None
luma_elim_threshold int | None

single coefficient elimination threshold for luminance (negative values also consider dc coefficient) (from INT_MIN to INT_MAX) (default 0)

None
chroma_elim_threshold int | None

single coefficient elimination threshold for chrominance (negative values also consider dc coefficient) (from INT_MIN to INT_MAX) (default 0)

None
quantizer_noise_shaping int | None

(from 0 to INT_MAX) (default 0)

None
error_rate int | None

Simulate errors in the bitstream to test error concealment. (from 0 to INT_MAX) (default 0)

None
qsquish float | None

how to keep quantizer between qmin and qmax (0 = clip, 1 = use differentiable function) (from 0 to 99) (default 0)

None
rc_qmod_amp float | None

experimental quantizer modulation (from -FLT_MAX to FLT_MAX) (default 0)

None
rc_qmod_freq int | None

experimental quantizer modulation (from INT_MIN to INT_MAX) (default 0)

None
rc_eq str | None

Set rate control equation. When computing the expression, besides the standard functions defined in the section 'Expression Evaluation', the following functions are available: bits2qp(bits), qp2bits(qp). Also the following constants are available: iTex pTex tex mv fCode iCount mcVar var isI isP isB avgQP qComp avgIITex avgPITex avgPPTex avgBPTex avgTex.

None
rc_init_cplx float | None

initial complexity for 1-pass encoding (from -FLT_MAX to FLT_MAX) (default 0)

None
rc_buf_aggressivity float | None

currently useless (from -FLT_MAX to FLT_MAX) (default 1)

None
border_mask float | None

increase the quantizer for macroblocks close to borders (from -FLT_MAX to FLT_MAX) (default 0)

None
lmin int | None

minimum Lagrange factor (VBR) (from 0 to INT_MAX) (default 236)

None
lmax int | None

maximum Lagrange factor (VBR) (from 0 to INT_MAX) (default 3658)

None
skip_threshold int | None

Frame skip threshold (from INT_MIN to INT_MAX) (default 0)

None
skip_factor int | None

Frame skip factor (from INT_MIN to INT_MAX) (default 0)

None
skip_exp int | None

Frame skip exponent (from INT_MIN to INT_MAX) (default 0)

None
skip_cmp int | None | Literal['sad', 'sse', 'satd', 'dct', 'psnr', 'bit', 'rd', 'zero', 'vsad', 'vsse', 'nsse', 'dct264', 'dctmax', 'chroma', 'msad']

Frame skip compare function (from INT_MIN to INT_MAX) (default dctmax)

None
sc_threshold int | None

Scene change threshold (from INT_MIN to INT_MAX) (default 0)

None
noise_reduction int | None

Noise reduction (from INT_MIN to INT_MAX) (default 0)

None
ps int | None

RTP payload size in bytes (from INT_MIN to INT_MAX) (default 0)

None
motion_est int | None | Literal['zero', 'epzs', 'xone']

motion estimation algorithm (from 0 to 2) (default epzs)

None
mepc int | None

Motion estimation bitrate penalty compensation (1.0 = 256) (from INT_MIN to INT_MAX) (default 256)

None
mepre int | None

pre motion estimation (from INT_MIN to INT_MAX) (default 0)

None
intra_penalty int | None

Penalty for intra blocks in block decision (from 0 to 1.07374e+09) (default 0)

None

Returns:

Type Description
FFMpegEncoderOption

the set codec options

s302m

SMPTE 302M.

Returns:

Type Description
FFMpegEncoderOption

the set codec options

sbc

sbc(
    sbc_delay: str | None = None, msbc: bool | None = None
) -> FFMpegEncoderOption

SBC (low-complexity subband codec).

Parameters:

Name Type Description Default
sbc_delay str | None

set maximum algorithmic latency (default 0.013)

None
msbc bool | None

use mSBC mode (wideband speech mono SBC) (default false)

None

Returns:

Type Description
FFMpegEncoderOption

the set codec options

sgi

sgi(rle: int | None = None) -> FFMpegEncoderOption

SGI image.

Parameters:

Name Type Description Default
rle int | None

Use run-length compression (from 0 to 1) (default 1)

None

Returns:

Type Description
FFMpegEncoderOption

the set codec options

smc

QuickTime Graphics (SMC).

Returns:

Type Description
FFMpegEncoderOption

the set codec options

snow

snow(
    motion_est: (
        int | None | Literal["zero", "epzs", "xone", "iter"]
    ) = None,
    memc_only: bool | None = None,
    no_bitstream: bool | None = None,
    intra_penalty: int | None = None,
    iterative_dia_size: int | None = None,
    sc_threshold: int | None = None,
    pred: int | None | Literal["dwt97", "dwt53"] = None,
    rc_eq: str | None = None,
) -> FFMpegEncoderOption

Snow.

Parameters:

Name Type Description Default
motion_est int | None | Literal['zero', 'epzs', 'xone', 'iter']

motion estimation algorithm (from 0 to 3) (default epzs)

None
memc_only bool | None

Only do ME/MC (I frames -> ref, P frame -> ME+MC). (default false)

None
no_bitstream bool | None

Skip final bitstream writeout. (default false)

None
intra_penalty int | None

Penalty for intra blocks in block decission (from 0 to INT_MAX) (default 0)

None
iterative_dia_size int | None

Dia size for the iterative ME (from 0 to INT_MAX) (default 0)

None
sc_threshold int | None

Scene change threshold (from INT_MIN to INT_MAX) (default 0)

None
pred int | None | Literal['dwt97', 'dwt53']

Spatial decomposition type (from 0 to 1) (default dwt97)

None
rc_eq str | None

Set rate control equation. When computing the expression, besides the standard functions defined in the section 'Expression Evaluation', the following functions are available: bits2qp(bits), qp2bits(qp). Also the following constants are available: iTex pTex tex mv fCode iCount mcVar var isI isP isB avgQP qComp avgIITex avgPITex avgPPTex avgBPTex avgTex.

None

Returns:

Type Description
FFMpegEncoderOption

the set codec options

sonic

Sonic.

Returns:

Type Description
FFMpegEncoderOption

the set codec options

sonicls

sonicls() -> FFMpegEncoderOption

Sonic lossless.

Returns:

Type Description
FFMpegEncoderOption

the set codec options

speedhq

speedhq(
    mpv_flags: str | None = None,
    luma_elim_threshold: int | None = None,
    chroma_elim_threshold: int | None = None,
    quantizer_noise_shaping: int | None = None,
    error_rate: int | None = None,
    qsquish: float | None = None,
    rc_qmod_amp: float | None = None,
    rc_qmod_freq: int | None = None,
    rc_eq: str | None = None,
    rc_init_cplx: float | None = None,
    rc_buf_aggressivity: float | None = None,
    border_mask: float | None = None,
    lmin: int | None = None,
    lmax: int | None = None,
    skip_threshold: int | None = None,
    skip_factor: int | None = None,
    skip_exp: int | None = None,
    skip_cmp: (
        int
        | None
        | Literal[
            "sad",
            "sse",
            "satd",
            "dct",
            "psnr",
            "bit",
            "rd",
            "zero",
            "vsad",
            "vsse",
            "nsse",
            "dct264",
            "dctmax",
            "chroma",
            "msad",
        ]
    ) = None,
    sc_threshold: int | None = None,
    noise_reduction: int | None = None,
    ps: int | None = None,
    motion_est: (
        int | None | Literal["zero", "epzs", "xone"]
    ) = None,
    mepc: int | None = None,
    mepre: int | None = None,
    intra_penalty: int | None = None,
) -> FFMpegEncoderOption

NewTek SpeedHQ.

Parameters:

Name Type Description Default
mpv_flags str | None

Flags common for all mpegvideo-based encoders. (default 0)

None
luma_elim_threshold int | None

single coefficient elimination threshold for luminance (negative values also consider dc coefficient) (from INT_MIN to INT_MAX) (default 0)

None
chroma_elim_threshold int | None

single coefficient elimination threshold for chrominance (negative values also consider dc coefficient) (from INT_MIN to INT_MAX) (default 0)

None
quantizer_noise_shaping int | None

(from 0 to INT_MAX) (default 0)

None
error_rate int | None

Simulate errors in the bitstream to test error concealment. (from 0 to INT_MAX) (default 0)

None
qsquish float | None

how to keep quantizer between qmin and qmax (0 = clip, 1 = use differentiable function) (from 0 to 99) (default 0)

None
rc_qmod_amp float | None

experimental quantizer modulation (from -FLT_MAX to FLT_MAX) (default 0)

None
rc_qmod_freq int | None

experimental quantizer modulation (from INT_MIN to INT_MAX) (default 0)

None
rc_eq str | None

Set rate control equation. When computing the expression, besides the standard functions defined in the section 'Expression Evaluation', the following functions are available: bits2qp(bits), qp2bits(qp). Also the following constants are available: iTex pTex tex mv fCode iCount mcVar var isI isP isB avgQP qComp avgIITex avgPITex avgPPTex avgBPTex avgTex.

None
rc_init_cplx float | None

initial complexity for 1-pass encoding (from -FLT_MAX to FLT_MAX) (default 0)

None
rc_buf_aggressivity float | None

currently useless (from -FLT_MAX to FLT_MAX) (default 1)

None
border_mask float | None

increase the quantizer for macroblocks close to borders (from -FLT_MAX to FLT_MAX) (default 0)

None
lmin int | None

minimum Lagrange factor (VBR) (from 0 to INT_MAX) (default 236)

None
lmax int | None

maximum Lagrange factor (VBR) (from 0 to INT_MAX) (default 3658)

None
skip_threshold int | None

Frame skip threshold (from INT_MIN to INT_MAX) (default 0)

None
skip_factor int | None

Frame skip factor (from INT_MIN to INT_MAX) (default 0)

None
skip_exp int | None

Frame skip exponent (from INT_MIN to INT_MAX) (default 0)

None
skip_cmp int | None | Literal['sad', 'sse', 'satd', 'dct', 'psnr', 'bit', 'rd', 'zero', 'vsad', 'vsse', 'nsse', 'dct264', 'dctmax', 'chroma', 'msad']

Frame skip compare function (from INT_MIN to INT_MAX) (default dctmax)

None
sc_threshold int | None

Scene change threshold (from INT_MIN to INT_MAX) (default 0)

None
noise_reduction int | None

Noise reduction (from INT_MIN to INT_MAX) (default 0)

None
ps int | None

RTP payload size in bytes (from INT_MIN to INT_MAX) (default 0)

None
motion_est int | None | Literal['zero', 'epzs', 'xone']

motion estimation algorithm (from 0 to 2) (default epzs)

None
mepc int | None

Motion estimation bitrate penalty compensation (1.0 = 256) (from INT_MIN to INT_MAX) (default 256)

None
mepre int | None

pre motion estimation (from INT_MIN to INT_MAX) (default 0)

None
intra_penalty int | None

Penalty for intra blocks in block decision (from 0 to 1.07374e+09) (default 0)

None

Returns:

Type Description
FFMpegEncoderOption

the set codec options

srt

SubRip subtitle (codec subrip).

Returns:

Type Description
FFMpegEncoderOption

the set codec options

ssa

ASS (Advanced SubStation Alpha) subtitle (codec ass).

Returns:

Type Description
FFMpegEncoderOption

the set codec options

subrip

subrip() -> FFMpegEncoderOption

SubRip subtitle.

Returns:

Type Description
FFMpegEncoderOption

the set codec options

sunrast

sunrast(rle: int | None = None) -> FFMpegEncoderOption

Sun Rasterfile image.

Parameters:

Name Type Description Default
rle int | None

Use run-length compression (from 0 to 1) (default 1)

None

Returns:

Type Description
FFMpegEncoderOption

the set codec options

svq1

svq1(
    motion_est: (
        int | None | Literal["zero", "epzs", "xone"]
    ) = None,
) -> FFMpegEncoderOption

Sorenson Vector Quantizer 1 / Sorenson Video 1 / SVQ1.

Parameters:

Name Type Description Default
motion_est int | None | Literal['zero', 'epzs', 'xone']

Motion estimation algorithm (from 0 to 2) (default epzs)

None

Returns:

Type Description
FFMpegEncoderOption

the set codec options

targa

targa(rle: int | None = None) -> FFMpegEncoderOption

Truevision Targa image.

Parameters:

Name Type Description Default
rle int | None

Use run-length compression (from 0 to 1) (default 1)

None

Returns:

Type Description
FFMpegEncoderOption

the set codec options

text

Raw text subtitle.

Returns:

Type Description
FFMpegEncoderOption

the set codec options

tiff

tiff(
    dpi: int | None = None,
    compression_algo: (
        int
        | None
        | Literal["packbits", "raw", "lzw", "deflate"]
    ) = None,
) -> FFMpegEncoderOption

TIFF image.

Parameters:

Name Type Description Default
dpi int | None

set the image resolution (in dpi) (from 1 to 65536) (default 72)

None
compression_algo int | None | Literal['packbits', 'raw', 'lzw', 'deflate']

(from 1 to 32946) (default packbits)

None

Returns:

Type Description
FFMpegEncoderOption

the set codec options

truehd

truehd(
    max_interval: int | None = None,
    lpc_coeff_precision: int | None = None,
    lpc_type: (
        int | None | Literal["levinson", "cholesky"]
    ) = None,
    lpc_passes: int | None = None,
    codebook_search: int | None = None,
    prediction_order: (
        int | None | Literal["estimation", "search"]
    ) = None,
    rematrix_precision: int | None = None,
) -> FFMpegEncoderOption

TrueHD.

Parameters:

Name Type Description Default
max_interval int | None

Max number of frames between each new header (from 8 to 128) (default 16)

None
lpc_coeff_precision int | None

LPC coefficient precision (from 0 to 15) (default 15)

None
lpc_type int | None | Literal['levinson', 'cholesky']

LPC algorithm (from 2 to 3) (default levinson)

None
lpc_passes int | None

Number of passes to use for Cholesky factorization during LPC analysis (from 1 to INT_MAX) (default 2)

None
codebook_search int | None

Max number of codebook searches (from 1 to 100) (default 3)

None
prediction_order int | None | Literal['estimation', 'search']

Search method for selecting prediction order (from 0 to 4) (default estimation)

None
rematrix_precision int | None

Rematrix coefficient precision (from 0 to 14) (default 1)

None

Returns:

Type Description
FFMpegEncoderOption

the set codec options

tta

TTA (True Audio).

Returns:

Type Description
FFMpegEncoderOption

the set codec options

ttml

TTML subtitle.

Returns:

Type Description
FFMpegEncoderOption

the set codec options

utvideo

utvideo(
    pred: (
        int
        | None
        | Literal["none", "left", "gradient", "median"]
    ) = None,
) -> FFMpegEncoderOption

Ut Video.

Parameters:

Name Type Description Default
pred int | None | Literal['none', 'left', 'gradient', 'median']

Prediction method (from 0 to 3) (default left)

None

Returns:

Type Description
FFMpegEncoderOption

the set codec options

v210

Uncompressed 4:2:2 10-bit.

Returns:

Type Description
FFMpegEncoderOption

the set codec options

v308

Uncompressed packed 4:4:4.

Returns:

Type Description
FFMpegEncoderOption

the set codec options

v408

Uncompressed packed QT 4:4:4:4.

Returns:

Type Description
FFMpegEncoderOption

the set codec options

v410

Uncompressed 4:4:4 10-bit.

Returns:

Type Description
FFMpegEncoderOption

the set codec options

vbn

vbn(
    format: (
        int | None | Literal["raw", "dxt1", "dxt5"]
    ) = None,
) -> FFMpegEncoderOption

Vizrt Binary Image.

Parameters:

Name Type Description Default
format int | None | Literal['raw', 'dxt1', 'dxt5']

Texture format (from 0 to 3) (default dxt5)

None

Returns:

Type Description
FFMpegEncoderOption

the set codec options

vc2

vc2(
    tolerance: float | None = None,
    slice_width: int | None = None,
    slice_height: int | None = None,
    wavelet_depth: int | None = None,
    wavelet_type: (
        int
        | None
        | Literal["9_7", "5_3", "haar", "haar_noshift"]
    ) = None,
    qm: (
        int | None | Literal["default", "color", "flat"]
    ) = None,
) -> FFMpegEncoderOption

SMPTE VC-2 (codec dirac).

Parameters:

Name Type Description Default
tolerance float | None

Max undershoot in percent (from 0 to 45) (default 5)

None
slice_width int | None

Slice width (from 32 to 1024) (default 32)

None
slice_height int | None

Slice height (from 8 to 1024) (default 16)

None
wavelet_depth int | None

Transform depth (from 1 to 5) (default 4)

None
wavelet_type int | None | Literal['9_7', '5_3', 'haar', 'haar_noshift']

Transform type (from 0 to 7) (default 9_7)

None
qm int | None | Literal['default', 'color', 'flat']

Custom quantization matrix (from 0 to 3) (default default)

None

Returns:

Type Description
FFMpegEncoderOption

the set codec options

vnull

Null video.

Returns:

Type Description
FFMpegEncoderOption

the set codec options

vorbis

vorbis() -> FFMpegEncoderOption

Vorbis.

Returns:

Type Description
FFMpegEncoderOption

the set codec options

vp8_v4l2m2m

vp8_v4l2m2m(
    num_output_buffers: int | None = None,
    num_capture_buffers: int | None = None,
) -> FFMpegEncoderOption

V4L2 mem2mem VP8 encoder wrapper (codec vp8).

Parameters:

Name Type Description Default
num_output_buffers int | None

Number of buffers in the output context (from 2 to INT_MAX) (default 16)

None
num_capture_buffers int | None

Number of buffers in the capture context (from 4 to INT_MAX) (default 4)

None

Returns:

Type Description
FFMpegEncoderOption

the set codec options

vp8_vaapi

vp8_vaapi(
    low_power: bool | None = None,
    idr_interval: int | None = None,
    b_depth: int | None = None,
    async_depth: int | None = None,
    max_frame_size: int | None = None,
    rc_mode: (
        int
        | None
        | Literal[
            "auto",
            "CQP",
            "CBR",
            "VBR",
            "ICQ",
            "QVBR",
            "AVBR",
        ]
    ) = None,
    loop_filter_level: int | None = None,
    loop_filter_sharpness: int | None = None,
) -> FFMpegEncoderOption

VP8 (VAAPI) (codec vp8).

Parameters:

Name Type Description Default
low_power bool | None

Use low-power encoding mode (only available on some platforms; may not support all encoding features) (default false)

None
idr_interval int | None

Distance (in I-frames) between IDR frames (from 0 to INT_MAX) (default 0)

None
b_depth int | None

Maximum B-frame reference depth (from 1 to INT_MAX) (default 1)

None
async_depth int | None

Maximum processing parallelism. Increase this to improve single channel performance. This option doesn't work if driver doesn't implement vaSyncBuffer function. (from 1 to 64) (default 2)

None
max_frame_size int | None

Maximum frame size (in bytes) (from 0 to INT_MAX) (default 0)

None
rc_mode int | None | Literal['auto', 'CQP', 'CBR', 'VBR', 'ICQ', 'QVBR', 'AVBR']

Set rate control mode (from 0 to 6) (default auto)

None
loop_filter_level int | None

Loop filter level (from 0 to 63) (default 16)

None
loop_filter_sharpness int | None

Loop filter sharpness (from 0 to 15) (default 4)

None

Returns:

Type Description
FFMpegEncoderOption

the set codec options

vp9_vaapi

vp9_vaapi(
    low_power: bool | None = None,
    idr_interval: int | None = None,
    b_depth: int | None = None,
    async_depth: int | None = None,
    max_frame_size: int | None = None,
    rc_mode: (
        int
        | None
        | Literal[
            "auto",
            "CQP",
            "CBR",
            "VBR",
            "ICQ",
            "QVBR",
            "AVBR",
        ]
    ) = None,
    loop_filter_level: int | None = None,
    loop_filter_sharpness: int | None = None,
) -> FFMpegEncoderOption

VP9 (VAAPI) (codec vp9).

Parameters:

Name Type Description Default
low_power bool | None

Use low-power encoding mode (only available on some platforms; may not support all encoding features) (default false)

None
idr_interval int | None

Distance (in I-frames) between IDR frames (from 0 to INT_MAX) (default 0)

None
b_depth int | None

Maximum B-frame reference depth (from 1 to INT_MAX) (default 1)

None
async_depth int | None

Maximum processing parallelism. Increase this to improve single channel performance. This option doesn't work if driver doesn't implement vaSyncBuffer function. (from 1 to 64) (default 2)

None
max_frame_size int | None

Maximum frame size (in bytes) (from 0 to INT_MAX) (default 0)

None
rc_mode int | None | Literal['auto', 'CQP', 'CBR', 'VBR', 'ICQ', 'QVBR', 'AVBR']

Set rate control mode (from 0 to 6) (default auto)

None
loop_filter_level int | None

Loop filter level (from 0 to 63) (default 16)

None
loop_filter_sharpness int | None

Loop filter sharpness (from 0 to 15) (default 4)

None

Returns:

Type Description
FFMpegEncoderOption

the set codec options

wavpack

wavpack(
    joint_stereo: bool | None = None,
    optimize_mono: bool | None = None,
) -> FFMpegEncoderOption

WavPack.

Parameters:

Name Type Description Default
joint_stereo bool | None

(default auto)

None
optimize_mono bool | None

(default false)

None

Returns:

Type Description
FFMpegEncoderOption

the set codec options

wbmp

WBMP (Wireless Application Protocol Bitmap) image.

Returns:

Type Description
FFMpegEncoderOption

the set codec options

webvtt

webvtt() -> FFMpegEncoderOption

WebVTT subtitle.

Returns:

Type Description
FFMpegEncoderOption

the set codec options

wmav1

Windows Media Audio 1.

Returns:

Type Description
FFMpegEncoderOption

the set codec options

wmav2

Windows Media Audio 2.

Returns:

Type Description
FFMpegEncoderOption

the set codec options

wmv1

wmv1(
    mpv_flags: str | None = None,
    luma_elim_threshold: int | None = None,
    chroma_elim_threshold: int | None = None,
    quantizer_noise_shaping: int | None = None,
    error_rate: int | None = None,
    qsquish: float | None = None,
    rc_qmod_amp: float | None = None,
    rc_qmod_freq: int | None = None,
    rc_eq: str | None = None,
    rc_init_cplx: float | None = None,
    rc_buf_aggressivity: float | None = None,
    border_mask: float | None = None,
    lmin: int | None = None,
    lmax: int | None = None,
    skip_threshold: int | None = None,
    skip_factor: int | None = None,
    skip_exp: int | None = None,
    skip_cmp: (
        int
        | None
        | Literal[
            "sad",
            "sse",
            "satd",
            "dct",
            "psnr",
            "bit",
            "rd",
            "zero",
            "vsad",
            "vsse",
            "nsse",
            "dct264",
            "dctmax",
            "chroma",
            "msad",
        ]
    ) = None,
    sc_threshold: int | None = None,
    noise_reduction: int | None = None,
    ps: int | None = None,
    motion_est: (
        int | None | Literal["zero", "epzs", "xone"]
    ) = None,
    mepc: int | None = None,
    mepre: int | None = None,
    intra_penalty: int | None = None,
) -> FFMpegEncoderOption

Windows Media Video 7.

Parameters:

Name Type Description Default
mpv_flags str | None

Flags common for all mpegvideo-based encoders. (default 0)

None
luma_elim_threshold int | None

single coefficient elimination threshold for luminance (negative values also consider dc coefficient) (from INT_MIN to INT_MAX) (default 0)

None
chroma_elim_threshold int | None

single coefficient elimination threshold for chrominance (negative values also consider dc coefficient) (from INT_MIN to INT_MAX) (default 0)

None
quantizer_noise_shaping int | None

(from 0 to INT_MAX) (default 0)

None
error_rate int | None

Simulate errors in the bitstream to test error concealment. (from 0 to INT_MAX) (default 0)

None
qsquish float | None

how to keep quantizer between qmin and qmax (0 = clip, 1 = use differentiable function) (from 0 to 99) (default 0)

None
rc_qmod_amp float | None

experimental quantizer modulation (from -FLT_MAX to FLT_MAX) (default 0)

None
rc_qmod_freq int | None

experimental quantizer modulation (from INT_MIN to INT_MAX) (default 0)

None
rc_eq str | None

Set rate control equation. When computing the expression, besides the standard functions defined in the section 'Expression Evaluation', the following functions are available: bits2qp(bits), qp2bits(qp). Also the following constants are available: iTex pTex tex mv fCode iCount mcVar var isI isP isB avgQP qComp avgIITex avgPITex avgPPTex avgBPTex avgTex.

None
rc_init_cplx float | None

initial complexity for 1-pass encoding (from -FLT_MAX to FLT_MAX) (default 0)

None
rc_buf_aggressivity float | None

currently useless (from -FLT_MAX to FLT_MAX) (default 1)

None
border_mask float | None

increase the quantizer for macroblocks close to borders (from -FLT_MAX to FLT_MAX) (default 0)

None
lmin int | None

minimum Lagrange factor (VBR) (from 0 to INT_MAX) (default 236)

None
lmax int | None

maximum Lagrange factor (VBR) (from 0 to INT_MAX) (default 3658)

None
skip_threshold int | None

Frame skip threshold (from INT_MIN to INT_MAX) (default 0)

None
skip_factor int | None

Frame skip factor (from INT_MIN to INT_MAX) (default 0)

None
skip_exp int | None

Frame skip exponent (from INT_MIN to INT_MAX) (default 0)

None
skip_cmp int | None | Literal['sad', 'sse', 'satd', 'dct', 'psnr', 'bit', 'rd', 'zero', 'vsad', 'vsse', 'nsse', 'dct264', 'dctmax', 'chroma', 'msad']

Frame skip compare function (from INT_MIN to INT_MAX) (default dctmax)

None
sc_threshold int | None

Scene change threshold (from INT_MIN to INT_MAX) (default 0)

None
noise_reduction int | None

Noise reduction (from INT_MIN to INT_MAX) (default 0)

None
ps int | None

RTP payload size in bytes (from INT_MIN to INT_MAX) (default 0)

None
motion_est int | None | Literal['zero', 'epzs', 'xone']

motion estimation algorithm (from 0 to 2) (default epzs)

None
mepc int | None

Motion estimation bitrate penalty compensation (1.0 = 256) (from INT_MIN to INT_MAX) (default 256)

None
mepre int | None

pre motion estimation (from INT_MIN to INT_MAX) (default 0)

None
intra_penalty int | None

Penalty for intra blocks in block decision (from 0 to 1.07374e+09) (default 0)

None

Returns:

Type Description
FFMpegEncoderOption

the set codec options

wmv2

wmv2(
    mpv_flags: str | None = None,
    luma_elim_threshold: int | None = None,
    chroma_elim_threshold: int | None = None,
    quantizer_noise_shaping: int | None = None,
    error_rate: int | None = None,
    qsquish: float | None = None,
    rc_qmod_amp: float | None = None,
    rc_qmod_freq: int | None = None,
    rc_eq: str | None = None,
    rc_init_cplx: float | None = None,
    rc_buf_aggressivity: float | None = None,
    border_mask: float | None = None,
    lmin: int | None = None,
    lmax: int | None = None,
    skip_threshold: int | None = None,
    skip_factor: int | None = None,
    skip_exp: int | None = None,
    skip_cmp: (
        int
        | None
        | Literal[
            "sad",
            "sse",
            "satd",
            "dct",
            "psnr",
            "bit",
            "rd",
            "zero",
            "vsad",
            "vsse",
            "nsse",
            "dct264",
            "dctmax",
            "chroma",
            "msad",
        ]
    ) = None,
    sc_threshold: int | None = None,
    noise_reduction: int | None = None,
    ps: int | None = None,
    motion_est: (
        int | None | Literal["zero", "epzs", "xone"]
    ) = None,
    mepc: int | None = None,
    mepre: int | None = None,
    intra_penalty: int | None = None,
) -> FFMpegEncoderOption

Windows Media Video 8.

Parameters:

Name Type Description Default
mpv_flags str | None

Flags common for all mpegvideo-based encoders. (default 0)

None
luma_elim_threshold int | None

single coefficient elimination threshold for luminance (negative values also consider dc coefficient) (from INT_MIN to INT_MAX) (default 0)

None
chroma_elim_threshold int | None

single coefficient elimination threshold for chrominance (negative values also consider dc coefficient) (from INT_MIN to INT_MAX) (default 0)

None
quantizer_noise_shaping int | None

(from 0 to INT_MAX) (default 0)

None
error_rate int | None

Simulate errors in the bitstream to test error concealment. (from 0 to INT_MAX) (default 0)

None
qsquish float | None

how to keep quantizer between qmin and qmax (0 = clip, 1 = use differentiable function) (from 0 to 99) (default 0)

None
rc_qmod_amp float | None

experimental quantizer modulation (from -FLT_MAX to FLT_MAX) (default 0)

None
rc_qmod_freq int | None

experimental quantizer modulation (from INT_MIN to INT_MAX) (default 0)

None
rc_eq str | None

Set rate control equation. When computing the expression, besides the standard functions defined in the section 'Expression Evaluation', the following functions are available: bits2qp(bits), qp2bits(qp). Also the following constants are available: iTex pTex tex mv fCode iCount mcVar var isI isP isB avgQP qComp avgIITex avgPITex avgPPTex avgBPTex avgTex.

None
rc_init_cplx float | None

initial complexity for 1-pass encoding (from -FLT_MAX to FLT_MAX) (default 0)

None
rc_buf_aggressivity float | None

currently useless (from -FLT_MAX to FLT_MAX) (default 1)

None
border_mask float | None

increase the quantizer for macroblocks close to borders (from -FLT_MAX to FLT_MAX) (default 0)

None
lmin int | None

minimum Lagrange factor (VBR) (from 0 to INT_MAX) (default 236)

None
lmax int | None

maximum Lagrange factor (VBR) (from 0 to INT_MAX) (default 3658)

None
skip_threshold int | None

Frame skip threshold (from INT_MIN to INT_MAX) (default 0)

None
skip_factor int | None

Frame skip factor (from INT_MIN to INT_MAX) (default 0)

None
skip_exp int | None

Frame skip exponent (from INT_MIN to INT_MAX) (default 0)

None
skip_cmp int | None | Literal['sad', 'sse', 'satd', 'dct', 'psnr', 'bit', 'rd', 'zero', 'vsad', 'vsse', 'nsse', 'dct264', 'dctmax', 'chroma', 'msad']

Frame skip compare function (from INT_MIN to INT_MAX) (default dctmax)

None
sc_threshold int | None

Scene change threshold (from INT_MIN to INT_MAX) (default 0)

None
noise_reduction int | None

Noise reduction (from INT_MIN to INT_MAX) (default 0)

None
ps int | None

RTP payload size in bytes (from INT_MIN to INT_MAX) (default 0)

None
motion_est int | None | Literal['zero', 'epzs', 'xone']

motion estimation algorithm (from 0 to 2) (default epzs)

None
mepc int | None

Motion estimation bitrate penalty compensation (1.0 = 256) (from INT_MIN to INT_MAX) (default 256)

None
mepre int | None

pre motion estimation (from INT_MIN to INT_MAX) (default 0)

None
intra_penalty int | None

Penalty for intra blocks in block decision (from 0 to 1.07374e+09) (default 0)

None

Returns:

Type Description
FFMpegEncoderOption

the set codec options

wrapped_avframe

wrapped_avframe() -> FFMpegEncoderOption

AVFrame to AVPacket passthrough.

Returns:

Type Description
FFMpegEncoderOption

the set codec options

xbm

XBM (X BitMap) image.

Returns:

Type Description
FFMpegEncoderOption

the set codec options

xface

X-face image.

Returns:

Type Description
FFMpegEncoderOption

the set codec options

xsub

DivX subtitles (XSUB).

Returns:

Type Description
FFMpegEncoderOption

the set codec options

xwd

XWD (X Window Dump) image.

Returns:

Type Description
FFMpegEncoderOption

the set codec options

y41p

Uncompressed YUV 4:1:1 12-bit.

Returns:

Type Description
FFMpegEncoderOption

the set codec options

yuv4

Uncompressed packed 4:2:0.

Returns:

Type Description
FFMpegEncoderOption

the set codec options

zlib

LCL (LossLess Codec Library) ZLIB.

Returns:

Type Description
FFMpegEncoderOption

the set codec options

zmbv

Zip Motion Blocks Video.

Returns:

Type Description
FFMpegEncoderOption

the set codec options