pipeparts.encode module

Module for encoding elements

pipeparts.encode.flac(pipeline: Pipeline, src: Element, quality=0, **properties)[source]

Encoded sources as FLAC streams. FLAC is a Free Lossless Audio Codec. FLAC audio can directly be written into a file, or embedded into containers such as oggmux or matroskamux.

Args:
pipeline:

Gst.Pipeline, the pipeline to which the new element will be added

src:

Gst.Element, the source element

quality:

int

**properties:

dict, keyword arguments to be set as element properties

References:

[1] https://gstreamer.freedesktop.org/documentation/flac/flacenc.html?gi-language=python

Returns:

Element, the source encoded as a FLAC stream

pipeparts.encode.igwd_parse(pipeline: Pipeline, src: Element, **properties) Element[source]

Parse byte streams into whole IGWD frame files (https://dcc.ligo.org/cgi-bin/DocDB/ShowDocument?docid=329)

Args:
pipeline:

Gst.Pipeline, the pipeline to which the new element will be added

src:

Gst.Element, the source element

**properties:

References:

Implementation gstlal/gstlal-ugly/gst/framecpp/framecpp_igwdparse.cc

Returns:

Element

pipeparts.encode.theora(pipeline: Pipeline, src: Element, **properties: dict) Element[source]

This element encodes raw video into a Theora stream

Args:
pipeline:

Gst.Pipeline, the pipeline to which the new element will be added

src:

Gst.Element, the source element

**properties:

dict, keyword arguments to be set as element properties

References:

[1] theoraenc docs: https://gstreamer.freedesktop.org/documentation/theora/theoraenc.html?gi-language=python

Returns:

Element, the source encoded as a Theora stream

pipeparts.encode.tsv(pipeline: Pipeline, src: Element, segment: Optional[segment] = None) Element[source]

Converts audio time-series to tab-separated ascii text, a format compatible with most plotting utilities. The output is multi-column tab-separated ASCII text. The first column is the time, the remaining columns are the values of the channels in order.

Args:
pipeline:

Gst.Pipeline, the pipeline to which the new element will be added

src:

Gst.Element, the source element

segment:

Segment, default None, a ligo.segments.segment

Returns:

Element

pipeparts.encode.uri_decode_bin(pipeline: Pipeline, uri: str, caps: Caps = 'application/x-igwd-frame,framed=true', **properties) Element[source]

Decodes data from a URI into raw media. It selects a source element that can handle the given scheme and connects it to a decodebin.

Args:
pipeline:

Gst.Pipeline, the pipeline to which the new element will be added

uri:

str, URI to decode

caps:

Gst.Caps, The caps on which to stop decoding. (NULL = default)

**properties:

References:

[1] https://gstreamer.freedesktop.org/documentation/playback/uridecodebin.html?gi-language=python

Returns:

Element

pipeparts.encode.vorbis(pipeline: Pipeline, src: Element) Element[source]

This element encodes raw float audio into a Vorbis stream

Args:
pipeline:

Gst.Pipeline, the pipeline to which the new element will be added

src:

Gst.Element, the source element

References:

[1] vorbisenc docs: https://gstreamer.freedesktop.org/documentation/vorbis/vorbisenc.html?gi-language=python

Returns:

Element, the source encoded as a Vorbis stream

pipeparts.encode.wav(pipeline: Pipeline, src: Element) Element[source]

Format source into the wav format

Args:
pipeline:

Gst.Pipeline, the pipeline to which the new element will be added

src:

Gst.Element, the source element

References:

[1] wavenc docs: https://gstreamer.freedesktop.org/documentation/wavenc/index.html?gi-language=python

Returns:

Element, the src encoded as wav format