Top |
gboolean | altscan-mpeg2 | Read / Write |
GstMpeg2encAspect | aspect | Read / Write |
gint | b-per-refframe | Read / Write |
gint | bitrate | Read / Write |
gint | bufsize | Read / Write |
gboolean | closed-gop | Read / Write |
gboolean | constraints | Read / Write |
gboolean | correct-svcd-hds | Read / Write |
gboolean | dualprime | Read / Write |
gboolean | dummy-svcd-sof | Read / Write |
gboolean | force-b-b-p | Read / Write |
GstMpeg2encFormat | format | Read / Write |
GstMpeg2encFramerate | framerate | Read / Write |
GstMpeg2encInterlaceMode | interlace-mode | Read / Write |
gint | intra-dc-prec | Read / Write |
gboolean | keep-hf | Read / Write |
gint | max-gop-size | Read / Write |
gint | min-gop-size | Read / Write |
gint | motion-search-radius | Read / Write |
gint | non-video-bitrate | Read / Write |
GstMpeg2encVideoNorm | norm | Read / Write |
GstMpeg2encPlaybackFieldOrders | playback-field-order | Read / Write |
gboolean | pulldown-3-2 | Read / Write |
GstMpeg2encQuantisationMatrix | quant-matrix | Read / Write |
gfloat | quant-reduction-max-var | Read / Write |
gint | quantisation | Read / Write |
gfloat | quantisation-reduction | Read / Write |
gfloat | reduce-hf | Read / Write |
gint | reduction-2x2 | Read / Write |
gint | reduction-4x4 | Read / Write |
gboolean | sequence-header-every-gop | Read / Write |
gint | sequence-length | Read / Write |
gint | unit-coeff-elim | Read / Write |
gint | vcd-still-size | Read / Write |
This element encodes raw video into an MPEG-1/2 elementary stream using the
mjpegtools library.Documentation on MPEG encoding in general can be found in the
MJPEG Howtoand on the various available parameters in the documentation of the mpeg2enc tool in particular, which shares options with this element.
1 |
gst-launch-1.0 videotestsrc num-buffers=1000 ! mpeg2enc ! filesink location=videotestsrc.m1v |
Likely, the “format” property is most important, as it selects the type of MPEG stream that is produced. In particular, default property values are dependent on the format, and can even be forcibly restrained to certain pre-sets (and thereby ignored). Note that the (S)VCD profiles also restrict the image size, so some scaling may be needed to accomodate this. The so-called generic profiles (as used in the example above) allow most parameters to be adjusted.
1 |
gst-launch-1.0 videotestsrc num-buffers=1000 ! videoscale ! mpeg2enc format=1 norm=p ! filesink location=videotestsrc.m1v |
plugin |
mpeg2enc |
author |
Andrew Stevens <andrew.stevens@nexgo.de> Ronald Bultje <rbultje@ronald.bitfreak.net> |
class |
Codec/Encoder/Video |
name |
sink |
direction |
sink |
presence |
always |
details |
video/x-raw, format=(string)I420, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(fraction){ 24000/1001, 24/1, 25/1, 30000/1001, 30/1, 50/1, 60000/1001 } |
name |
src |
direction |
source |
presence |
always |
details |
video/mpeg, systemstream=(boolean)false, mpegversion=(int){ 1, 2 }, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(fraction){ 24000/1001, 24/1, 25/1, 30000/1001, 30/1, 50/1, 60000/1001 } |
“altscan-mpeg2”
property“altscan-mpeg2” gboolean
Alternate MPEG-2 block scanning. Disabling this might make buggy players play SVCD streams.
Flags: Read / Write
Default value: TRUE
“aspect”
property “aspect” GstMpeg2encAspect
Display aspect ratio.
Flags: Read / Write
Default value: Deduce from input
“b-per-refframe”
property“b-per-refframe” gint
Number of B frames between each I/P frame.
Flags: Read / Write
Allowed values: [0,2]
Default value: 0
“bitrate”
property“bitrate” gint
Compressed video bitrate (kbps).
Flags: Read / Write
Allowed values: [0,40000]
Default value: 1125
“bufsize”
property“bufsize” gint
Target decoders video buffer size (kB) (default depends on format).
Flags: Read / Write
Allowed values: [20,4000]
Default value: 46
“closed-gop”
property“closed-gop” gboolean
All Group-of-Pictures are closed (for multi-angle DVDs).
Flags: Read / Write
Default value: FALSE
“constraints”
property“constraints” gboolean
Use strict video resolution and bitrate checks.
Flags: Read / Write
Default value: TRUE
“correct-svcd-hds”
property“correct-svcd-hds” gboolean
Force SVCD width to 480 instead of 540/720.
Flags: Read / Write
Default value: FALSE
“dualprime”
property“dualprime” gboolean
Dual Prime Motion Estimation Mode for MPEG-2 I/P-frame only streams. Quite some players do not support this.
Flags: Read / Write
Default value: FALSE
“dummy-svcd-sof”
property“dummy-svcd-sof” gboolean
Generate dummy SVCD scan-data (for vcdimager).
Flags: Read / Write
Default value: TRUE
“force-b-b-p”
property“force-b-b-p” gboolean
Force two B frames between I/P frames when closing GOP boundaries.
Flags: Read / Write
Default value: FALSE
“format”
property “format” GstMpeg2encFormat
Encoding profile format.
Flags: Read / Write
Default value: Generic MPEG-1
“framerate”
property “framerate” GstMpeg2encFramerate
Output framerate.
Flags: Read / Write
Default value: Same as input
“interlace-mode”
property “interlace-mode” GstMpeg2encInterlaceMode
MPEG-2 motion estimation and encoding modes.
Flags: Read / Write
Default value: Progressive
“intra-dc-prec”
property“intra-dc-prec” gint
Number of bits precision for DC (base colour) in MPEG-2 blocks.
Flags: Read / Write
Allowed values: [8,11]
Default value: 9
“keep-hf”
property“keep-hf” gboolean
Maximize high-frequency resolution (for high-quality sources).
Flags: Read / Write
Default value: FALSE
“max-gop-size”
property“max-gop-size” gint
Maximal size per Group-of-Pictures (-1=default).
Flags: Read / Write
Allowed values: [G_MAXULONG,250]
Default value: -1
“min-gop-size”
property“min-gop-size” gint
Minimal size per Group-of-Pictures (-1=default).
Flags: Read / Write
Allowed values: [G_MAXULONG,250]
Default value: -1
“motion-search-radius”
property“motion-search-radius” gint
Motion compensation search radius.
Flags: Read / Write
Allowed values: [0,32]
Default value: 16
“non-video-bitrate”
property“non-video-bitrate” gint
Assumed bitrate of non-video for sequence splitting (kbps).
Flags: Read / Write
Allowed values: [0,10000]
Default value: 0
“norm”
property “norm” GstMpeg2encVideoNorm
Tag output for specific video norm.
Flags: Read / Write
Default value: Unspecified
“playback-field-order”
property “playback-field-order” GstMpeg2encPlaybackFieldOrders
Force specific playback field order.
Flags: Read / Write
Default value: Unspecified
“pulldown-3-2”
property“pulldown-3-2” gboolean
Generate header flags for 3-2 pull down 24fps movies.
Flags: Read / Write
Default value: FALSE
“quant-matrix”
property “quant-matrix” GstMpeg2encQuantisationMatrix
Quantisation matrix to use for encoding.
Flags: Read / Write
Default value: Default
“quant-reduction-max-var”
property“quant-reduction-max-var” gfloat
Maximal luma variance below which quantisation boost is used.
Flags: Read / Write
Allowed values: [0,2500]
Default value: 100
“quantisation”
property“quantisation” gint
Quantisation factor (-1=cbr, 0=default, 1=best, 31=worst).
Flags: Read / Write
Allowed values: [G_MAXULONG,31]
Default value: 0
“quantisation-reduction”
property“quantisation-reduction” gfloat
Max. quantisation reduction for highly active blocks.
Flags: Read / Write
Allowed values: [-4,10]
Default value: 0
“reduce-hf”
property“reduce-hf” gfloat
How much to reduce high-frequency resolution (by increasing quantisation).
Flags: Read / Write
Allowed values: [0,2]
Default value: 0
“reduction-2x2”
property“reduction-2x2” gint
Reduction factor for 2x2 subsampled candidate motion estimates (1=max. quality, 4=max. speed).
Flags: Read / Write
Allowed values: [1,4]
Default value: 3
“reduction-4x4”
property“reduction-4x4” gint
Reduction factor for 4x4 subsampled candidate motion estimates (1=max. quality, 4=max. speed).
Flags: Read / Write
Allowed values: [1,4]
Default value: 2
“sequence-header-every-gop”
property“sequence-header-every-gop” gboolean
Include a sequence header in every GOP.
Flags: Read / Write
Default value: FALSE
“sequence-length”
property“sequence-length” gint
Place a sequence boundary after each <num> MB (0=disable).
Flags: Read / Write
Allowed values: [0,10240]
Default value: 0
“unit-coeff-elim”
property“unit-coeff-elim” gint
How agressively small-unit picture blocks should be skipped.
Flags: Read / Write
Allowed values: [-40,40]
Default value: 0
“vcd-still-size”
property“vcd-still-size” gint
Size of VCD stills (in KB).
Flags: Read / Write
Allowed values: [0,512]
Default value: 0