# avenc_h261

libav h261 encoder

## Hierarchy

    GObject
        ╰──GInitiallyUnowned
            ╰──GstObject
                ╰──GstElement
                    ╰──GstVideoEncoder
                        ╰──avenc_h261

## Implemented interfaces

    GstPreset

## Factory details

Authors: – Wim Taymans , Ronald Bultje

Classification: – `Codec/Encoder/Video`

Rank – secondary

Plugin – libav

Package – GStreamer FFMPEG Plug-ins

## Pad Templates

### `sink`

    video/x-raw:
              width: 352
             height: 288
          framerate: [ 0/1, 2147483647/1 ]
             format: I420
    video/x-raw:
              width: 176
             height: 144
          framerate: [ 0/1, 2147483647/1 ]
             format: I420

Presence – always

Direction – sink

Object type – GstPad

### `src`

    video/x-h261:
              width: 352
             height: 288
          framerate: [ 0/1, 2147483647/1 ]
    video/x-h261:
              width: 176
             height: 144
          framerate: [ 0/1, 2147483647/1 ]

Presence – always

Direction – src

Object type – GstPad

## Properties

### a53cc

    “a53cc” gboolean

Use A53 Closed Captions (if available) (Private codec option)

Flags : Read / Write

Default value : true

### b-qfactor

    “b-qfactor” gfloat

QP factor between P- and B-frames (Generic codec option, might have no effect)

Flags : Read / Write

Default value : 1.25

### b-qoffset

    “b-qoffset” gfloat

QP offset between P- and B-frames (Generic codec option, might have no effect)

Flags : Read / Write

Default value : 1.25

### b-sensitivity

    “b-sensitivity” gint

Adjust sensitivity of b_frame_strategy 1 (Private codec option)

Flags : Read / Write

Default value : 40

### b-strategy

    “b-strategy” gint

Strategy to choose between I/P/B-frames (Private codec option)

Flags : Read / Write

Default value : 0

### bidir-refine

    “bidir-refine” gint

refine the two motion vectors used in bidirectional macroblocks (Generic codec option, might have no effect)

Flags : Read / Write

Default value : 1

### bitrate

    “bitrate” gint

set bitrate (in bits/s) (Generic codec option, might have no effect)

Flags : Read / Write

Default value : 200000

### bitrate-tolerance

    “bitrate-tolerance” gint

Set video bitrate tolerance (in bits/s). In 1-pass mode, bitrate tolerance specifies how far ratecontrol is willing to deviate from the target average bitrate value. This is not related to minimum/maximum bitrate. Lowering tolerance too much has an adverse effect on quality. (Generic codec option, might have no effect)

Flags : Read / Write

Default value : 4000000

### border-mask

    “border-mask” gfloat

increase the quantizer for macroblocks close to borders (Private codec option)

Flags : Read / Write

Default value : 0

### brd-scale

    “brd-scale” gint

Downscale frames for dynamic B-frame decision (Private codec option)

Flags : Read / Write

Default value : 0

### bufsize

    “bufsize” gint

set ratecontrol buffer size (in bits) (Generic codec option, might have no effect)

Flags : Read / Write

Default value : 0

### chroma-elim-threshold

    “chroma-elim-threshold” gint

single coefficient elimination threshold for chrominance (negative values also consider dc coefficient) (Private codec option)

Flags : Read / Write

Default value : 0

### chroma-sample-location

    “chroma-sample-location” avcodeccontext-chroma-sample-location-type *

chroma sample location (Generic codec option, might have no effect)

Flags : Read / Write

Default value : unknown (0)

### chromaoffset

    “chromaoffset” gint

chroma QP offset from luma (Generic codec option, might have no effect)

Flags : Read / Write

Default value : 0

### cmp

    “cmp” avcodeccontext-cmp-func *

full-pel ME compare function (Generic codec option, might have no effect)

Flags : Read / Write

Default value : sad (0)

### coder

    “coder” avcodeccontext-coder *

(null) (Generic codec option, might have no effect)

