mirror of
https://github.com/holub/mame
synced 2025-04-21 07:52:35 +03:00
929 lines
33 KiB
Groff
929 lines
33 KiB
Groff
.\" Automatically generated by Pandoc 2.9.2.1
|
|
.\"
|
|
.TH "flac" "1" "" "Version 1.4.3" "Free Lossless Audio Codec conversion tool"
|
|
.hy
|
|
.SH NAME
|
|
.PP
|
|
flac - Free Lossless Audio Codec
|
|
.SH SYNOPSIS
|
|
.PP
|
|
\f[B]flac\f[R] [ \f[I]OPTIONS\f[R] ] [ \f[I]infile.wav\f[R] |
|
|
\f[I]infile.rf64\f[R] | \f[I]infile.aiff\f[R] | \f[I]infile.raw\f[R] |
|
|
\f[I]infile.flac\f[R] | \f[I]infile.oga\f[R] | \f[I]infile.ogg\f[R] |
|
|
\f[B]-\f[R] \f[I]\&...\f[R] ]
|
|
.PP
|
|
\f[B]flac\f[R] [ \f[B]-d\f[R] | \f[B]--decode\f[R] | \f[B]-t\f[R] |
|
|
\f[B]--test\f[R] | \f[B]-a\f[R] | \f[B]--analyze\f[R] ] [
|
|
\f[I]OPTIONS\f[R] ] [ \f[I]infile.flac\f[R] | \f[I]infile.oga\f[R] |
|
|
\f[I]infile.ogg\f[R] | \f[B]-\f[R] \f[I]\&...\f[R] ]
|
|
.SH DESCRIPTION
|
|
.PP
|
|
\f[B]flac\f[R] is a command-line tool for encoding, decoding, testing
|
|
and analyzing FLAC streams.
|
|
.SH GENERAL USAGE
|
|
.PP
|
|
\f[B]flac\f[R] supports as input RIFF WAVE, Wave64, RF64, AIFF, FLAC or
|
|
Ogg FLAC format, or raw interleaved samples.
|
|
The decoder currently can output to RIFF WAVE, Wave64, RF64, or AIFF
|
|
format, or raw interleaved samples.
|
|
flac only supports linear PCM samples (in other words, no A-LAW, uLAW,
|
|
etc.), and the input must be between 4 and 32 bits per sample.
|
|
.PP
|
|
flac assumes that files ending in \[lq].wav\[rq] or that have the RIFF
|
|
WAVE header present are WAVE files, files ending in \[lq].w64\[rq] or
|
|
have the Wave64 header present are Wave64 files, files ending in
|
|
\[lq].rf64\[rq] or have the RF64 header present are RF64 files, files
|
|
ending in \[lq].aif\[rq] or \[lq].aiff\[rq] or have the AIFF header
|
|
present are AIFF files, files ending in \[lq].flac\[rq] or have the FLAC
|
|
header present are FLAC files and files ending in \[lq].oga\[rq] or
|
|
\[lq].ogg\[rq] or have the Ogg FLAC header present are Ogg FLAC files.
|
|
.PP
|
|
Other than this, flac makes no assumptions about file extensions, though
|
|
the convention is that FLAC files have the extension \[lq].flac\[rq] (or
|
|
\[lq].fla\[rq] on ancient \[lq]8.3\[rq] file systems like FAT-16).
|
|
.PP
|
|
Before going into the full command-line description, a few other things
|
|
help to sort it out: 1.
|
|
flac encodes by default, so you must use -d to decode 2.
|
|
the options -0 ..
|
|
-8 (or \[en]fast and \[en]best) that control the compression level
|
|
actually are just synonyms for different groups of specific encoding
|
|
options (described later) and you can get the same effect by using the
|
|
same options.
|
|
When specific options are specified they take priority over the
|
|
compression level no matter the order 3.
|
|
flac behaves similarly to gzip in the way it handles input and output
|
|
files 4.
|
|
the order in which options are specified is generally not important
|
|
.PP
|
|
Skip to the examples below for examples of some common tasks.
|
|
.PP
|
|
flac will be invoked one of four ways, depending on whether you are
|
|
encoding, decoding, testing, or analyzing.
|
|
Encoding is the default invocation, but can be switch to decoding with
|
|
\f[B]-d\f[R], analysis with \f[B]-a\f[R] or testing with \f[B]-t\f[R].
|
|
Depending on which way is chosen, encoding, decoding, analysis or
|
|
testing options can be used, see section OPTIONS for details.
|
|
General options can be used for all.
|
|
.PP
|
|
If only one inputfile is specified, it may be \[lq]-\[rq] for stdin.
|
|
When stdin is used as input, flac will write to stdout.
|
|
Otherwise flac will perform the desired operation on each input file to
|
|
similarly named output files (meaning for encoding, the extension will
|
|
be replaced with \[lq].flac\[rq], or appended with \[lq].flac\[rq] if
|
|
the input file has no extension, and for decoding, the extension will be
|
|
\[lq].wav\[rq] for WAVE output and \[lq].raw\[rq] for raw output).
|
|
The original file is not deleted unless \[en]delete-input-file is
|
|
specified.
|
|
.PP
|
|
If you are encoding/decoding from stdin to a file, you should use the -o
|
|
option like so:
|
|
.IP
|
|
.nf
|
|
\f[C]
|
|
flac [options] -o outputfile
|
|
flac -d [options] -o outputfile
|
|
\f[R]
|
|
.fi
|
|
.PP
|
|
which are better than:
|
|
.IP
|
|
.nf
|
|
\f[C]
|
|
flac [options] > outputfile
|
|
flac -d [options] > outputfile
|
|
\f[R]
|
|
.fi
|
|
.PP
|
|
since the former allows flac to seek backwards to write the STREAMINFO
|
|
or RIFF WAVE header contents when necessary.
|
|
.PP
|
|
Also, you can force output data to go to stdout using -c.
|
|
.PP
|
|
To encode or decode files that start with a dash, use \[en] to signal
|
|
the end of options, to keep the filenames themselves from being treated
|
|
as options:
|
|
.IP
|
|
.nf
|
|
\f[C]
|
|
flac -V -- -01-filename.wav
|
|
\f[R]
|
|
.fi
|
|
.PP
|
|
The encoding options affect the compression ratio and encoding speed.
|
|
The format options are used to tell flac the arrangement of samples if
|
|
the input file (or output file when decoding) is a raw file.
|
|
If it is a RIFF WAVE, Wave64, RF64, or AIFF file the format options are
|
|
not needed since they are read from the file\[cq]s header.
|
|
.PP
|
|
In test mode, flac acts just like in decode mode, except no output file
|
|
is written.
|
|
Both decode and test modes detect errors in the stream, but they also
|
|
detect when the MD5 signature of the decoded audio does not match the
|
|
stored MD5 signature, even when the bitstream is valid.
|
|
.PP
|
|
flac can also re-encode FLAC files.
|
|
In other words, you can specify a FLAC or Ogg FLAC file as an input to
|
|
the encoder and it will decoder it and re-encode it according to the
|
|
options you specify.
|
|
It will also preserve all the metadata unless you override it with other
|
|
options (e.g.
|
|
specifying new tags, seekpoints, cuesheet, padding, etc.).
|
|
.PP
|
|
flac has been tuned so that the default settings yield a good speed vs.
|
|
compression tradeoff for many kinds of input.
|
|
However, if you are looking to maximize the compression rate or speed,
|
|
or want to use the full power of FLAC\[cq]s metadata system, see the
|
|
page titled `About the FLAC Format' on the FLAC website.
|
|
.SH EXAMPLES
|
|
.PP
|
|
Some common \f[B]encoding\f[R] tasks using flac:
|
|
.TP
|
|
\f[B]\f[CB]flac abc.wav\f[B]\f[R]
|
|
Encode abc.wav to abc.flac using the default compression setting.
|
|
abc.wav is not deleted.
|
|
.TP
|
|
\f[B]\f[CB]flac --delete-input-file abc.wav\f[B]\f[R]
|
|
Like above, except abc.wav is deleted if there were no errors.
|
|
.TP
|
|
\f[B]\f[CB]flac --delete-input-file -w abc.wav\f[B]\f[R]
|
|
Like above, except abc.wav is deleted if there were no errors or
|
|
warnings.
|
|
.TP
|
|
\f[B]\f[CB]flac --best abc.wav\f[B]\f[R]
|
|
Encode abc.wav to abc.flac using the highest compression setting.
|
|
.TP
|
|
\f[B]\f[CB]flac --verify abc.wav\f[B]\f[R]
|
|
Encode abc.wav to abc.flac and internally decode abc.flac to make sure
|
|
it matches abc.wav.
|
|
.TP
|
|
\f[B]\f[CB]flac -o my.flac abc.wav\f[B]\f[R]
|
|
Encode abc.wav to my.flac.
|
|
.TP
|
|
\f[B]\f[CB]flac -T \[dq]TITLE=Bohemian Rhapsody\[dq] -T \[dq]ARTIST=Queen\[dq] abc.wav\f[B]\f[R]
|
|
Encode abc.wav and add some tags at the same time to abc.flac.
|
|
.TP
|
|
\f[B]\f[CB]flac *.wav\f[B]\f[R]
|
|
Encode all .wav files in the current directory.
|
|
.TP
|
|
\f[B]\f[CB]flac abc.aiff\f[B]\f[R]
|
|
Encode abc.aiff to abc.flac.
|
|
.TP
|
|
\f[B]\f[CB]flac abc.rf64\f[B]\f[R]
|
|
Encode abc.rf64 to abc.flac.
|
|
.TP
|
|
\f[B]\f[CB]flac abc.w64\f[B]\f[R]
|
|
Encode abc.w64 to abc.flac.
|
|
.TP
|
|
\f[B]\f[CB]flac abc.flac --force\f[B]\f[R]
|
|
This one\[cq]s a little tricky: notice that flac is in encode mode by
|
|
default (you have to specify -d to decode) so this command actually
|
|
recompresses abc.flac back to abc.flac.
|
|
\[en]force is needed to make sure you really want to overwrite abc.flac
|
|
with a new version.
|
|
Why would you want to do this?
|
|
It allows you to recompress an existing FLAC file with (usually) higher
|
|
compression options or a newer version of FLAC and preserve all the
|
|
metadata like tags too.
|
|
.PP
|
|
Some common \f[B]decoding\f[R] tasks using flac:
|
|
.TP
|
|
\f[B]\f[CB]flac -d abc.flac\f[B]\f[R]
|
|
Decode abc.flac to abc.wav.
|
|
abc.flac is not deleted.
|
|
NOTE: Without -d it means re-encode abc.flac to abc.flac (see above).
|
|
.PP
|
|
\f[C]flac -d --force-aiff-format abc.flac\f[R]
|
|
.PD 0
|
|
.P
|
|
.PD
|
|
\f[C]flac -d -o abc.aiff abc.flac\f[R] : Two different ways of decoding
|
|
abc.flac to abc.aiff (AIFF format).
|
|
abc.flac is not deleted.
|
|
.PP
|
|
\f[C]flac -d --force-rf64-format abc.flac\f[R]
|
|
.PD 0
|
|
.P
|
|
.PD
|
|
\f[C]flac -d -o abc.rf64 abc.flac\f[R] : Two different ways of decoding
|
|
abc.flac to abc.rf64 (RF64 format).
|
|
abc.flac is not deleted.
|
|
.PP
|
|
\f[C]flac -d --force-wave64-format abc.flac\f[R]
|
|
.PD 0
|
|
.P
|
|
.PD
|
|
\f[C]flac -d -o abc.w64 abc.flac\f[R] : Two different ways of decoding
|
|
abc.flac to abc.w64 (Wave64 format).
|
|
abc.flac is not deleted.
|
|
.TP
|
|
\f[B]\f[CB]flac -d -F abc.flac\f[B]\f[R]
|
|
Decode abc.flac to abc.wav and don\[cq]t abort if errors are found
|
|
(useful for recovering as much as possible from corrupted files).
|
|
.SH OPTIONS
|
|
.PP
|
|
A summary of options is included below.
|
|
For a complete description, see the HTML documentation.
|
|
.SS GENERAL OPTIONS
|
|
.TP
|
|
\f[B]-v, --version\f[R]
|
|
Show the flac version number
|
|
.TP
|
|
\f[B]-h, --help\f[R]
|
|
Show basic usage and a list of all options
|
|
.TP
|
|
\f[B]-H, --explain\f[R]
|
|
Show detailed explanation of usage and all options
|
|
.TP
|
|
\f[B]-d, --decode\f[R]
|
|
Decode (the default behavior is to encode)
|
|
.TP
|
|
\f[B]-t, --test\f[R]
|
|
Test a flac encoded file (same as -d except no decoded file is written)
|
|
.TP
|
|
\f[B]-a, --analyze\f[R]
|
|
Analyze a FLAC encoded file (same as -d except an analysis file is
|
|
written)
|
|
.TP
|
|
\f[B]-c, --stdout\f[R]
|
|
Write output to stdout
|
|
.TP
|
|
\f[B]-s, --silent\f[R]
|
|
Silent mode (do not write runtime encode/decode statistics to stderr)
|
|
.TP
|
|
\f[B]--totally-silent\f[R]
|
|
Do not print anything of any kind, including warnings or errors.
|
|
The exit code will be the only way to determine successful completion.
|
|
.TP
|
|
\f[B]--no-utf8-convert\f[R]
|
|
Do not convert tags from local charset to UTF-8.
|
|
This is useful for scripts, and setting tags in situations where the
|
|
locale is wrong.
|
|
This option must appear before any tag options!
|
|
.TP
|
|
\f[B]-w, --warnings-as-errors\f[R]
|
|
Treat all warnings as errors (which cause flac to terminate with a
|
|
non-zero exit code).
|
|
.TP
|
|
\f[B]-f, --force\f[R]
|
|
Force overwriting of output files.
|
|
By default, flac warns that the output file already exists and continues
|
|
to the next file.
|
|
.TP
|
|
\f[B]-o\f[R] \f[I]filename\f[R]\f[B], --output-name=\f[R]\f[I]filename\f[R]
|
|
Force the output file name (usually flac just changes the extension).
|
|
May only be used when encoding a single file.
|
|
May not be used in conjunction with --output-prefix.
|
|
.TP
|
|
\f[B]--output-prefix=\f[R]\f[I]string\f[R]
|
|
Prefix each output file name with the given string.
|
|
This can be useful for encoding or decoding files to a different
|
|
directory.
|
|
Make sure if your string is a path name that it ends with a trailing
|
|
\[ga]/\[cq] (slash).
|
|
.TP
|
|
\f[B]--delete-input-file\f[R]
|
|
Automatically delete the input file after a successful encode or decode.
|
|
If there was an error (including a verify error) the input file is left
|
|
intact.
|
|
.TP
|
|
\f[B]--preserve-modtime\f[R]
|
|
Output files have their timestamps/permissions set to match those of
|
|
their inputs (this is default).
|
|
Use --no-preserve-modtime to make output files have the current time and
|
|
default permissions.
|
|
.TP
|
|
\f[B]--keep-foreign-metadata\f[R]
|
|
If encoding, save WAVE, RF64, or AIFF non-audio chunks in FLAC metadata.
|
|
If decoding, restore any saved non-audio chunks from FLAC metadata when
|
|
writing the decoded file.
|
|
Foreign metadata cannot be transcoded, e.g.\ WAVE chunks saved in a FLAC
|
|
file cannot be restored when decoding to AIFF.
|
|
Input and output must be regular files (not stdin or stdout).
|
|
With this option, FLAC will pick the right output format on decoding.
|
|
.TP
|
|
\f[B]--keep-foreign-metadata-if-present\f[R]
|
|
Like --keep-foreign-metadata, but without throwing an error if foreign
|
|
metadata cannot be found or restored, instead printing a warning.
|
|
.TP
|
|
\f[B]--skip={\f[R]\f[I]#\f[R]\f[B]|\f[R]\f[I]mm:ss.ss\f[R]\f[B]}\f[R]
|
|
Skip over the first number of samples of the input.
|
|
This works for both encoding and decoding, but not testing.
|
|
The alternative form mm:ss.ss can be used to specify minutes, seconds,
|
|
and fractions of a second.
|
|
.TP
|
|
\f[B]--until={\f[R]\f[I]#\f[R]\f[B]|[\f[R]\f[I]+\f[R]\f[B]|\f[R]\f[I]-\f[R]\f[B]]\f[R]\f[I]mm:ss.ss\f[R]\f[B]}\f[R]
|
|
Stop at the given sample number for each input file.
|
|
This works for both encoding and decoding, but not testing.
|
|
The given sample number is not included in the decoded output.
|
|
The alternative form mm:ss.ss can be used to specify minutes, seconds,
|
|
and fractions of a second.
|
|
If a \[ga]+\[cq] (plus) sign is at the beginning, the --until point is
|
|
relative to the --skip point.
|
|
If a \[ga]-\[cq] (minus) sign is at the beginning, the --until point is
|
|
relative to end of the audio.
|
|
.TP
|
|
\f[B]--ogg\f[R]
|
|
When encoding, generate Ogg FLAC output instead of native FLAC.
|
|
Ogg FLAC streams are FLAC streams wrapped in an Ogg transport layer.
|
|
The resulting file should have an `.oga' extension and will still be
|
|
decodable by flac.
|
|
When decoding, force the input to be treated as Ogg FLAC.
|
|
This is useful when piping input from stdin or when the filename does
|
|
not end in `.oga' or `.ogg'.
|
|
.TP
|
|
\f[B]--serial-number=\f[R]\f[I]#\f[R]
|
|
When used with --ogg, specifies the serial number to use for the first
|
|
Ogg FLAC stream, which is then incremented for each additional stream.
|
|
When encoding and no serial number is given, flac uses a random number
|
|
for the first stream, then increments it for each additional stream.
|
|
When decoding and no number is given, flac uses the serial number of the
|
|
first page.
|
|
.SS ANALYSIS OPTIONS
|
|
.TP
|
|
\f[B]--residual-text\f[R]
|
|
Includes the residual signal in the analysis file.
|
|
This will make the file very big, much larger than even the decoded
|
|
file.
|
|
.TP
|
|
\f[B]--residual-gnuplot\f[R]
|
|
Generates a gnuplot file for every subframe; each file will contain the
|
|
residual distribution of the subframe.
|
|
This will create a lot of files.
|
|
.SS DECODING OPTIONS
|
|
.TP
|
|
\f[B]--cue=[\f[R]\f[I]#.#\f[R]\f[B]][-[\f[R]\f[I]#.#\f[R]\f[B]]]\f[R]
|
|
Set the beginning and ending cuepoints to decode.
|
|
The optional first #.# is the track and index point at which decoding
|
|
will start; the default is the beginning of the stream.
|
|
The optional second #.# is the track and index point at which decoding
|
|
will end; the default is the end of the stream.
|
|
If the cuepoint does not exist, the closest one before it (for the start
|
|
point) or after it (for the end point) will be used.
|
|
If those don\[cq]t exist, the start of the stream (for the start point)
|
|
or end of the stream (for the end point) will be used.
|
|
The cuepoints are merely translated into sample numbers then used as
|
|
--skip and --until.
|
|
A CD track can always be cued by, for example, --cue=9.1-10.1 for track
|
|
9, even if the CD has no 10th track.
|
|
.TP
|
|
\f[B]-F, --decode-through-errors\f[R]
|
|
By default flac stops decoding with an error and removes the partially
|
|
decoded file if it encounters a bitstream error.
|
|
With -F, errors are still printed but flac will continue decoding to
|
|
completion.
|
|
Note that errors may cause the decoded audio to be missing some samples
|
|
or have silent sections.
|
|
.TP
|
|
\f[B]--apply-replaygain-which-is-not-lossless[=<specification>]\f[R]
|
|
Applies ReplayGain values while decoding.
|
|
\f[B]WARNING: THIS IS NOT LOSSLESS. DECODED AUDIO WILL NOT BE IDENTICAL
|
|
TO THE ORIGINAL WITH THIS OPTION.\f[R] This option is useful for example
|
|
in transcoding media servers, where the client does not support
|
|
ReplayGain.
|
|
For details on the use of this option, see the section \f[B]ReplayGain
|
|
application specification\f[R].
|
|
.SS ENCODING OPTIONS
|
|
.TP
|
|
\f[B]-V, --verify\f[R]
|
|
Verify a correct encoding by decoding the output in parallel and
|
|
comparing to the original
|
|
.TP
|
|
\f[B]--lax\f[R]
|
|
Allow encoder to generate non-Subset files.
|
|
The resulting FLAC file may not be streamable or might have trouble
|
|
being played in all players (especially hardware devices), so you should
|
|
only use this option in combination with custom encoding options meant
|
|
for archival.
|
|
.TP
|
|
\f[B]--replay-gain\f[R]
|
|
Calculate ReplayGain values and store them as FLAC tags, similar to
|
|
vorbisgain.
|
|
Title gains/peaks will be computed for each input file, and an album
|
|
gain/peak will be computed for all files.
|
|
All input files must have the same resolution, sample rate, and number
|
|
of channels.
|
|
Only mono and stereo files are allowed, and the sample rate must be 8,
|
|
11.025, 12, 16, 18.9, 22.05, 24, 28, 32, 36, 37.8, 44.1, 48, 56, 64, 72,
|
|
75.6, 88.2, 96, 112, 128, 144, 151.2, 176.4, 192, 224, 256, 288, 302.4,
|
|
352.8, 384, 448, 512, 576, or 604.8 kHz.
|
|
Also note that this option may leave a few extra bytes in a PADDING
|
|
block as the exact size of the tags is not known until all files are
|
|
processed.
|
|
Note that this option cannot be used when encoding to standard output
|
|
(stdout).
|
|
.TP
|
|
\f[B]--cuesheet=\f[R]\f[I]filename\f[R]
|
|
Import the given cuesheet file and store it in a CUESHEET metadata
|
|
block.
|
|
This option may only be used when encoding a single file.
|
|
A seekpoint will be added for each index point in the cuesheet to the
|
|
SEEKTABLE unless --no-cued-seekpoints is specified.
|
|
.TP
|
|
\f[B]--picture={\f[R]\f[I]FILENAME\f[R]\f[B]|\f[R]\f[I]SPECIFICATION\f[R]\f[B]}\f[R]
|
|
Import a picture and store it in a PICTURE metadata block.
|
|
More than one --picture option can be specified.
|
|
Either a filename for the picture file or a more complete specification
|
|
form can be used.
|
|
The SPECIFICATION is a string whose parts are separated by | (pipe)
|
|
characters.
|
|
Some parts may be left empty to invoke default values.
|
|
FILENAME is just shorthand for \[lq]||||FILENAME\[rq].
|
|
For the format of SPECIFICATION, see the section \f[B]picture
|
|
specification\f[R].
|
|
.TP
|
|
\f[B]--ignore-chunk-sizes\f[R]
|
|
When encoding to flac, ignore the file size headers in WAV and AIFF
|
|
files to attempt to work around problems with over-sized or malformed
|
|
files.
|
|
WAV and AIFF files both have an unsigned 32 bit numbers in the file
|
|
header which specifes the length of audio data.
|
|
Since this number is unsigned 32 bits, that limits the size of a valid
|
|
file to being just over 4 Gigabytes.
|
|
Files larger than this are mal-formed, but should be read correctly
|
|
using this option.
|
|
.TP
|
|
\f[B]-S {\f[R]\f[I]#\f[R]\f[B]|\f[R]\f[I]X\f[R]\f[B]|\f[R]\f[I]#x\f[R]\f[B]|\f[R]\f[I]#s\f[R]\f[B]}, --seekpoint={\f[R]\f[I]#\f[R]\f[B]|\f[R]\f[I]X\f[R]\f[B]|\f[R]\f[I]#x\f[R]\f[B]|\f[R]\f[I]#s\f[R]\f[B]}\f[R]
|
|
Include a point or points in a SEEKTABLE.
|
|
Using #, a seek point at that sample number is added.
|
|
Using X, a placeholder point is added at the end of a the table.
|
|
Using #x, # evenly spaced seek points will be added, the first being at
|
|
sample 0.
|
|
Using #s, a seekpoint will be added every # seconds (# does not have to
|
|
be a whole number; it can be, for example, 9.5, meaning a seekpoint
|
|
every 9.5 seconds).
|
|
You may use many -S options; the resulting SEEKTABLE will be the
|
|
unique-ified union of all such values.
|
|
With no -S options, flac defaults to `-S 10s'.
|
|
Use --no-seektable for no SEEKTABLE.
|
|
Note: `-S #x' and `-S #s' will not work if the encoder can\[cq]t
|
|
determine the input size before starting.
|
|
Note: if you use `-S #' and # is >= samples in the input, there will be
|
|
either no seek point entered (if the input size is determinable before
|
|
encoding starts) or a placeholder point (if input size is not
|
|
determinable).
|
|
.TP
|
|
\f[B]-P\f[R] \f[I]#\f[R]\f[B], --padding=\f[R]\f[I]#\f[R]
|
|
Tell the encoder to write a PADDING metadata block of the given length
|
|
(in bytes) after the STREAMINFO block.
|
|
This is useful if you plan to tag the file later with an APPLICATION
|
|
block; instead of having to rewrite the entire file later just to insert
|
|
your block, you can write directly over the PADDING block.
|
|
Note that the total length of the PADDING block will be 4 bytes longer
|
|
than the length given because of the 4 metadata block header bytes.
|
|
You can force no PADDING block at all to be written with --no-padding.
|
|
The encoder writes a PADDING block of 8192 bytes by default (or 65536
|
|
bytes if the input audio stream is more that 20 minutes long).
|
|
.TP
|
|
\f[B]-T\f[R] \f[I]FIELD=VALUE\f[R]\f[B], --tag=\f[R]\f[I]FIELD=VALUE\f[R]
|
|
Add a FLAC tag.
|
|
The comment must adhere to the Vorbis comment spec; i.e.\ the FIELD must
|
|
contain only legal characters, terminated by an `equals' sign.
|
|
Make sure to quote the comment if necessary.
|
|
This option may appear more than once to add several comments.
|
|
NOTE: all tags will be added to all encoded files.
|
|
.TP
|
|
\f[B]--tag-from-file=\f[R]\f[I]FIELD=FILENAME\f[R]
|
|
Like --tag, except FILENAME is a file whose contents will be read
|
|
verbatim to set the tag value.
|
|
The contents will be converted to UTF-8 from the local charset.
|
|
This can be used to store a cuesheet in a tag
|
|
(e.g.\ --tag-from-file=\[lq]CUESHEET=image.cue\[rq]).
|
|
Do not try to store binary data in tag fields! Use APPLICATION blocks
|
|
for that.
|
|
.TP
|
|
\f[B]-b\f[R] \f[I]#\f[R]\f[B], --blocksize=\f[R]\f[I]#\f[R]
|
|
Specify the blocksize in samples.
|
|
The default is 1152 for -l 0, else 4096.
|
|
For subset streams this must be <= 4608 if the samplerate <= 48kHz, for
|
|
subset streams with higher samplerates it must be <= 16384.
|
|
.TP
|
|
\f[B]-m, --mid-side\f[R]
|
|
Try mid-side coding for each frame (stereo input only)
|
|
.TP
|
|
\f[B]-M, --adaptive-mid-side\f[R]
|
|
Adaptive mid-side coding for all frames (stereo input only)
|
|
.TP
|
|
\f[B]-0..-8, --compression-level-0..--compression-level-8\f[R]
|
|
Fastest compression..highest compression (default is -5).
|
|
These are synonyms for other options:
|
|
.TP
|
|
\f[B]-0, --compression-level-0\f[R]
|
|
Synonymous with -l 0 -b 1152 -r 3 --no-mid-side
|
|
.TP
|
|
\f[B]-1, --compression-level-1\f[R]
|
|
Synonymous with -l 0 -b 1152 -M -r 3
|
|
.TP
|
|
\f[B]-2, --compression-level-2\f[R]
|
|
Synonymous with -l 0 -b 1152 -m -r 3
|
|
.TP
|
|
\f[B]-3, --compression-level-3\f[R]
|
|
Synonymous with -l 6 -b 4096 -r 4 --no-mid-side
|
|
.TP
|
|
\f[B]-4, --compression-level-4\f[R]
|
|
Synonymous with -l 8 -b 4096 -M -r 4
|
|
.TP
|
|
\f[B]-5, --compression-level-5\f[R]
|
|
Synonymous with -l 8 -b 4096 -m -r 5
|
|
.TP
|
|
\f[B]-6, --compression-level-6\f[R]
|
|
Synonymous with -l 8 -b 4096 -m -r 6 -A subdivide_tukey(2)
|
|
.TP
|
|
\f[B]-7, --compression-level-7\f[R]
|
|
Synonymous with -l 12 -b 4096 -m -r 6 -A subdivide_tukey(2)
|
|
.TP
|
|
\f[B]-8, --compression-level-8\f[R]
|
|
Synonymous with -l 12 -b 4096 -m -r 6 -A subdivide_tukey(3)
|
|
.TP
|
|
\f[B]--fast\f[R]
|
|
Fastest compression.
|
|
Currently synonymous with -0.
|
|
.TP
|
|
\f[B]--best\f[R]
|
|
Highest compression.
|
|
Currently synonymous with -8.
|
|
.TP
|
|
\f[B]-e, --exhaustive-model-search\f[R]
|
|
Do exhaustive model search (expensive!)
|
|
.TP
|
|
\f[B]-A\f[R] \f[I]function\f[R]\f[B], --apodization=\f[R]\f[I]function\f[R]
|
|
Window audio data with given the apodization function.
|
|
See section \f[B]Apodization functions\f[R] for details.
|
|
.TP
|
|
\f[B]-l\f[R] \f[I]#\f[R]\f[B], --max-lpc-order=\f[R]\f[I]#\f[R]
|
|
Specifies the maximum LPC order.
|
|
This number must be <= 32.
|
|
For subset streams, it must be <=12 if the sample rate is <=48kHz.
|
|
If 0, the encoder will not attempt generic linear prediction, and use
|
|
only fixed predictors.
|
|
Using fixed predictors is faster but usually results in files being
|
|
5-10% larger.
|
|
.TP
|
|
\f[B]-p, --qlp-coeff-precision-search\f[R]
|
|
Do exhaustive search of LP coefficient quantization (expensive!).
|
|
Overrides -q; does nothing if using -l 0
|
|
.TP
|
|
\f[B]-q\f[R] \f[I]#\f[R]\f[B], --qlp-coeff-precision=\f[R]\f[I]#\f[R]
|
|
Precision of the quantized linear-predictor coefficients, 0 => let
|
|
encoder decide (min is 5, default is 0)
|
|
.TP
|
|
\f[B]-r [\f[R]\f[I]#\f[R]\f[B],]\f[R]\f[I]#\f[R]\f[B], --rice-partition-order=[\f[R]\f[I]#\f[R]\f[B],]\f[R]\f[I]#\f[R]
|
|
Set the [min,]max residual partition order (0..15).
|
|
min defaults to 0 if unspecified.
|
|
Default is -r 5.
|
|
.SS FORMAT OPTIONS
|
|
.TP
|
|
\f[B]--endian={\f[R]\f[I]big\f[R]\f[B]|\f[R]\f[I]little\f[R]\f[B]}\f[R]
|
|
Set the byte order for samples
|
|
.TP
|
|
\f[B]--channels=\f[R]\f[I]#\f[R]
|
|
Set number of channels.
|
|
.TP
|
|
\f[B]--bps=\f[R]\f[I]#\f[R]
|
|
Set bits per sample.
|
|
.TP
|
|
\f[B]--sample-rate=\f[R]\f[I]#\f[R]
|
|
Set sample rate (in Hz).
|
|
.TP
|
|
\f[B]--sign={\f[R]\f[I]signed\f[R]\f[B]|\f[R]\f[I]unsigned\f[R]\f[B]}\f[R]
|
|
Set the sign of samples.
|
|
.TP
|
|
\f[B]--input-size=\f[R]\f[I]#\f[R]
|
|
Specify the size of the raw input in bytes.
|
|
If you are encoding raw samples from stdin, you must set this option in
|
|
order to be able to use --skip, --until, --cuesheet, or other options
|
|
that need to know the size of the input beforehand.
|
|
If the size given is greater than what is found in the input stream, the
|
|
encoder will complain about an unexpected end-of-file.
|
|
If the size given is less, samples will be truncated.
|
|
.TP
|
|
\f[B]--force-raw-format\f[R]
|
|
Force input (when encoding) or output (when decoding) to be treated as
|
|
raw samples (even if filename ends in \f[I].wav\f[R]).
|
|
.PP
|
|
\f[B]--force-aiff-format\f[R]
|
|
.PD 0
|
|
.P
|
|
.PD
|
|
\f[B]--force-rf64-format\f[R]
|
|
.PD 0
|
|
.P
|
|
.PD
|
|
\f[B]--force-wave64-format\f[R] : Force the decoder to output
|
|
AIFF/RF64/WAVE64 format respectively.
|
|
This option is not needed if the output filename (as set by -o) ends
|
|
with \f[I].aif\f[R] or \f[I].aiff\f[R], \f[I].rf64\f[R] and
|
|
\f[I].w64\f[R] respectively.
|
|
Also, this option has no effect when encoding since input is
|
|
auto-detected.
|
|
When none of these options nor \[en]keep-foreign-metadata are given and
|
|
no output filename is set, the output format is WAV by default.
|
|
.PP
|
|
\f[B]--force-legacy-wave-format\f[R]
|
|
.PD 0
|
|
.P
|
|
.PD
|
|
\f[B]--force-extensible-wave-format\f[R] : Instruct the decoder to
|
|
output a WAVE file with WAVE_FORMAT_PCM and WAVE_FORMAT_EXTENSIBLE
|
|
respectively.
|
|
If none of these options nor \[en]keep-foreign-metadata are given, FLAC
|
|
outputs WAVE_FORMAT_PCM for mono or stereo with a bit depth of 8 or 16
|
|
bits, and WAVE_FORMAT_EXTENSIBLE for all other audio formats.
|
|
.PP
|
|
\f[B]--force-aiff-c-none-format\f[R]
|
|
.PD 0
|
|
.P
|
|
.PD
|
|
\f[B]--force-aiff-c-sowt-format\f[R] : Instruct the decoder to output an
|
|
AIFF-C file with format NONE and sowt respectively.
|
|
.SS NEGATIVE OPTIONS
|
|
.PP
|
|
\f[B]--no-adaptive-mid-side\f[R]
|
|
.PD 0
|
|
.P
|
|
.PD
|
|
\f[B]--no-cued-seekpoints\f[R]
|
|
.PD 0
|
|
.P
|
|
.PD
|
|
\f[B]--no-decode-through-errors\f[R]
|
|
.PD 0
|
|
.P
|
|
.PD
|
|
\f[B]--no-delete-input-file\f[R]
|
|
.PD 0
|
|
.P
|
|
.PD
|
|
\f[B]--no-preserve-modtime\f[R]
|
|
.PD 0
|
|
.P
|
|
.PD
|
|
\f[B]--no-keep-foreign-metadata\f[R]
|
|
.PD 0
|
|
.P
|
|
.PD
|
|
\f[B]--no-exhaustive-model-search\f[R]
|
|
.PD 0
|
|
.P
|
|
.PD
|
|
\f[B]--no-force\f[R]
|
|
.PD 0
|
|
.P
|
|
.PD
|
|
\f[B]--no-lax\f[R]
|
|
.PD 0
|
|
.P
|
|
.PD
|
|
\f[B]--no-mid-side\f[R]
|
|
.PD 0
|
|
.P
|
|
.PD
|
|
\f[B]--no-ogg\f[R]
|
|
.PD 0
|
|
.P
|
|
.PD
|
|
\f[B]--no-padding\f[R]
|
|
.PD 0
|
|
.P
|
|
.PD
|
|
\f[B]--no-qlp-coeff-prec-search\f[R]
|
|
.PD 0
|
|
.P
|
|
.PD
|
|
\f[B]--no-replay-gain\f[R]
|
|
.PD 0
|
|
.P
|
|
.PD
|
|
\f[B]--no-residual-gnuplot\f[R]
|
|
.PD 0
|
|
.P
|
|
.PD
|
|
\f[B]--no-residual-text\f[R]
|
|
.PD 0
|
|
.P
|
|
.PD
|
|
\f[B]--no-seektable\f[R]
|
|
.PD 0
|
|
.P
|
|
.PD
|
|
\f[B]--no-silent\f[R]
|
|
.PD 0
|
|
.P
|
|
.PD
|
|
\f[B]--no-verify\f[R]
|
|
.PD 0
|
|
.P
|
|
.PD
|
|
\f[B]--no-warnings-as-errors\f[R]
|
|
.PP
|
|
These flags can be used to invert the sense of the corresponding normal
|
|
option.
|
|
.SS ReplayGain application specification
|
|
.PP
|
|
The option
|
|
--apply-replaygain-which-is-not-lossless[=<specification>]\f[B] applies
|
|
ReplayGain values while decoding. \f[R]WARNING: THIS IS NOT LOSSLESS.
|
|
DECODED AUDIO WILL NOT BE IDENTICAL TO THE ORIGINAL WITH THIS OPTION.**
|
|
This option is useful for example in transcoding media servers, where
|
|
the client does not support ReplayGain.
|
|
.PP
|
|
The equals sign and <specification> is optional.
|
|
If omitted, the default specification is 0aLn1.
|
|
.PP
|
|
The <specification> is a shorthand notation for describing how to apply
|
|
ReplayGain.
|
|
All components are optional but order is important.
|
|
`[]' means `optional'.
|
|
`|' means `or'.
|
|
`{}' means required.
|
|
The format is:
|
|
.PP
|
|
[<preamp>][a|t][l|L][n{0|1|2|3}]
|
|
.PP
|
|
In which the following parameters are used:
|
|
.IP \[bu] 2
|
|
\f[B]preamp\f[R]: A floating point number in dB.
|
|
This is added to the existing gain value.
|
|
.IP \[bu] 2
|
|
\f[B]a|t\f[R]: Specify `a' to use the album gain, or `t' to use the
|
|
track gain.
|
|
If tags for the preferred kind (album/track) do not exist but tags for
|
|
the other (track/album) do, those will be used instead.
|
|
.IP \[bu] 2
|
|
\f[B]l|L\f[R]: Specify `l' to peak-limit the output, so that the
|
|
ReplayGain peak value is full-scale.
|
|
Specify `L' to use a 6dB hard limiter that kicks in when the signal
|
|
approaches full-scale.
|
|
.IP \[bu] 2
|
|
\f[B]n{0|1|2|3}\f[R]: Specify the amount of noise shaping.
|
|
ReplayGain synthesis happens in floating point; the result is dithered
|
|
before converting back to integer.
|
|
This quantization adds noise.
|
|
Noise shaping tries to move the noise where you won\[cq]t hear it as
|
|
much.
|
|
0 means no noise shaping, 1 means `low', 2 means `medium', 3 means
|
|
`high'.
|
|
.PP
|
|
For example, the default of 0aLn1 means 0dB preamp, use album gain, 6dB
|
|
hard limit, low noise shaping.
|
|
--apply-replaygain-which-is-not-lossless=3 means 3dB preamp, use album
|
|
gain, no limiting, no noise shaping.
|
|
.PP
|
|
flac uses the ReplayGain tags for the calculation.
|
|
If a stream does not have the required tags or they can\[cq]t be parsed,
|
|
decoding will continue with a warning, and no ReplayGain is applied to
|
|
that stream.
|
|
.SS Picture specification
|
|
.PP
|
|
This described the specification used for the \f[B]--picture\f[R]
|
|
option.
|
|
[TYPE]|[MIME-TYPE]|[DESCRIPTION]|[WIDTHxHEIGHTxDEPTH[/COLORS]]|FILE
|
|
.PP
|
|
TYPE is optional; it is a number from one of:
|
|
.IP " 0." 4
|
|
Other
|
|
.IP " 1." 4
|
|
32x32 pixels `file icon' (PNG only)
|
|
.IP " 2." 4
|
|
Other file icon
|
|
.IP " 3." 4
|
|
Cover (front)
|
|
.IP " 4." 4
|
|
Cover (back)
|
|
.IP " 5." 4
|
|
Leaflet page
|
|
.IP " 6." 4
|
|
Media (e.g.\ label side of CD)
|
|
.IP " 7." 4
|
|
Lead artist/lead performer/soloist
|
|
.IP " 8." 4
|
|
Artist/performer
|
|
.IP " 9." 4
|
|
Conductor
|
|
.IP "10." 4
|
|
Band/Orchestra
|
|
.IP "11." 4
|
|
Composer
|
|
.IP "12." 4
|
|
Lyricist/text writer
|
|
.IP "13." 4
|
|
Recording Location
|
|
.IP "14." 4
|
|
During recording
|
|
.IP "15." 4
|
|
During performance
|
|
.IP "16." 4
|
|
Movie/video screen capture
|
|
.IP "17." 4
|
|
A bright coloured fish
|
|
.IP "18." 4
|
|
Illustration
|
|
.IP "19." 4
|
|
Band/artist logotype
|
|
.IP "20." 4
|
|
Publisher/Studio logotype
|
|
.PP
|
|
The default is 3 (front cover).
|
|
There may only be one picture each of type 1 and 2 in a file.
|
|
.PP
|
|
MIME-TYPE is optional; if left blank, it will be detected from the file.
|
|
For best compatibility with players, use pictures with MIME type
|
|
image/jpeg or image/png.
|
|
The MIME type can also be --> to mean that FILE is actually a URL to an
|
|
image, though this use is discouraged.
|
|
.PP
|
|
DESCRIPTION is optional; the default is an empty string.
|
|
.PP
|
|
The next part specifies the resolution and color information.
|
|
If the MIME-TYPE is image/jpeg, image/png, or image/gif, you can usually
|
|
leave this empty and they can be detected from the file.
|
|
Otherwise, you must specify the width in pixels, height in pixels, and
|
|
color depth in bits-per-pixel.
|
|
If the image has indexed colors you should also specify the number of
|
|
colors used.
|
|
When manually specified, it is not checked against the file for
|
|
accuracy.
|
|
.PP
|
|
FILE is the path to the picture file to be imported, or the URL if MIME
|
|
type is -->
|
|
.PP
|
|
For example, \[lq]|image/jpeg|||../cover.jpg\[rq] will embed the JPEG
|
|
file at ../cover.jpg, defaulting to type 3 (front cover) and an empty
|
|
description.
|
|
The resolution and color info will be retrieved from the file itself.
|
|
.PP
|
|
The specification
|
|
\[lq]4|-->|CD|320x300x24/173|http://blah.blah/backcover.tiff\[rq] will
|
|
embed the given URL, with type 4 (back cover), description \[lq]CD\[rq],
|
|
and a manually specified resolution of 320x300, 24 bits-per-pixel, and
|
|
173 colors.
|
|
The file at the URL will not be fetched; the URL itself is stored in the
|
|
PICTURE metadata block.
|
|
.SS Apodization functions
|
|
.PP
|
|
To improve LPC analysis, audio data is windowed .
|
|
The window can be selected with one or more \f[B]-A\f[R] options.
|
|
Possible functions are: bartlett, bartlett_hann, blackman,
|
|
blackman_harris_4term_92db, connes, flattop, gauss(STDDEV), hamming,
|
|
hann, kaiser_bessel, nuttall, rectangle, triangle, tukey(P),
|
|
partial_tukey(n[/ov[/P]]), punchout_tukey(n[/ov[/P]]),
|
|
subdivide_tukey(n[/P]) welch.
|
|
.IP \[bu] 2
|
|
For gauss(STDDEV), STDDEV is the standard deviation (0<STDDEV<=0.5).
|
|
.IP \[bu] 2
|
|
For tukey(P), P specifies the fraction of the window that is tapered
|
|
(0<=P<=1; P=0 corresponds to \[lq]rectangle\[rq] and P=1 corresponds to
|
|
\[lq]hann\[rq]).
|
|
.IP \[bu] 2
|
|
For partial_tukey(n) and punchout_tukey(n), n apodization functions are
|
|
added that span different parts of each block.
|
|
Values of 2 to 6 seem to yield sane results.
|
|
If necessary, an overlap can be specified, as can be the taper
|
|
parameter, for example partial_tukey(2/0.2) or partial_tukey(2/0.2/0.5).
|
|
ov should be smaller than 1 and can be negative.
|
|
The use of this is that different parts of a block are ignored as the
|
|
might contain transients which are hard to predict anyway.
|
|
The encoder will try each different added apodization (each covering a
|
|
different part of the block) to see which resulting predictor results in
|
|
the smallest representation.
|
|
.IP \[bu] 2
|
|
subdivide_tukey(n) is a more efficient reimplementation of partial_tukey
|
|
and punchout_tukey taken together, recycling as much data as possible.
|
|
It combines all possible non-redundant partial_tukey(n) and
|
|
punchout_tukey(n) up to the n specified.
|
|
Specifying subdivide_tukey(3) is equivalent to specifying tukey,
|
|
partial_tukey(2), partial_tukey(3) and punchout_tukey(3), specifying
|
|
subdivide_tukey(5) equivalently adds partial_tukey(4),
|
|
punchout_tukey(4), partial_tukey(5) and punchout_tukey(5).
|
|
To be able to reuse data as much as possible, the tukey taper is taken
|
|
equal for all windows, and the P specified is applied for the smallest
|
|
used window.
|
|
In other words, subdivide_tukey(2/0.5) results in a taper equal to that
|
|
of tukey(0.25) and subdivide_tukey(5) in a taper equal to that of
|
|
tukey(0.1).
|
|
The default P for subdivide_tukey when none is specified is 0.5.
|
|
.PP
|
|
Note that P, STDDEV and ov are locale specific, so a comma as decimal
|
|
separator might be required instead of a dot.
|
|
Use scientific notation for a locale-independent specification, for
|
|
example tukey(5e-1) instead of tukey(0.5) or tukey(0,5).
|
|
.PP
|
|
More than one -A option (up to 32) may be used.
|
|
Any function that is specified erroneously is silently dropped.
|
|
The encoder chooses suitable defaults in the absence of any -A options;
|
|
any -A option specified replaces the default(s).
|
|
.PP
|
|
When more than one function is specified, then for every subframe the
|
|
encoder will try each of them separately and choose the window that
|
|
results in the smallest compressed subframe.
|
|
Multiple functions can greatly increase the encoding time.
|
|
.SH SEE ALSO
|
|
.PP
|
|
\f[B]metaflac(1)\f[R]
|
|
.SH AUTHOR
|
|
.PP
|
|
This manual page was initially written by Matt Zimmerman
|
|
<mdz\[at]debian.org> for the Debian GNU/Linux system (but may be used by
|
|
others).
|
|
It has been kept up-to-date by the Xiph.org Foundation.
|