flacenc

flacenc encodes 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.

Example launch line

 gst-launch-1.0 audiotestsrc num-buffers=100 ! flacenc ! filesink location=beep.flac

Encode a short sine wave into FLAC

 gst-launch-1.0 cdparanoiasrc mode=continuous ! queue ! audioconvert ! flacenc ! filesink location=cd.flac

Rip a whole audio CD into a single FLAC file, with the track table saved as a CUE sheet inside the FLAC file

 gst-launch-1.0 cdparanoiasrc track=5 ! queue ! audioconvert ! flacenc ! filesink location=track5.flac

Rip track 5 of an audio CD and encode it losslessly to a FLAC file

Hierarchy

GObject
    ╰──GInitiallyUnowned
        ╰──GstObject
            ╰──GstElement
                ╰──GstAudioEncoder
                    ╰──flacenc

Implemented interfaces

Factory details

Authors: – Wim Taymans

Classification:Codec/Encoder/Audio

Rank – primary

Plugin – flac

Package – GStreamer Good Plug-ins

Pad Templates

sink

audio/x-raw:
         format: { S8, S16LE, S24LE, S24_32LE }
         layout: interleaved
           rate: [ 1, 655350 ]
       channels: 1
audio/x-raw:
         format: { S8, S16LE, S24LE, S24_32LE }
         layout: interleaved
           rate: [ 1, 655350 ]
       channels: 2
   channel-mask: 0x0000000000000003
audio/x-raw:
         format: { S8, S16LE, S24LE, S24_32LE }
         layout: interleaved
           rate: [ 1, 655350 ]
       channels: 3
   channel-mask: 0x0000000000000007
audio/x-raw:
         format: { S8, S16LE, S24LE, S24_32LE }
         layout: interleaved
           rate: [ 1, 655350 ]
       channels: 4
   channel-mask: 0x0000000000000033
audio/x-raw:
         format: { S8, S16LE, S24LE, S24_32LE }
         layout: interleaved
           rate: [ 1, 655350 ]
       channels: 5
   channel-mask: 0x0000000000000037
audio/x-raw:
         format: { S8, S16LE, S24LE, S24_32LE }
         layout: interleaved
           rate: [ 1, 655350 ]
       channels: 6
   channel-mask: 0x000000000000003f
audio/x-raw:
         format: { S8, S16LE, S24LE, S24_32LE }
         layout: interleaved
           rate: [ 1, 655350 ]
       channels: 7
   channel-mask: 0x000000000000013f
audio/x-raw:
         format: { S8, S16LE, S24LE, S24_32LE }
         layout: interleaved
           rate: [ 1, 655350 ]
       channels: 8
   channel-mask: 0x0000000000000c3f

Presencealways

Directionsink

Object typeGstPad


src

audio/x-flac:
         framed: true

Presencealways

Directionsrc

Object typeGstPad


Properties

blocksize

“blocksize” guint

Blocksize in samples

Flags : Read / Write / Construct

Default value : 4608


escape-coding

“escape-coding” gboolean

search for escape codes in the entropy coding stage for slightly better compression

Flags : Read / Write / Construct

Default value : false


loose-mid-side-stereo

“loose-mid-side-stereo” gboolean

Loose mid side stereo

Flags : Read / Write / Construct

Default value : false


max-lpc-order

“max-lpc-order” guint

Max LPC order; 0 => use only fixed predictors

Flags : Read / Write / Construct

Default value : 8


max-residual-partition-order

“max-residual-partition-order” guint

Max residual partition order (above 4 doesn't usually help much)

Flags : Read / Write / Construct

Default value : 3


mid-side-stereo

“mid-side-stereo” gboolean

Do mid side stereo (only for stereo input)

Flags : Read / Write / Construct

Default value : true


min-residual-partition-order

“min-residual-partition-order” guint

Min residual partition order (above 4 doesn't usually help much)

Flags : Read / Write / Construct

Default value : 3


padding

“padding” guint

Write a PADDING block with this length in bytes

Flags : Read / Write / Construct

Default value : 0


qlp-coeff-precision

“qlp-coeff-precision” guint

Precision in bits of quantized linear-predictor coefficients; 0 = automatic

Flags : Read / Write / Construct

Default value : 0


quality

“quality” Flac-enc-quality *

Speed versus compression tradeoff

Flags : Read / Write / Construct

Default value : 5 (5)


rice-parameter-search-dist

“rice-parameter-search-dist” guint

0 = try only calc'd parameter k; else try all [k-dist..k+dist] parameters, use best

Flags : Read / Write / Construct

Default value : 0


seekpoints

“seekpoints” gint

Add SEEKTABLE metadata (if > 0, number of entries, if < 0, interval in sec)

Flags : Read / Write / Construct

Default value : -10


streamable-subset

“streamable-subset” gboolean

true to limit encoder to generating a Subset stream, else false

Flags : Read / Write / Construct

Default value : true


Named constants

Flac-enc-quality

Members

0 (0) – 0 - Fastest compression
1 (1) – 1
2 (2) – 2
3 (3) – 3
4 (4) – 4
5 (5) – 5 - Default
6 (6) – 6
7 (7) – 7
8 (8) – 8 - Highest compression
9 (9) – 9 - Insane

The results of the search are