An MP3 that shows the wrong length or skips to the wrong spot
An MP3 that claims to run 45 minutes when you know the recording is 20, or one where dragging the playhead drops you somewhere other than where you aimed, almost always has a header problem rather than missing audio. The player is estimating the length from incomplete information. Converting the file writes a new copy with accurate information, and the audio itself is usually all there.
Why a player has to guess an MP3’s length
An MP3 is a long run of short frames, each holding a fraction of a second of sound, with no table of contents. When every frame is encoded at the same bitrate, the length is easy to work out: divide the file size by the bitrate.
Many MP3s use variable bitrate instead, spending more data on complex passages and less on quiet ones. To make that workable, encoders write an information frame at the start of the file that records the total number of frames and a rough map for seeking. When that frame is missing or wrong, the player falls back to assuming every frame matches the first one. If the recording starts with quiet room tone, encoded at a low bitrate, the player concludes the file is far longer than it is. Seeking fails the same way: the player jumps to the point in the file that would be halfway through a constant bitrate recording, which is not halfway through this one.
The information frame goes missing or goes wrong for a few ordinary reasons:
- The recorder never wrote one. Some voice recorders and capture apps write variable bitrate audio without it.
- Several MP3s were joined into one. The header at the front describes only the first piece.
- The file was trimmed by a tool that cut the audio but kept the old header.
Check what you have
- Look at the reported length. Select the file in Finder and press Command-I. The Duration line is the figure the Mac believes.
- Ask Terminal. Type
afinfo, a space, drag the file into the window and press Return. It prints the estimated duration and the bitrate.
afinfo ~/Music/interview.mp3
- Play the end. Open the file in QuickTime Player and drag the playhead close to the end. If the audio runs right to the real end and only the displayed length is off, it is the header. If the sound stops early and the rest is silence or nothing at all, the file is short, which is a different problem.
- Sanity-check the size. At 128 kbps, one minute of audio takes a little under 1 MB. A file far smaller than its claimed length suggests missing audio rather than a bad estimate.
If the audio stops early, corrupted MP3 or M4A won’t play covers what can be saved.
Fix it by writing a new file
A real conversion decodes the whole file frame by frame and writes a new one whose header is built from the audio that is actually there. Any of these will do it.
In Music
- Choose Music, Settings, Files, then Import Settings, and pick the encoder you want the copy in, for example the AAC Encoder.
- Add the MP3 to your library if it is not there already, and select it.
- Choose File, Convert, then the Create Version option for your chosen format.
The new version appears in the library next to the original, and it keeps the track’s title and artist.
In Terminal
The afconvert tool built into macOS converts without adding anything to your library:
afconvert -f m4af -d aac ~/Music/interview.mp3 ~/Music/interview.m4a
For a lossless copy instead, write a WAV:
afconvert -f WAVE -d LEI16 ~/Music/interview.mp3 ~/Music/interview.wav
Run afinfo on the result to confirm the length now matches reality.
With Manatee
Manatee does the same from a window, which helps when you have a folder of recordings with the same fault. Choose Convert, drop the MP3s onto the window or the menu bar icon, and pick M4A, MP3, WAV or FLAC as the target. Each file is decoded with the bundled engine and written as a new file alongside the original, which it never touches, and the job list shows the progress of each one. Everything happens on the Mac, which matters when the recordings are interviews or meetings.
Which format to choose
- WAV or FLAC adds no further quality loss, because both store the decoded audio exactly. The price is size: both are much larger than the MP3, with FLAC the smaller of the two.
- M4A or MP3 keeps the file compact, but it is a second round of lossy compression. At a generous bitrate the difference is usually hard to hear, and for spoken word it rarely matters, but it is not zero. Lossless vs lossy explains the trade.
For music you care about, a FLAC copy is the safe choice. For a lecture or a voice memo, M4A is fine. Either way, keep the original until you have listened to the start, middle and end of the new file.
When the length is right but the audio is not
A wrong length has cousins that look similar and have different causes:
- The audio plays too fast or sounds high-pitched. That is a sample rate labeling problem, not a header estimate. An audio file that plays too fast walks through it.
- The audio stops early and the rest never plays. The file was cut short in a download or copy. Conversion keeps what is there and nothing after.
- The audio jumps or drops out in the middle. Damaged frames. A conversion usually plays straight through them, leaving a short gap where the damage was.
Questions
Why does the length change depending on which app I use? Players estimate differently. Some read only the first frame, others scan more of the file before deciding, so the same broken header can produce different figures in different apps.
Will converting keep my tags and artwork? Music’s Convert copies the track information to the new version. Other tools vary, so check the title and artwork on the copy before you delete the original.
I joined several MP3s together and now the length is wrong. Is the join broken? Probably not. The audio is joined; only the header still describes the first piece. Converting the joined file writes a single header for the whole thing.