Flags : Read / Write

Default value : vlc (0)

### compression-level

    “compression-level” gint

(null) (Generic codec option, might have no effect)

Flags : Read / Write

Default value : -1

### context

    “context” gint

context model (Generic codec option, might have no effect)

Flags : Read / Write

Default value : 0

### dark-mask

    “dark-mask” gfloat

compresses dark areas stronger than medium ones (Generic codec option, might have no effect)

Flags : Read / Write

Default value : 0

### dc

    “dc” gint

intra_dc_precision (Generic codec option, might have no effect)

Flags : Read / Write

Default value : 0

### dct

    “dct” avcodeccontext-dct *

DCT algorithm (Generic codec option, might have no effect)

Flags : Read / Write

Default value : auto (0)

### debug

    “debug” avcodeccontext-debug *

print specific debug info (Generic codec option, might have no effect)

Flags : Read / Write

Default value : (none)

### dia-size

    “dia-size” gint

diamond type & size for motion estimation (Generic codec option, might have no effect)

Flags : Read / Write

Default value : 0

### dump-separator

    “dump-separator” gchararray

set information dump field separator (Generic codec option, might have no effect)

Flags : Read / Write

Default value : NULL

### error-rate

    “error-rate” gint

Simulate errors in the bitstream to test error concealment. (Private codec option)

Flags : Read / Write

Default value : 0

### export-side-data

    “export-side-data” avcodeccontext-export-side-data *

Export metadata as side data (Generic codec option, might have no effect)

Flags : Read / Write

Default value : (none)

### field-order

    “field-order” avcodeccontext-field-order *

Field order (Generic codec option, might have no effect)

Flags : Read / Write

Default value : unknown (0)

### flags

    “flags” avcodeccontext-flags *

(null) (Generic codec option, might have no effect)

Flags : Read / Write

Default value : (none)

### flags2

    “flags2” avcodeccontext-flags2 *

(null) (Generic codec option, might have no effect)

Flags : Read / Write

Default value : (none)

### force-duplicated-matrix

    “force-duplicated-matrix” gboolean

Always write luma and chroma matrix for mjpeg, useful for rtp streaming. (Private codec option)

Flags : Read / Write

Default value : false

### global-quality

    “global-quality” gint

(null) (Generic codec option, might have no effect)

Flags : Read / Write

Default value : 0

### gop-size

    “gop-size” gint

set the group of picture (GOP) size (Generic codec option, might have no effect)

Flags : Read / Write

Default value : 12

### i-qfactor

    “i-qfactor” gfloat

QP factor between P- and I-frames (Generic codec option, might have no effect)

Flags : Read / Write

Default value : -0.8

### i-qoffset

    “i-qoffset” gfloat

QP offset between P- and I-frames (Generic codec option, might have no effect)

Flags : Read / Write

Default value : 0

### ibias

    “ibias” gint

intra quant bias (Private codec option)

Flags : Read / Write

Default value : 999999

### idct

    “idct” avcodeccontext-idct *

select IDCT implementation (Generic codec option, might have no effect)

Flags : Read / Write

Default value : auto (0)

### ildctcmp

    “ildctcmp” avcodeccontext-cmp-func *

interlaced DCT compare function (Generic codec option, might have no effect)

Flags : Read / Write

Default value : vsad (8)

### intra-penalty

    “intra-penalty” gint

Penalty for intra blocks in block decision (Private codec option)

Flags : Read / Write

Default value : 0

### keyint-min

    “keyint-min” gint

minimum interval between IDR-frames (Generic codec option, might have no effect)

Flags : Read / Write

Default value : 25

### last-pred

    “last-pred” gint

amount of motion predictors from the previous frame (Generic codec option, might have no effect)

Flags : Read / Write

Default value : 0

### lmax

    “lmax” gint

maximum Lagrange factor (VBR) (Private codec option)

Flags : Read / Write

Default value : 3658

### lmin

    “lmin” gint

minimum Lagrange factor (VBR) (Private codec option)

