vp9enc

This element encodes raw video into a VP9 stream. VP9 is a royalty-free video codec maintained by Google. It's the successor of On2 VP3, which was the base of the Theora video codec.

To control the quality of the encoding, the target-bitrate, min-quantizer, max-quantizer or cq-level properties can be used. Which one is used depends on the mode selected by the end-usage property. See Encoder Parameters for explanation, examples for useful encoding parameters and more details on the encoding parameters.

Example pipeline

 gst-launch-1.0 -v videotestsrc num-buffers=1000 ! vp9enc ! webmmux ! filesink location=videotestsrc.webm

This example pipeline will encode a test video source to VP9 muxed in an WebM container.

Hierarchy

GObject
    ╰──GInitiallyUnowned
        ╰──GstObject
            ╰──GstElement
                ╰──GstVideoEncoder
                    ╰──GstVPXEnc
                        ╰──vp9enc

Factory details

Authors: – David Schleef , Sebastian Dröge

Classification:Codec/Encoder/Video

Rank – primary

Plugin – gstvpx

Package – GStreamer Good Plug-ins

Pad Templates

sink

video/x-raw:
         format: { I420, YV12 }
          width: [ 1, 2147483647 ]
         height: [ 1, 2147483647 ]
      framerate: [ 0/1, 2147483647/1 ]

Presencealways

Directionsink

Object typeGstPad


src

video/x-vp9:
        profile: { (string)0, (string)1, (string)2, (string)3 }

Presencealways

Directionsrc

Object typeGstPad


Properties

arnr-maxframes

“arnr-maxframes” gint

AltRef maximum number of frames

Flags : Read / Write

Default value : 0


arnr-strength

“arnr-strength” gint

AltRef strength

Flags : Read / Write

Default value : 3


arnr-type

“arnr-type” gint

AltRef type

Flags : Read / Write

Default value : 3


auto-alt-ref

“auto-alt-ref” gboolean

Automatically generate AltRef frames

Flags : Read / Write

Default value : false


bits-per-pixel

“bits-per-pixel” gfloat

Factor to convert number of pixels to bitrate value (only has an effect if target-bitrate=0)

Flags : Read / Write

Default value : 0.0289


buffer-initial-size

“buffer-initial-size” gint

Initial client buffer size (ms)

Flags : Read / Write

Default value : 4000


buffer-optimal-size

“buffer-optimal-size” gint

Optimal client buffer size (ms)

Flags : Read / Write

Default value : 5000


buffer-size

“buffer-size” gint

Client buffer size (ms)

Flags : Read / Write

Default value : 6000


cpu-used

“cpu-used” gint

CPU used

Flags : Read / Write

Default value : 0


cq-level

“cq-level” gint

Constrained quality level

Flags : Read / Write

Default value : 10


deadline

“deadline” gint64

Deadline per frame (usec, 0=disabled)

Flags : Read / Write

Default value : 0


dropframe-threshold

“dropframe-threshold” gint

Temporal resampling threshold (buf %%)

Flags : Read / Write

Default value : 0


end-usage

“end-usage” GstVPXEncEndUsage *

Rate control mode

Flags : Read / Write

Default value : vbr (0)


error-resilient

“error-resilient” GstVPXEncErFlags *

Error resilience flags

Flags : Read / Write

Default value : (none)


horizontal-scaling-mode

“horizontal-scaling-mode” GstVPXEncScalingMode *

Horizontal scaling mode

Flags : Read / Write

Default value : normal (0)


keyframe-max-dist

“keyframe-max-dist” gint

Maximum distance between keyframes (number of frames)

Flags : Read / Write

Default value : 128


keyframe-mode

“keyframe-mode” GstVPXEncKfMode *

Keyframe placement

Flags : Read / Write

Default value : auto (1)


lag-in-frames

“lag-in-frames” gint

Maximum number of frames to lag

Flags : Read / Write

Default value : 25


max-intra-bitrate

“max-intra-bitrate” gint

Maximum Intra frame bitrate

Flags : Read / Write

Default value : 0


max-quantizer

“max-quantizer” gint

Maximum Quantizer (worst)

Flags : Read / Write

Default value : 63


min-force-key-unit-interval

“min-force-key-unit-interval” guint64

Minimum interval between force-keyunit requests in nanoseconds

Flags : Read / Write

Default value : 0


min-quantizer

“min-quantizer” gint

Minimum Quantizer (best)

Flags : Read / Write

Default value : 0


multipass-cache-file

“multipass-cache-file” gchararray

Multipass cache file. If stream caps reinited, multiple files will be created: file, file.1, file.2, ... and so on.

Flags : Read / Write

