When trying to use some LAME libraries like the WAV2SWF from swftools I started gettin this error:
strange error flushing buffer
The file was still generated but it did not work.
Here’s what I did to fix:
Installed the latest version of swftools
This was done on Ubuntu but you can probably do almost the same thing on Mac OS X. I tried using homebrew
but was not able to get a new enough version of the software.
Make sure you have zlib
sudo apt-get install zlib1g-dev
Or
brew install zlib
Next check the downloads page and get the latest version of the software, something like:
cd /tmp
wget "http://swftools.org/swftools-2013-04-09-1007.tar.gz"
cd swftools-2013-04-09-1007
./configure
make
You can then install this if you want, but to test I just continued without installing:
cd src
./wav2swf ~/input.wav
this gave me another error:
Error: no mp3 soundstream support compiled in.
So to get around needing support for that you can just specify some additional parameter so it doesn’t have to detect them:
./wav2swf -d -s 44100 -o ~/test.swf ~/input.wav
And voila! it worked!
Additional parameters are:
Usage: wav2swf [-o filename] file.wav
-h , --help Print short help message and exit
-V , --version Print version info and exit
-o , --output <filename> Explicitly specify output file. (Otherwise, output will go to output.swf)
-r , --framerate <fps> Set file framerate to <fps> frames per second.
-s , --samplerate <sps> Set samplerate to <sps> frames per second (default: 11025).
-d , --definesound Generate a DefineSound tag instead of streaming sound.
-l , --loop n (Only used with -d)
-C , --cgi For use as CGI- prepend http header, write to stdout.
-S , --stop Stop the movie at frame 0
-E , --end Stop the movie at the end frame
-b , --bitrate <bps> Set mp3 bitrate to <bps> (default: 32)
-v , --verbose Be more verbose