Matt Zimmerman
2004-Sep-10 16:45 UTC
[Flac-dev] Re: Bug#196556: flac: FLAC__STREAM_ENCODER_NOT_STREAMABLE
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
Paul Seelig
2004-Sep-10 16:45 UTC
[Flac-dev] Re: Bug#196556: flac: FLAC__STREAM_ENCODER_NOT_STREAMABLE
Hi Matt! On Sat, Jun 07, 2003 at 10:09:20PM -0400, Matt Zimmerman wrote:> Run file(1) on the .wav file and send the output. Particularly, what are the > sampling rates of the input files? >"RIFF (little-endian) data, WAVE audio, Microsoft PCM, 8 bit, mono 11025 Hz" All the WAV files i tried before have been the ones shipped with the openwebmail Debian package, showing almost all the same sample rate.> 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. >Bingo! So i tried again with a "RIFF (little-endian) data, WAVE audio, Microsoft PCM, 16 bit, stereo 44100 Hz" i once produced from a vinyl recording using gramofile and finally succeeded! Both encoding and, according to cmp(1) decoding again, worked flawlessly. All other WAV from the same source work equally well, so at least my problem is solved. :-) Looks like this shortcoming needs to be documented for *users*, if it still isn't. A short glancing through the documentation didn't give me any valid results from a user's perspective. Thank you, P. *8^) -- ------------ Paul Seelig <pseelig@uni-mainz.de> -------------- African Music Archive - Institute for Ethnology and Africa Studies Johannes Gutenberg-University - Forum 6 - 55099 Mainz/Germany ----------------- http://ntama.uni-mainz.de ------------------
Matt Zimmerman
2004-Sep-10 16:45 UTC
[Flac-dev] Re: Bug#196556: flac: FLAC__STREAM_ENCODER_NOT_STREAMABLE
severity 196556 minor thanks On Sun, Jun 08, 2003 at 12:06:56PM +0200, Paul Seelig wrote:> On Sat, Jun 07, 2003 at 10:09:20PM -0400, Matt Zimmerman wrote: > > 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. > > > Bingo! > > So i tried again with a "RIFF (little-endian) data, WAVE audio, Microsoft > PCM, 16 bit, stereo 44100 Hz" i once produced from a vinyl recording using > gramofile and finally succeeded! Both encoding and, according to cmp(1) > decoding again, worked flawlessly. All other WAV from the same source work > equally well, so at least my problem is solved. :-) > > Looks like this shortcoming needs to be documented for *users*, if it still > isn't. A short glancing through the documentation didn't give me any valid > results from a user's perspective.Ah, I remember what this is about now. The encoder is complaining that the resulting file will not be streamable, since it does not comply with the FLAC Subset format. It may also cause problems for hardware-based players whirh only implement the subset. If you specify --lax, it will go ahead and encode the file. A non-streaming FLAC decoder (such as flac or xmms-flac) will of course still be able to decode the file. See format.html in the documentation for more information on this. It would be nice if flac would print a more descriptive error message in this case. -- - mdz