Default value : multipass.cache


multipass-mode

“multipass-mode” GstVPXEncMultipassMode *

Multipass encode mode

Flags : Read / Write

Default value : one-pass (0)


noise-sensitivity

“noise-sensitivity” gint

Noise sensisivity (frames to blur)

Flags : Read / Write

Default value : 0


overshoot

“overshoot” gint

Datarate overshoot (max) target (%%)

Flags : Read / Write

Default value : 25


qos

“qos” gboolean

Handle Quality-of-Service events from downstream

Flags : Read / Write

Default value : false


resize-allowed

“resize-allowed” gboolean

Allow spatial resampling

Flags : Read / Write

Default value : false


resize-down-threshold

“resize-down-threshold” gint

Downscale threshold (buf %%)

Flags : Read / Write

Default value : 30


resize-up-threshold

“resize-up-threshold” gint

Upscale threshold (buf %%)

Flags : Read / Write

Default value : 60


sharpness

“sharpness” gint

Filter sharpness

Flags : Read / Write

Default value : 0


static-threshold

“static-threshold” gint

Motion detection threshold. Recommendation is to set 100 for screen/window sharing

Flags : Read / Write

Default value : 1


target-bitrate

“target-bitrate” gint

Target bitrate (in bits/sec) (0: auto - bitrate depends on resolution, see "bits-per-pixel" property for more info)

Flags : Read / Write

Default value : 256000


temporal-scalability-layer-id

“temporal-scalability-layer-id” GValueArray *

Sequence defining coding layer membership

Flags : Read / Write


temporal-scalability-number-layers

“temporal-scalability-number-layers” gint

Number of coding layers to use

Flags : Read / Write

Default value : 1


temporal-scalability-periodicity

“temporal-scalability-periodicity” gint

Length of sequence that defines layer membership periodicity

Flags : Read / Write

Default value : 0


temporal-scalability-rate-decimator

“temporal-scalability-rate-decimator” GValueArray *

Rate decimation factors for each layer

Flags : Read / Write


temporal-scalability-target-bitrate

“temporal-scalability-target-bitrate” GValueArray *

Target bitrates for coding layers (one per layer, decreasing)

Flags : Read / Write


threads

“threads” gint

Number of threads to use

Flags : Read / Write

Default value : 8


timebase

“timebase” GstFraction *

Fraction of one second that is the shortest interframe time - normally left as zero which will default to the framerate

Flags : Read / Write

Default value : 0/1


token-partitions

“token-partitions” GstVPXEncTokenPartitions *

Number of token partitions

Flags : Read / Write

Default value : 1 (0)


tuning

“tuning” GstVPXEncTuning *

Tuning

Flags : Read / Write

Default value : psnr (0)


twopass-vbr-bias

“twopass-vbr-bias” gint

CBR/VBR bias (0=CBR, 100=VBR)

Flags : Read / Write

Default value : 50


twopass-vbr-maxsection

“twopass-vbr-maxsection” gint

GOP maximum bitrate (%% target)

Flags : Read / Write

Default value : 2000


twopass-vbr-minsection

“twopass-vbr-minsection” gint

GOP minimum bitrate (%% target)

Flags : Read / Write

Default value : 0


undershoot

“undershoot” gint

Datarate undershoot (min) target (%%)

Flags : Read / Write

Default value : 25


vertical-scaling-mode

“vertical-scaling-mode” GstVPXEncScalingMode *

Vertical scaling mode

Flags : Read / Write

Default value : normal (0)


Named constants

GstVPXEncEndUsage

Members

vbr (0) – Variable Bit Rate (VBR) mode
cbr (1) – Constant Bit Rate (CBR) mode
cq (2) – Constant Quality Mode (CQ) mode

GstVPXEncErFlags

Members

default (0x00000001) – Default error resilience
partitions (0x00000002) – Allow partitions to be decoded independently

GstVPXEncKfMode

Members

auto (1) – Determine optimal placement automatically
disabled (0) – Don't automatically place keyframes

GstVPXEncMultipassMode

Members

one-pass (0) – One pass encoding (default)
first-pass (1) – First pass of multipass encoding
last-pass (2) – Last pass of multipass encoding

GstVPXEncScalingMode

Members

normal (0) – Normal
4:5 (1) – 4:5
3:5 (2) – 3:5
1:2 (3) – 1:2

GstVPXEncTokenPartitions

Members

1 (0) – One token partition
2 (1) – Two token partitions
4 (2) – Four token partitions
8 (3) – Eight token partitions

GstVPXEncTuning

Members

psnr (0) – Tune for PSNR
ssim (1) – Tune for SSIM

The results of the search are