[SLUG] White noise at the end of a WAV file that only Audacity can't see

2009-07-20 Thread Mary Gardiner
I am trying to re-encode some music files from Apple Lossless to FLAC[1]
and there is a very short burst of white noise at the end of the file
that every music player *except* Audacity can see.

Here's what I am doing.

1. Convert the ALAC music files to WAV (I was originally going straight
   to FLAC, but tried to cut some steps out in order to figure out which
   step in the chain was producing the white noise).

   Either of these tools produce the same effect:

   alac-decoder -f output.wav input.m4a
   ffmpeg -i input.m4a output.wav

2. Listen to the WAV files using any of the following tools:
   - totem
   - Squeezebox/Squeezecenter
   - Rhythmbox

   All of them render about 1/4 second or so of white noise at the very
   end of the playback. Further, this is preserved by flac when I
   convert the WAV file to FLAC.

3. Think oh well, I guess I can edit the white noise off with
   Audacity!

   Open WAV file in Audacity, discover that the white noise is not there
   in Audacity (not in the waveform, not present when I use Audacity itself
   to play it back)

4. Think oh well, it's the least automatable setup ever, but if
   Audacity doesn't render the white noise, I can at least use it to
   export to FLAC!

   Do so, and discover that the resulting FLAC files still have the
   white noise at the end when played in totem/Squeezecenter/Rhythmbox.

I've also had a friend with Apple hardware (an iPod) play the original
ALAC files and he reports that they do not contain a burst of white
noise at the end.

So I am out of ideas: does anyone know what the white noise is, why
Audacity can't see it and thus let me edit it off but still renders it,
or any tools that will allow me to produce FLAC files without a very
annoying burst of static at the end? 

-Mary

[1] I have Apple Lossless files because that's the only lossless format
that The Dandy Warhols are selling The Dandy Warhols Are Sound in.
-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html


Re: [SLUG] White noise at the end of a WAV file that only Audacity can't see

2009-07-20 Thread Erik de Castro Lopo
Mary Gardiner wrote:

 2. Listen to the WAV files using any of the following tools:
- totem
- Squeezebox/Squeezecenter
- Rhythmbox
 
All of them render about 1/4 second or so of white noise at the very
end of the playback. Further, this is preserved by flac when I
convert the WAV file to FLAC.

Most audio files have a header which contains file metadata like sample
rate, number of channels etc. WAV (and AIFF among others) also allow
metadata to be placed at the end of the file (I think its was a huge
mistake to allow this).

I suspect that totem and the others are incorrectly treating this
end-of-file metadata as audio data. Audacity (which uses libsndfile)
however does the right thing and displays only the audio data.

It you post the output of:

sndfile-info filename

I can confirm this. sndfile-info is in the sndfile-programs package
in Debian derived distros.

 So I am out of ideas: does anyone know what the white noise is, why
 Audacity can't see it and thus let me edit it off but still renders it,
 or any tools that will allow me to produce FLAC files without a very
 annoying burst of static at the end?

Recent versions of sndfile-convert (= 1.0.18 I think) will correctly
read the WAV file and create a flac file by doing:

   sndfile-convert a.wav a.flac.

HTH,
Erik
-- 
--
Erik de Castro Lopo
http://www.mega-nerd.com/
-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html