gboolean dynamic-deinter Read / Write
GstFieldsMethods operation Read / Write

Types and Values

Object Hierarchy

    ╰── GInitiallyUnowned
        ╰── GstObject
            ╰── GstElement
                ╰── GstBaseTransform
                    ╰── GstVideoFilter
                        ╰── GstEntransFields


This filter provides some basic field operations. Depending on how operation is set, this can range from simply dropping a field (crude de-interlacing), flipping fields (if top field were not first), or more involved de-interlacing of frames (by linear interpolation or even linear blind, both output fields are then linear interpolations of input fields).

If dynamic-deinter is set, it will only perform (linear or linear blend) de-interlacing if an incoming frame is marked as interlaced by means of a preceding custom event (containing an empty structure simply called 'detectinter', e.g. detectinter can produce such marking).

Using the flip, shift (and combinations thereof) methods, the filter can shift, reorder and generally rearrange independent fields of an interlaced video input. As is (well-)known, input retrieved from broadcast (PAL, NTSC, etc) video sources generally comes in an interlaced form where each pass from top to bottom of the screen displays every other scanline, and then the next pass displays the lines between the lines from the first pass. Each pass is known as a "field" (whence the name of the filter); there are generally two fields per frame. When this form of video is captured and manipulated digitally, the two fields of each frame are usually merged together into one flat (planar) image per frame. This usually produces reasonable results, however there are conditions which can cause this merging to be performed incorrectly or less-than-optimally, which is where this filter can help.

In shift mode, the video is shifted by one field (half a frame), changing frame boundaries appropriately. This is useful if a video capture started grabbing video half a frame (one field) off from where frame boundaries were actually intended to be.

In flip mode, the top field and bottom field of each frame is exchanged. This can be useful if the video signal was sent "bottom field first" (which can happen sometimes with PAL video sources) or other oddities occurred which caused the frame boundaries to be at the right place, but the scanlines to be swapped.

It is also possible to perform both operations, in which case shifting before flipping is expected to be more commonly useful, though flipping before shifting may be in order for some extremely odd material. Note that the former basically comes down to keeping the top frame while shifting (delaying) the bottom frame, whereas the latter keeps the bottom frame and shifts the top frame.

As a technical note, the shift function (when only shifting) might produce slight color discrepancies, as the subsampled nature of YV12 (and alike) format does not contain enough information to do field shifting cleanly.

The split mode separates a frame into its composing fields, yielding a half-height stream at twice the framerate. This can be useful for subsequent per-field processing. Conversely, merge mode merges treats 2 consecutive frames as fields and yields a double-height stream at half the framerate. This would then be used to re-assemble a split stream.

The mix mode tries to mimic actual display of an interlaced stream. It produces a double framerate stream in which each frame is followed by a frame composed of its own bottom field and the top field replaced by the next frame's top field.


  • It is akin to (a combination of) transcode's 'core' de-interlacing operation, fields filter, and doublefps filter [Thomas Oestreich, Tilmann Bitterberg, Alex Stewart]. Some of the documentation is also inspired by these components.
  • Similar filters also available in mplayer, e.g. phase filter, ..., avidemux, etc



Types and Values


typedef GstFields GstEntransFields;

Property Details

The “dynamic-deinter” property

  “dynamic-deinter”          gboolean

Perform deinterlacing only when requested.

Flags: Read / Write

Default value: FALSE

The “operation” property

  “operation”                GstFieldsMethods

Field operation.

Flags: Read / Write

Default value: Drop (bottom) field