Padding in m4a file

Overjazz is a YouTube channel that specializes in old records from the vinyl era. At the beginning of every file they add a sort of signature that has some real or simulated noises from scratches in a vinyl disk. The signature is about 6-7 seconds long.

I downloaded the file in the link below from YouTube. If I play the file with VLC or Audacious or online on YouTube the music starts after about 6-7 seconds, however if I load it in Audacity and play it the music starts at about 15 seconds. Somehow Audacity shows some padding or whatever at the beginning that is discarded by VLC and Audacious. Could someone please explain what is happening?

I am using Audacity 2.0.4 on Fedora 20.


The original video is here, if you play it the music only starts after 6-7 seconds:

And to download it I used this command:

youtube-dl -f bestaudio

On Windows, Audacity 2.1.0-alpha imports the file correctly using FFmpeg 2.2.2 but Audacity 2.0.5 using FFmpeg 0.6.2 adds padding as you describe. Your Audacity 2.0.4 will only be using FFmpeg 0.6.2 or earlier because that is all it supports.

So I suggest you update your obsolete version of Audacity by building and default-installing FFmpeg 2.2.x or 2.3.x then build the 2.0.6 source tarball of Audacity:

2.0.6 should then link against the new FFmpeg. You may need to configure Audacity thus:

./configure  --disable-dynamic-loading

If you use FFmpeg 2.4.x or higher you may need to apply this patch or similar to the Audacity source to ensure that Audacity builds against FFmpeg:

--- src/FFmpeg.h	2014-08-27 01:33:29.601443000 +0200
+++ src/FFmpeg.h	2014-08-27 09:20:53.045146000 +0200
@@ -688,7 +688,7 @@
-      (AVOutputFormat *f),
+      (const AVOutputFormat *f),
@@ -755,7 +755,7 @@
-      (AVFifoBuffer *f),
+      (FF_CONST_AVUTIL53 AVFifoBuffer *f),
@@ -801,7 +801,7 @@
       AVDictionaryEntry *,
-      (AVDictionary *m, const char *key, const AVDictionaryEntry *prev, int flags),
+      (const AVDictionary *m, const char *key, FF_CONST_AVUTIL53 AVDictionaryEntry *prev, int flags),
       (m, key, prev, flags)

Uninstall the 2.0.4 repository build of Audacity if you install 2.0.6 after building it.


Short story
Thanks Gale, the problem was solved.

Long story
I first installed Audacity 2.0.6 on a Windows box and confirmed what you said, that the padding issue does not manifest there.

Then I looked at the Fedora repo and found out that 2.0.6 is available there, but the reason I had 2.0.4 on my PC was that I was using the Audacity version from RPMFusion that comes with Ffmpeg support plus a bunch of plugins (stuff that is not allowed in Fedora).

Then I downloaded the 2.0.6 source package from Fedora and removed the following line:

I then built Audacity from the modified source package and the padding issue disappeared. The Ffmpeg version installed on my PC is 2.1.5 (also from RPMFusion). I will still need to install plugins at some stage but for now I have what I need.

Thanks again.