[Flac-dev] Re: flac and pipes problems (was: Possible bug)

Mark Powell M.S.Powell at salford.ac.uk
Mon Jan 22 05:52:20 PST 2001


Hi,
  I note that shorten does transfer across any extraneous data after the
wav chunks, making the wav file after being shortened exactly the same as
before. Could flac not easily do this? Simple copy? At least by default
with a flag to specify if you don't want extraneous data transferred
across?
  Also, when flac takes input from stdin it fails to fill in the wav size
fields correctly, whereas shorten has no problems with this: i.e.

$ md5 mj.wav
MD5 (mj.wav) = c89a865943f32eacb819ad208c6669ae
$ shorten31 mj.wav - | shorten -x - - | md5
c89a865943f32eacb819ad208c6669ae
$ flac -fw mj.wav - | flac -d -fw - - | md5
43e1e8e2f800a1d9a991be8e30e902c9
$ flac -fw mj.wav - | flac -d -fw - - | hd | head -4
00000000  52 49 46 46 24 00 00 00  57 41 56 45 66 6d 74 20 |RIFF$...WAVEfmt |
00000010  10 00 00 00 01 00 02 00  44 ac 00 00 10 b1 02 00 |........D¬...±..|
00000020  04 00 10 00 64 61 74 61  00 00 00 00 02 00 f6 ff |....data......öÿ|
00000030  03 00 f5 ff 03 00 f5 ff  03 00 f5 ff 02 00 f5 ff |..õÿ..õÿ..õÿ..õÿ|

You can see it puts a data chunk size of zero in there.
  Flac refuses completely to encode from a pipe. Again, shorten has no
problems with both these examples:

$ shorten - mj.shn < mj.wav
$ cat mj.wav | shorten - mj.shn

Flac handles stdin being a file, but the pipe throws it:

$ flac - mj.flac < mj.wav
$ cat mj.wav | flac -fw - mj.flac
ERROR seeking while skipping samples in input file -

Cheers.

On Fri, 5 Jan 2001, Mark Powell wrote:
> Hi,
>   I have a large wav file generated by SoundForge. The last 176bytes of
> the file are some sort of comment inserted by SoundForge. The length field
> in the wav "data" chunk correctly specify the data length as:
> 
> <file-size> - (full wav header size) 44 - 176
> 
> However, flac seems to ignore this and compresses the comment along with
> the wav data. When unflacced back to wav the length field in the data
> chunk now specifies:
> 
> <file-size> - 44
> 
> It's lost the fact that the last 176 bytes are not actually part of the
> audio. If it's not possible to carry this comment into the flac format
> then it should be dropped rather than encoded as audio?
>   Cheers.
> 
> BTW It compressed the 350MB wav file perfectly at level 8.
> 
> Mark Powell - UNIX System Administrator - The University of Salford
> Academic Information Services, Clifford Whitworth Building,
> Salford University, Manchester, M5 4WT, UK.
> Tel: +44 161 295 5936  Fax: +44 161 295 5888  www.pgp.com for PGP key
> 
> 
> _______________________________________________
> Flac-dev mailing list
> Flac-dev at lists.sourceforge.net
> http://lists.sourceforge.net/mailman/listinfo/flac-dev
> 

Mark Powell - UNIX System Administrator - The University of Salford
Academic Information Services, Clifford Whitworth Building,
Salford University, Manchester, M5 4WT, UK.
Tel: +44 161 295 5936  Fax: +44 161 295 5888  www.pgp.com for PGP key





More information about the Flac-dev mailing list