Free Lossless Audio Codec: Unterschied zwischen den Versionen

Aus Mikiwiki
Wechseln zu: Navigation, Suche
(Verwendung)
Zeile 39: Zeile 39:
 
  $ <b>flac --decode --cue=03.01-04.00 -o 03.wav file.flac</b>
 
  $ <b>flac --decode --cue=03.01-04.00 -o 03.wav file.flac</b>
 
  ...
 
  ...
 +
 +
== FAQ ==
 +
 +
=== Got error code 0:FLAC__STREAM_DECODER_ERROR_STATUS_LOST_SYNC ===
 +
 +
$ <b>flac -t file.flac</b>
 +
<pre>
 +
flac 1.3.2
 +
Copyright (C) 2000-2009  Josh Coalson, 2011-2016  Xiph.Org Foundation
 +
flac comes with ABSOLUTELY NO WARRANTY.  This is free software, and you are
 +
welcome to redistribute it under certain conditions.  Type `flac' for details.
 +
 +
file.flac: *** Got error code 0:FLAC__STREAM_DECODER_ERROR_STATUS_LOST_SYNC
 +
 +
 +
file.flac: ERROR while decoding data
 +
                                                          state = FLAC__STREAM_DECODER_ABORTED
 +
</pre>
 +
 +
$ <b>flac --decode file.flac</b>
 +
<pre>
 +
flac 1.3.2
 +
Copyright (C) 2000-2009  Josh Coalson, 2011-2016  Xiph.Org Foundation
 +
flac comes with ABSOLUTELY NO WARRANTY.  This is free software, and you are
 +
welcome to redistribute it under certain conditions.  Type `flac' for details.
 +
 +
file.flac: *** Got error code 0:FLAC__STREAM_DECODER_ERROR_STATUS_LOST_SYNC
 +
 +
 +
file.flac: ERROR while decoding data
 +
                                                          state = FLAC__STREAM_DECODER_ABORTED
 +
</pre>
  
 
== Weblinks ==
 
== Weblinks ==

Version vom 25. November 2022, 00:19 Uhr

Der Audiocodec Free Lossless Audio Codec / FLAC (dt. "Freier verlustfreier Audiocodec") komprimiert Audiodaten ohne Qualitätsverlust. Als Metadatenformat wird Vorbiscomment benutzt. FLAC wird von zahlreichen Programmen unterstützt, bei Hardware sieht es schlechter aus.

Am 29. Januar 2003 kündigte Xiph.org an, FLAC in ihr Containerformat zu integrieren, um so neben Ogg Vorbis auch verlustfreie Kompression zu ermöglichen.

Verwendung

FLAC-Datei "file.flac" in WAV-Datei "file.wav" umwandeln.

$ flac --decode file.flac

FLAC-Datei "file.flac" anhand einer CUE-Datei "flac.cue" auseinanderschneiden. Die FLAC-Ausgabedateien werden "split-track01.flac", "split-track02.flac" usw. heissen.

$ cuebreakpoints file.cue | shnsplit -o flac file.flac

Folgender Befehl soll angeblich dasselbe bewirken. In meinen Tests war das Ergebnis aber immer eine einzelne WAV-Datei namens "file.wav".

$ flac --decode --cue=- file.flac

FLAC-Datei "file.flac" in MP3-Datei (128kbps, high quality) "file.mp3" umwandeln.

$ flac --decode --stdout file.flac | lame -h - file.mp3

Beispiel

Es liegen eine Datei "file.flac" und eine Datei "file.cue" vor - offensichtlich sind in der FLAC-Datei mehrere Stücke verborgen. Diese sollen als einzelne Dateien dekodiert werden.

1. Dekodieren der Datei "file.flac" im WAV-Format. Ausgegeben wird die Datei "file.wav".

$ flac --decode -o file.wav file.flac

2. Die Informationen der CUE-Datei werden beim erneuten Kodieren der Datei "file.wav" direkt in die neue Datei "file.flac" geschrieben.

$ flac --cuesheet=file.cue file.wav

3. Nun können die einzelnen Stücke ins WAV-Format dekodiert werden. Gemäss den Angaben in der CUE-Datei wird Stück "01" vom Indexpunkt "01" ("01.01") bis zum Stück "02" Indexpunkt "00" ("02.00") dekodiert. Ausgegeben wird die Datei "01.wav". Analog wird mit den weiteren Stücken verfahren.

$ flac --decode --cue=01.01-02.00 -o 01.wav file.flac
$ flac --decode --cue=02.01-03.00 -o 02.wav file.flac
$ flac --decode --cue=03.01-04.00 -o 03.wav file.flac
...

FAQ

Got error code 0:FLAC__STREAM_DECODER_ERROR_STATUS_LOST_SYNC

$ flac -t file.flac
 
flac 1.3.2
Copyright (C) 2000-2009  Josh Coalson, 2011-2016  Xiph.Org Foundation
flac comes with ABSOLUTELY NO WARRANTY.  This is free software, and you are
welcome to redistribute it under certain conditions.  Type `flac' for details.

file.flac: *** Got error code 0:FLAC__STREAM_DECODER_ERROR_STATUS_LOST_SYNC


file.flac: ERROR while decoding data
                                                           state = FLAC__STREAM_DECODER_ABORTED
$ flac --decode file.flac
flac 1.3.2
Copyright (C) 2000-2009  Josh Coalson, 2011-2016  Xiph.Org Foundation
flac comes with ABSOLUTELY NO WARRANTY.  This is free software, and you are
welcome to redistribute it under certain conditions.  Type `flac' for details.

file.flac: *** Got error code 0:FLAC__STREAM_DECODER_ERROR_STATUS_LOST_SYNC


file.flac: ERROR while decoding data
                                                           state = FLAC__STREAM_DECODER_ABORTED

Weblinks

Herausgeber Sprache Webseitentitel Anmerkungen
country US.gif Sourceforge eng FLAC (Free Lossless Audio Codec)wbm
country DE.gif Wikipedia ger Free Lossless Audio Codecwbm Enzyklopädischer Artikel