# interlace

The interlace element takes a non-interlaced raw video stream as input, creates fields out of each frame, then combines fields into interlaced frames to output as an interlaced video stream. It can also produce telecined streams from progressive input.

## Example launch line

     gst-launch-1.0 -v videotestsrc pattern=ball ! interlace ! xvimagesink

This pipeline illustrates the combing effects caused by displaying two interlaced fields as one progressive frame.

     gst-launch-1.0 -v filesrc location=/path/to/file ! decodebin ! videorate !
       videoscale ! video/x-raw,format=\(string\)I420,width=720,height=480,
       framerate=60000/1001,pixel-aspect-ratio=11/10 !
       interlace top-field-first=false ! autovideosink

This pipeline converts a progressive video stream into an interlaced stream suitable for standard definition NTSC.

     gst-launch-1.0 -v videotestsrc pattern=ball ! video/x-raw,
       format=\(string\)I420,width=720,height=480,framerate=24000/1001,
       pixel-aspect-ratio=11/10 ! interlace !
       autovideosink

This pipeline converts a 24 frames per second progressive film stream into a 30000/1001 2:3:2:3... pattern telecined stream suitable for displaying film content on NTSC.

## Hierarchy

    GObject
        ╰──GInitiallyUnowned
            ╰──GstObject
                ╰──GstElement
                    ╰──interlace

## Factory details

Authors: – David Schleef

Classification: – `Filter/Video`

Rank – none

Plugin – interlace

Package – GStreamer Bad Plug-ins

## Pad Templates

### `sink`

    video/x-raw:
             format: { AYUV64, Y412_BE, Y412_LE, A444_10BE, A444_10LE, AYUV, VUYA, A422_10BE, A422_10LE, A420_10BE, A420_10LE, A420, Y444_16BE, Y444_16LE, Y444_12BE, Y444_12LE, Y410, Y444_10BE, Y444_10LE, v308, IYU2, Y444, NV24, v216, I422_12BE, I422_12LE, Y212_BE, Y212_LE, UYVP, Y210, NV16_10LE40, NV16_10LE32, v210, I422_10BE, I422_10LE, YUY2, UYVY, VYUY, YVYU, Y42B, NV16, NV61, P016_BE, P016_LE, I420_12BE, I420_12LE, P012_BE, P012_LE, NV12_10LE40, NV12_10LE32, I420_10BE, I420_10LE, P010_10BE, P010_10LE, I420, YV12, NV12, NV21, IYU1, Y41B, YUV9, YVU9 }
              width: [ 1, 2147483647 ]
             height: [ 1, 2147483647 ]
          framerate: [ 0/1, 2147483647/1 ]
     interlace-mode: progressive
    video/x-raw:
             format: { AYUV64, Y412_BE, Y412_LE, A444_10BE, A444_10LE, AYUV, VUYA, A422_10BE, A422_10LE, A420_10BE, A420_10LE, A420, Y444_16BE, Y444_16LE, Y444_12BE, Y444_12LE, Y410, Y444_10BE, Y444_10LE, v308, IYU2, Y444, NV24, v216, I422_12BE, I422_12LE, Y212_BE, Y212_LE, UYVP, Y210, NV16_10LE40, NV16_10LE32, v210, I422_10BE, I422_10LE, YUY2, UYVY, VYUY, YVYU, Y42B, NV16, NV61, P016_BE, P016_LE, I420_12BE, I420_12LE, P012_BE, P012_LE, NV12_10LE40, NV12_10LE32, I420_10BE, I420_10LE, P010_10BE, P010_10LE, I420, YV12, NV12, NV21, IYU1, Y41B, YUV9, YVU9 }
              width: [ 1, 2147483647 ]
             height: [ 1, 2147483647 ]
          framerate: [ 0/1, 2147483647/1 ]
     interlace-mode: interleaved
        field-order: { (string)top-field-first, (string)bottom-field-first }
    video/x-raw:
             format: { AYUV64, Y412_BE, Y412_LE, A444_10BE, A444_10LE, AYUV, VUYA, A422_10BE, A422_10LE, A420_10BE, A420_10LE, A420, Y444_16BE, Y444_16LE, Y444_12BE, Y444_12LE, Y410, Y444_10BE, Y444_10LE, v308, IYU2, Y444, NV24, v216, I422_12BE, I422_12LE, Y212_BE, Y212_LE, UYVP, Y210, NV16_10LE40, NV16_10LE32, v210, I422_10BE, I422_10LE, YUY2, UYVY, VYUY, YVYU, Y42B, NV16, NV61, P016_BE, P016_LE, I420_12BE, I420_12LE, P012_BE, P012_LE, NV12_10LE40, NV12_10LE32, I420_10BE, I420_10LE, P010_10BE, P010_10LE, I420, YV12, NV12, NV21, IYU1, Y41B, YUV9, YVU9 }
              width: [ 1, 2147483647 ]
             height: [ 1, 2147483647 ]
          framerate: [ 0/1, 2147483647/1 ]
     interlace-mode: mixed

    video/x-raw(format:Interlaced):
             format: { AYUV64, Y412_BE, Y412_LE, A444_10BE, A444_10LE, AYUV, VUYA, A422_10BE, A422_10LE, A420_10BE, A420_10LE, A420, Y444_16BE, Y444_16LE, Y444_12BE, Y444_12LE, Y410, Y444_10BE, Y444_10LE, v308, IYU2, Y444, NV24, v216, I422_12BE, I422_12LE, Y212_BE, Y212_LE, UYVP, Y210, NV16_10LE40, NV16_10LE32, v210, I422_10BE, I422_10LE, YUY2, UYVY, VYUY, YVYU, Y42B, NV16, NV61, P016_BE, P016_LE, I420_12BE, I420_12LE, P012_BE, P012_LE, NV12_10LE40, NV12_10LE32, I420_10BE, I420_10LE, P010_10BE, P010_10LE, I420, YV12, NV12, NV21, IYU1, Y41B, YUV9, YVU9 }
              width: [ 1, 2147483647 ]
             height: [ 1, 2147483647 ]
          framerate: [ 0/1, 2147483647/1 ]
     interlace-mode: alternate

