Creating Silent MP3 of Exactly 5 Seconds

Hi

I am trying to create a silent Mp3 file which lasts for exactly 5 seconds. No matter what I do, the resulting file is always 5.042s.

This is how I am approaching it (using Audacity v2.3.3)…

TEST 1

  • Create new blank project
  • Select GENERATE>SILENCE 00h00m05.000s
  • Export as MP3
  • When I open the MP3 file in Audacity it is always 5.042seconds long

TEST 2

  • Open an existing MP3 audio file (which contains sound) in Audacity
  • Trim it to exactly 5.000seconds duration
  • Export as MP3
  • When I open the MP3 file in Audacity it is always 5.042seconds long

What am I doing wrong? Whey are my files not saving as exactly 5.000seconds long? When I save the project and then reopen it the duration is always correct but when I open the MP3 in Audacity it is always a little bit too long.

Thanks!

Use WAV (or another lossless format) or try generating 4.958 seconds of silence. :wink:

As you may know, MP3 is lossy compression and [u]added silence[/u] is one of the side effects.

Thanks for your speedy reply! I did not know that about MP3 files. I assumed that the “lossy” referred to the audio quality and not the potential length.

It’s weirder than that. MP3’s full family name is MPEG-1 Layer 3. It’s part of a video format. It didn’t have to worry about timing. It could always just lean on the video frames.

Koz

Some lossy formats will give the exact right length (example: OGG), but MP3 doesn’t. It’s a limitation of the MP3 format specification (also applies to some other lossy formats).