Flags : Read / Write

Default value : 236

### luma-elim-threshold

    “luma-elim-threshold” gint

single coefficient elimination threshold for luminance (negative values also consider dc coefficient) (Private codec option)

Flags : Read / Write

Default value : 0

### lumi-mask

    “lumi-mask” gfloat

compresses bright areas stronger than medium ones (Generic codec option, might have no effect)

Flags : Read / Write

Default value : 0

### max-bframes

    “max-bframes” gint

set maximum number of B-frames between non-B-frames (Generic codec option, might have no effect)

Flags : Read / Write

Default value : 0

### max-pixels

    “max-pixels” gint64

Maximum number of pixels (Generic codec option, might have no effect)

Flags : Read / Write

Default value : 2147483647

### maxrate

    “maxrate” gint64

maximum bitrate (in bits/s). Used for VBV together with bufsize. (Generic codec option, might have no effect)

Flags : Read / Write

Default value : 0

### mbcmp

    “mbcmp” avcodeccontext-cmp-func *

macroblock compare function (Generic codec option, might have no effect)

Flags : Read / Write

Default value : sad (0)

### mbd

    “mbd” avcodeccontext-mbd *

macroblock decision algorithm (high quality mode) (Generic codec option, might have no effect)

Flags : Read / Write

Default value : simple (0)

### mblmax

    “mblmax” gint

maximum macroblock Lagrange factor (VBR) (Generic codec option, might have no effect)

Flags : Read / Write

Default value : 3658

### mblmin

    “mblmin” gint

minimum macroblock Lagrange factor (VBR) (Generic codec option, might have no effect)

Flags : Read / Write

Default value : 236

### me-range

    “me-range” gint

limit motion vectors range (1023 for DivX player) (Generic codec option, might have no effect)

Flags : Read / Write

Default value : 0

### mepc

    “mepc” gint

Motion estimation bitrate penalty compensation (1.0 = 256) (Private codec option)

Flags : Read / Write

Default value : 256

### mepre

    “mepre” gint

pre motion estimation (Private codec option)

Flags : Read / Write

Default value : 0

### minrate

    “minrate” gint64

minimum bitrate (in bits/s). Most useful in setting up a CBR encode. It is of little use otherwise. (Generic codec option, might have no effect)

Flags : Read / Write

Default value : 0

### motion-est

    “motion-est” H261-encoder-motion-est *

motion estimation algorithm (Private codec option)

Flags : Read / Write

Default value : epzs (1)

### mpeg-quant

    “mpeg-quant” gint

Use MPEG quantizers instead of H.263 (Private codec option)

Flags : Read / Write

Default value : 0

### mpv-flags

    “mpv-flags” H261-encoder-mpv-flags *

Flags common for all mpegvideo-based encoders. (Private codec option)

Flags : Read / Write

Default value : (none)

### multipass-cache-file

    “multipass-cache-file” gchararray

Filename for multipass cache file

Flags : Read / Write / Construct

Default value : stats.log

### mv0-threshold

    “mv0-threshold” gint

(null) (Generic codec option, might have no effect)

Flags : Read / Write

Default value : 256

### noise-reduction

    “noise-reduction” gint

Noise reduction (Private codec option)

Flags : Read / Write

Default value : 0

### nr

    “nr” gint

noise reduction (Generic codec option, might have no effect)

Flags : Read / Write

Default value : 0

### nssew

    “nssew” gint

nsse weight (Generic codec option, might have no effect)

Flags : Read / Write

Default value : 8

### p-mask

    “p-mask” gfloat

inter masking (Generic codec option, might have no effect)

Flags : Read / Write

Default value : 0

### pass

    “pass” GstLibAVEncPass *

Encoding pass/type

Flags : Read / Write / Construct

Default value : cbr (0)

### pbias

    “pbias” gint

inter quant bias (Private codec option)

Flags : Read / Write

Default value : 999999

### pre-dia-size

    “pre-dia-size” gint

