[Flac-dev] Re: Bug#196556: flac: FLAC__STREAM_ENCODER_NOT_STREAMABLE

Matt Zimmerman
Fri, 10 Sep 2004 16:45:41 -0000

On Sun, Jun 08, 2003 at 02:06:18AM +0200, Paul Seelig wrote:

> This is what i get when trying to encode a WAV file:
>
> ------------- snip -----------------
> [pseelig]/tmp > flac -o YouGotMail.flac YouGotMail.wav
>
> flac 1.1.0, Copyright (C) 2000,2001,2002,2003 Josh Coalson
> flac comes with ABSOLUTELY NO WARRANTY.  This is free software, and you
> are welcome to redistribute it under certain conditions.  Type `flac'
for
> details.
>
> options: -P 4096 -b 4608 -m -l 8 -q 0 -r 3,3
>
> YouGotMail.wav: ERROR initializing encoder
>                 state = 14:FLAC__STREAM_ENCODER_NOT_STREAMABLE
> ------------- snip -----------------
>
> Any valid file i try to encode gives me the same result. :-(
>
> I had the very same problem with the former Debian version of flac.

Run file(1) on the .wav file and send the output.  Particularly, what are the
sampling rates of the input files?

I ran a simple test to try to reproduce your problem, and I happened to grab
one wav file which had a sampling rate of 4660 and was able to reproduce
your problem.  flac works fine on the other files, which have more normal
sampling rates (8000, 16000, 32000, 44100).  If I use sox to convert the
sampling rate of the problematic file, flac works on the result.

In my case, the files I tested were:

RIFF (little-endian) data, WAVE audio, Microsoft PCM, 16 bit, stereo 44100 Hz
(works)
RIFF (little-endian) data, WAVE audio, Microsoft PCM, 8 bit, mono 4660 Hz
(fails)
RIFF (little-endian) data, WAVE audio, Microsoft PCM, 8 bit, mono 8000 Hz
(works)

The third is just a sox-converted version of the second, so this definitely
seems to be related to the sampling rate.


--
 - mdz