<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://halfgeek.org/wiki/index.php?action=history&amp;feed=atom&amp;title=FLAC</id>
	<title>FLAC - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://halfgeek.org/wiki/index.php?action=history&amp;feed=atom&amp;title=FLAC"/>
	<link rel="alternate" type="text/html" href="https://halfgeek.org/wiki/index.php?title=FLAC&amp;action=history"/>
	<updated>2026-05-28T12:22:15Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.34.0</generator>
	<entry>
		<id>https://halfgeek.org/wiki/index.php?title=FLAC&amp;diff=314&amp;oldid=prev</id>
		<title>161.253.47.104 at 16:32, 22 November 2005</title>
		<link rel="alternate" type="text/html" href="https://halfgeek.org/wiki/index.php?title=FLAC&amp;diff=314&amp;oldid=prev"/>
		<updated>2005-11-22T16:32:04Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 16:32, 22 November 2005&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot; &gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#039;&amp;#039;&amp;#039;Free Lossless Audio Codec&amp;#039;&amp;#039;&amp;#039; (or &amp;#039;&amp;#039;&amp;#039;FLAC&amp;#039;&amp;#039;&amp;#039;) is just that.  The reference implementation is available at http://flac.sf.net/.&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#039;&amp;#039;&amp;#039;Free Lossless Audio Codec&amp;#039;&amp;#039;&amp;#039; (or &amp;#039;&amp;#039;&amp;#039;FLAC&amp;#039;&amp;#039;&amp;#039;) is just that.  The reference implementation is available at http://flac.sf.net/.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;=Archiving all WAVs in a directory=&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt; flac --best --verify --delete-input-file *.wav&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;This will delete the originals if and only if the compression and verification are successful.  Since -f is not specified, it will also skip a file if the corresponding output filename already exists.  (It might be useful to create a more complex script for this.)&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=Encoding=&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=Encoding=&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key halfgeek_org_1-kb2_:diff::1.12:old-313:rev-314 --&gt;
&lt;/table&gt;</summary>
		<author><name>161.253.47.104</name></author>
		
	</entry>
	<entry>
		<id>https://halfgeek.org/wiki/index.php?title=FLAC&amp;diff=313&amp;oldid=prev</id>
		<title>161.253.47.104 at 16:22, 22 November 2005</title>
		<link rel="alternate" type="text/html" href="https://halfgeek.org/wiki/index.php?title=FLAC&amp;diff=313&amp;oldid=prev"/>
		<updated>2005-11-22T16:22:32Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;#039;&amp;#039;&amp;#039;Free Lossless Audio Codec&amp;#039;&amp;#039;&amp;#039; (or &amp;#039;&amp;#039;&amp;#039;FLAC&amp;#039;&amp;#039;&amp;#039;) is just that.  The reference implementation is available at http://flac.sf.net/.&lt;br /&gt;
&lt;br /&gt;
=Encoding=&lt;br /&gt;
&lt;br /&gt;
Typical:&lt;br /&gt;
&lt;br /&gt;
 flac --verify --best -o dst.flac src.wav&lt;br /&gt;
&lt;br /&gt;
flac&amp;#039;s encoder seems to have at least some default.  It is okay to encode a WAV file by&lt;br /&gt;
&lt;br /&gt;
 flac src.wav&lt;br /&gt;
&lt;br /&gt;
which results in src.flac.  If src.flac already exists, flac won&amp;#039;t write without -f set.&lt;br /&gt;
&lt;br /&gt;
flac will encode multiple source files if no output filename is set.&lt;br /&gt;
&lt;br /&gt;
 flac *.wav&lt;br /&gt;
&lt;br /&gt;
You&amp;#039;ll probably want --verify (that result is same as original) and --best (compression) set.&lt;br /&gt;
&lt;br /&gt;
 flac --verify --best *.wav&lt;br /&gt;
&lt;br /&gt;
If archiving, --delete-input-file may be useful.  This option won&amp;#039;t delete the input if the encode/decode doesn&amp;#039;t go as planned.&lt;br /&gt;
&lt;br /&gt;
Specifying --output-prefix=somedir/ will prepend &amp;quot;somedir/&amp;quot; to the normal output filename, effectively specifying an output directory.&lt;br /&gt;
&lt;br /&gt;
-o or --output-name= allows specifying an output file.&lt;br /&gt;
&lt;br /&gt;
--tag=FIELD=VALUE adds a Vorbis comment.  More than one of these can be specified per run.  However, all tags are applied to all encodings done for that run.&lt;br /&gt;
&lt;br /&gt;
=Decoding=&lt;br /&gt;
&lt;br /&gt;
Typical:&lt;br /&gt;
&lt;br /&gt;
 flac --decode src.flac -o dst.wav&lt;br /&gt;
&lt;br /&gt;
This is fairly simple.  If you need raw samples, set output file extension to .raw, or use --force-raw-format.&lt;br /&gt;
&lt;br /&gt;
=Using with SoX=&lt;br /&gt;
&lt;br /&gt;
It is probably easiest just to use flac to convert to and from WAV format, since WAV files carry their own samplerate/channels/bits-per-sample information.  However, messing with raw data isn&amp;#039;t out of the question.  If it is necessary to take WAV files entirely out of the process, flac&amp;#039;s -a option produces an analysis file from which the information can be retrieved; however, this takes the same amount of time as a decode.&lt;br /&gt;
&lt;br /&gt;
==Decoding FLAC for use with SoX==&lt;br /&gt;
&lt;br /&gt;
It&amp;#039;s possible to use raw output from flac in SoX, but the samplerate, channels, and bits per sample must be known in advance.  If the file is known, for example, to be 16000Hz, mono, 16-bit, then the result of&lt;br /&gt;
&lt;br /&gt;
 flac --decode src.flac -o dst.raw&lt;br /&gt;
&lt;br /&gt;
can be processed in SoX using&lt;br /&gt;
&lt;br /&gt;
 sox [-V] -r 16000 -c 1 -s -w dst.raw ...&lt;br /&gt;
&lt;br /&gt;
The default raw output of flac appears to be signed.&lt;br /&gt;
&lt;br /&gt;
==Encoding raw SoX output with FLAC==&lt;br /&gt;
&lt;br /&gt;
The options to be set when encoding raw data from SoX depends on the format of the data itself.  For example, with raw data specified as -r 44100 (samplerate 44100Hz), -c 2 (2 channels), -s (signed) -w (word = 16 bits), these arguments seem to work:&lt;br /&gt;
&lt;br /&gt;
 flac --endian=little --sample-rate=44100 --channels=2 --sign=signed --bps=16 src.raw -o dst.flac&lt;br /&gt;
&lt;br /&gt;
It is possible that the endian might need to be &amp;quot;big&amp;quot; instead of &amp;quot;little&amp;quot; if SoX was run on a big-endian machine; I haven&amp;#039;t tested this.  If in doubt, just convert to WAV first.&lt;/div&gt;</summary>
		<author><name>161.253.47.104</name></author>
		
	</entry>
</feed>