diamond type & size for motion estimation pre-pass (Generic codec option, might have no effect)

Flags : Read / Write

Default value : 0

### precmp

    “precmp” avcodeccontext-cmp-func *

pre motion estimation compare function (Generic codec option, might have no effect)

Flags : Read / Write

Default value : sad (0)

### pred

    “pred” avcodeccontext-pred *

prediction method (Generic codec option, might have no effect)

Flags : Read / Write

Default value : left (0)

### preme

    “preme” gint

pre motion estimation (Generic codec option, might have no effect)

Flags : Read / Write

Default value : 0

### ps

    “ps” gint

RTP payload size in bytes (Private codec option)

Flags : Read / Write

Default value : 0

### qblur

    “qblur” gfloat

video quantizer scale blur (VBR) (Generic codec option, might have no effect)

Flags : Read / Write

Default value : 0.5

### qcomp

    “qcomp” gfloat

video quantizer scale compression (VBR). Constant of ratecontrol equation. Recommended range for default rc_eq: 0.0-1.0 (Generic codec option, might have no effect)

Flags : Read / Write

Default value : 0.5

### qdiff

    “qdiff” gint

maximum difference between the quantizer scales (VBR) (Generic codec option, might have no effect)

Flags : Read / Write

Default value : 3

### qmax

    “qmax” gint

maximum video quantizer scale (VBR) (Generic codec option, might have no effect)

Flags : Read / Write

Default value : 31

### qmin

    “qmin” gint

minimum video quantizer scale (VBR) (Generic codec option, might have no effect)

Flags : Read / Write

Default value : 2

### qsquish

    “qsquish” gfloat

how to keep quantizer between qmin and qmax (0 = clip, 1 = use differentiable function) (Private codec option)

Flags : Read / Write

Default value : 0

### quantizer

    “quantizer” gfloat

Constant Quantizer

Flags : Read / Write / Construct

Default value : 0.01

### quantizer-noise-shaping

    “quantizer-noise-shaping” gint

(null) (Private codec option)

Flags : Read / Write

Default value : 0

### rc-buf-aggressivity

    “rc-buf-aggressivity” gfloat

currently useless (Private codec option)

Flags : Read / Write

Default value : 1

### rc-eq

    “rc-eq” gchararray

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. (Private codec option)

Flags : Read / Write

Default value : NULL

### rc-init-cplx

    “rc-init-cplx” gfloat

initial complexity for 1-pass encoding (Private codec option)

Flags : Read / Write

Default value : 0

### rc-init-occupancy

    “rc-init-occupancy” gint

number of bits which should be loaded into the rc buffer before decoding starts (Generic codec option, might have no effect)

Flags : Read / Write

Default value : 0

### rc-max-vbv-use

    “rc-max-vbv-use” gfloat

(null) (Generic codec option, might have no effect)

Flags : Read / Write

Default value : 0

### rc-min-vbv-use

    “rc-min-vbv-use” gfloat

(null) (Generic codec option, might have no effect)

Flags : Read / Write

Default value : 3

### rc-qmod-amp

    “rc-qmod-amp” gfloat

experimental quantizer modulation (Private codec option)

Flags : Read / Write

Default value : 0

### rc-qmod-freq

    “rc-qmod-freq” gint

experimental quantizer modulation (Private codec option)

Flags : Read / Write

Default value : 0

### rc-strategy

    “rc-strategy” H261-encoder-rc-strategy *

ratecontrol method (Private codec option)

Flags : Read / Write

Default value : ffmpeg (0)

### refs

    “refs” gint

reference frames to consider for motion compensation (Generic codec option, might have no effect)

Flags : Read / Write

Default value : 1

### sc-threshold

    “sc-threshold” gint

Scene change threshold (Private codec option)

Flags : Read / Write

Default value : 0

### scplx-mask

    “scplx-mask” gfloat

spatial complexity masking (Generic codec option, might have no effect)

Flags : Read / Write

Default value : 0

### side-data-only-packets

    “side-data-only-packets” gboolean