Presence – always

Direction – sink

Object type – GstPad

### `src`

    video/x-raw:
             format: { AYUV64, Y412_BE, Y412_LE, A444_10BE, A444_10LE, AYUV, VUYA, A422_10BE, A422_10LE, A420_10BE, A420_10LE, A420, Y444_16BE, Y444_16LE, Y444_12BE, Y444_12LE, Y410, Y444_10BE, Y444_10LE, v308, IYU2, Y444, NV24, v216, I422_12BE, I422_12LE, Y212_BE, Y212_LE, UYVP, Y210, NV16_10LE40, NV16_10LE32, v210, I422_10BE, I422_10LE, YUY2, UYVY, VYUY, YVYU, Y42B, NV16, NV61, P016_BE, P016_LE, I420_12BE, I420_12LE, P012_BE, P012_LE, NV12_10LE40, NV12_10LE32, I420_10BE, I420_10LE, P010_10BE, P010_10LE, I420, YV12, NV12, NV21, IYU1, Y41B, YUV9, YVU9 }
              width: [ 1, 2147483647 ]
             height: [ 1, 2147483647 ]
          framerate: [ 0/1, 2147483647/1 ]
     interlace-mode: { (string)interleaved, (string)mixed }

    video/x-raw(format:Interlaced):
             format: { AYUV64, Y412_BE, Y412_LE, A444_10BE, A444_10LE, AYUV, VUYA, A422_10BE, A422_10LE, A420_10BE, A420_10LE, A420, Y444_16BE, Y444_16LE, Y444_12BE, Y444_12LE, Y410, Y444_10BE, Y444_10LE, v308, IYU2, Y444, NV24, v216, I422_12BE, I422_12LE, Y212_BE, Y212_LE, UYVP, Y210, NV16_10LE40, NV16_10LE32, v210, I422_10BE, I422_10LE, YUY2, UYVY, VYUY, YVYU, Y42B, NV16, NV61, P016_BE, P016_LE, I420_12BE, I420_12LE, P012_BE, P012_LE, NV12_10LE40, NV12_10LE32, I420_10BE, I420_10LE, P010_10BE, P010_10LE, I420, YV12, NV12, NV21, IYU1, Y41B, YUV9, YVU9 }
              width: [ 1, 2147483647 ]
             height: [ 1, 2147483647 ]
          framerate: [ 0/1, 2147483647/1 ]
     interlace-mode: alternate

Presence – always

Direction – src

Object type – GstPad

## Properties

### allow-rff

    “allow-rff” gboolean

Allow generation of buffers with RFF flag set, i.e., duration of 3 fields

Flags : Read / Write

Default value : false

### field-pattern

    “field-pattern” GstInterlacePattern *

The output field pattern

Flags : Read / Write

Default value : 2:3 (2)

### pattern-offset

    “pattern-offset” guint

The initial field pattern offset. Counts from 0.

Flags : Read / Write

Default value : 0

### top-field-first

    “top-field-first” gboolean

Interlaced stream should be top field first

Flags : Read / Write

Default value : false

## Named constants

### GstInterlacePattern

#### Members

`1:1` (0) – 1:1 (e.g. 60p -> 60i)
`2:2` (1) – 2:2 (e.g. 30p -> 60i)
`2:3` (2) – 2:3 (e.g. 24p -> 60i telecine)
`2:3:3:2` (3) – 2:3:3:2 (e.g. 24p -> 60i telecine)
`2-11:3` (4) – Euro 2-11:3 (e.g. 24p -> 50i telecine)
`3:4-3` (5) – 3:4-3 (e.g. 16p -> 60i telecine)
`3-7:4` (6) – 3-7:4 (e.g. 16p -> 50i telecine)
`3:3:4` (7) – 3:3:4 (e.g. 18p -> 60i telecine)
`3:3` (8) – 3:3 (e.g. 20p -> 60i telecine)
`3:2-4` (9) – 3:2-4 (e.g. 27.5p -> 60i telecine)
`1:2-4` (10) – 1:2-4 (e.g. 27.5p -> 50i telecine)

The results of the search are