bbc / audiowaveform

C++ program to generate waveform data and render waveform images from audio files
https://waveform.prototyping.bbc.co.uk
GNU General Public License v3.0
1.94k stars 242 forks source link

Piping FLAC or Ogg Vorbis audio to stdin doesn't work #103

Open chrisn opened 5 years ago

chrisn commented 5 years ago

Examples:

$ cat test.flac | ./audiowaveform --input-format flac -o 1.dat -b 8 -z 64
Failed to read input: System error : Illegal seek.
$ cat test.oga | ./audiowaveform --input-format flac -o 1.dat -b 8 -z 64
Failed to read input: Supported file format but file is malformed.

This is due to a limitation in libsndfile (see this issue for details). I will fix this when an updated version of libsndfile is released.

prodbyola commented 2 years ago

Hey @chrisn thanks for the awesome work on this package! Is there any progress on this issue? Would love to generate waveform data from FLAC files. Thanks.

chrisn commented 2 years ago

As a workaround, you can use either of these methods to read FLAC files:

audiowaveform -i test.flac -o test.dat -z 256 -b 8
audiowaveform --input-format flac -o test.dat -b 8 < test.flac