(null) (Generic codec option, might have no effect)

Flags : Read / Write

Default value : true

### skip-cmp

    “skip-cmp” H261-encoder-cmp-func *

Frame skip compare function (Private codec option)

Flags : Read / Write

Default value : dctmax (13)

### skip-exp

    “skip-exp” gint

Frame skip exponent (Private codec option)

Flags : Read / Write

Default value : 0

### skip-factor

    “skip-factor” gint

Frame skip factor (Private codec option)

Flags : Read / Write

Default value : 0

### skip-threshold

    “skip-threshold” gint

Frame skip threshold (Private codec option)

Flags : Read / Write

Default value : 0

### skipcmp

    “skipcmp” avcodeccontext-cmp-func *

frame skip compare function (Generic codec option, might have no effect)

Flags : Read / Write

Default value : dctmax (13)

### slices

    “slices” gint

set the number of slices, used in parallelized encoding (Generic codec option, might have no effect)

Flags : Read / Write

Default value : 0

### strict

    “strict” avcodeccontext-strict *

how strictly to follow the standards (Generic codec option, might have no effect)

Flags : Read / Write

Default value : normal (0)

### subcmp

    “subcmp” avcodeccontext-cmp-func *

sub-pel ME compare function (Generic codec option, might have no effect)

Flags : Read / Write

Default value : sad (0)

### subq

    “subq” gint

sub-pel motion estimation quality (Generic codec option, might have no effect)

Flags : Read / Write

Default value : 8

### tcplx-mask

    “tcplx-mask” gfloat

temporal complexity masking (Generic codec option, might have no effect)

Flags : Read / Write

Default value : 0

### thread-type

    “thread-type” avcodeccontext-thread-type *

select multithreading type (Generic codec option, might have no effect)

Flags : Read / Write

Default value : slice+frame

### threads

    “threads” avcodeccontext-threads *

set the number of threads (Generic codec option, might have no effect)

Flags : Read / Write

Default value : unknown (1)

### ticks-per-frame

    “ticks-per-frame” gint

(null) (Generic codec option, might have no effect)

Flags : Read / Write

Default value : 1

### timecode-frame-start

    “timecode-frame-start” gint64

GOP timecode frame start number, in non-drop-frame format (Generic codec option, might have no effect)

Flags : Read / Write

Default value : 18446744073709551615

### trellis

    “trellis” gint

rate-distortion optimal quantization (Generic codec option, might have no effect)

Flags : Read / Write

Default value : 0

## Named constants

### H261-encoder-cmp-func

#### Members

`sad` (0) – Sum of absolute differences, fast
`sse` (1) – Sum of squared errors
`satd` (2) – Sum of absolute Hadamard transformed differences
`dct` (3) – Sum of absolute DCT transformed differences
`psnr` (4) – Sum of squared quantization errors, low quality
`bit` (5) – Number of bits needed for the block
`rd` (6) – Rate distortion optimal, slow
`zero` (7) – Zero
`vsad` (8) – Sum of absolute vertical differences
`vsse` (9) – Sum of squared vertical differences
`nsse` (10) – Noise preserving sum of squared differences
`dctmax` (13) – dctmax
`dct264` (14) – dct264
`msad` (15) – Sum of absolute differences, median predicted
`chroma` (256) – chroma

### H261-encoder-motion-est

#### Members

`zero` (0) – zero
`epzs` (1) – epzs
`xone` (2) – xone

### H261-encoder-mpv-flags

#### Members

`skip_rd` (0x00000001) – RD optimal MB level residual skipping
`strict_gop` (0x00000002) – Strictly enforce gop size
`qp_rd` (0x00000004) – Use rate distortion optimization for qp selection
`cbp_rd` (0x00000008) – use rate distortion optimization for CBP
`naq` (0x00000010) – normalize adaptive quantization
`mv0` (0x00000020) – always try a mb with mv=<0,0>

### H261-encoder-rc-strategy

#### Members

`ffmpeg` (0) – deprecated, does nothing

The results of the search are