The Curious Case of the Silent MP3

Posted on January 22, 2010

Had a bit of a mystery recently. One of my MP3s (Radiohead’s “Optimistic”) suddenly stopped playing in my media player. What was strange was that it didn’t give any errors — in fact, the file played normally, but was completely silent for all 5 minutes and 16 seconds.

Confused, I tried opening it in another media player and encountered the same issue. I opened it in an audio editor and the waveform was flat! But here’s the kicker: the file had not been modified since 2001, and it played correctly on other computers! Plus, this was the only MP3 in my entire library that has the problem. So what is going on?

After verifying from a backup that the file had indeed not been changed, I experimented with more programs. Media tools — rippers, encoders, and players — are notoriously finicky, as the variable results below confirm.1

Program Result
MediaMonkey 3.2.0.1294 No sound
Windows Media Player 11 No sound
QuickTime Player 7.6.4 No sound
iTunes 8.2.0.23 Sound!
RealPlayer SP 1.0 Sound!
VLC 1.0.2 Sound!
PowerDVD 6.0 No sound
GoldWave 4.23 Flat waveform
Audacity 1.2.4 Error: Unrecognized format

Interesting note: In the cases of media players, the (graphic) visualization plugins worked as expected during playback activity.

I then attempted to decode the MP3 into WAV format using LAME 3.94. The resulting WAV played successfully.

Diagnosis

Now the question was: Is the file corrupt or otherwise specially crafted? This is certainly plausible, since I got it off the Internet in the days of Napster. The fact that the audio editors/converters can’t read the file indicates this is the problem as well.

Luckily, there are various tools available to check for MP3 consistency. I installed a bunch of them and ran them against the file.

checkmp3

Check MP3 “helps to identify, in explicit detail, MP3s that do not correctly follow the MP3 format. It also looks for invalid frame headers, missing frames, etc., and generates useful statistics.”

> checkmp3 optimistic.mp3 

FILE_NAME           optimistic.mp3
GOOD_FRAMES         12097
BAD_FRAMES          0
LAST_BYTE_CHECKED   6320192
SONG_LENGTH         05:16.00

USER_TIME           0.06s
SYS_TIME            0.00s

The checkmp3 program didn’t seem to find any problems.

mp3val

MP3val is “a small, high-speed, free software tool for checking MPEG audio files’ integrity. It can be useful for finding corrupted files (e.g. incompletely downloaded, truncated, containing garbage). MP3val is also able to fix most of the problems.”

MP3val provided two warnings:

> mp3val optimistic.mp3
Analyzing file "optimistic.mp3"...
WARNING: "/home/heikese/Desktop/optimistic.mp3" (offset 0x606fc1): It seems that file is truncated or there is garbage at the end of the file
WARNING: "/home/heikese/Desktop/optimistic.mp3": Wrong CRC in 12096 frames
INFO: "/home/heikese/Desktop/optimistic.mp3": 12097 MPEG frames (MPEG 1 Layer III), +ID3v1, CBR, CRC
Done!

mp3check

mp3check (not to be confused with checkmp3) “checks MP3 files for consistency and prints several errors and warnings.”

> mp3check -e optimistic.mp3
optimistic.mp3:
valid id3 tag trailer v1.0 found
frame     0/ 0:00: crc error (0x0000!=0x5407)
frame     1/ 0:00: crc error (0x0000!=0x21ec)
frame     2/ 0:00: crc error (0x0000!=0x6237)
frame     3/ 0:00: crc error (0x0000!=0x21ec)
frame     4/ 0:00: crc error (0x0000!=0x6237)
frame     5/ 0:00: crc error (0x0000!=0x21ec)
frame     6/ 0:00: crc error (0x0000!=0x6237)
frame     7/ 0:00: crc error (0x0000!=0x21ec)
frame     8/ 0:00: crc error (0x0000!=0x6237)
frame     9/ 0:00: crc error (0x0000!=0x799f)
frame    10/ 0:00: crc error (0x0000!=0x21ec)
frame    11/ 0:00: crc error (0x0000!=0x6237)
[...]
frame 12089/ 5:15: crc error (0x0000!=0x23ef)
frame 12090/ 5:15: crc error (0x0000!=0x8338)
frame 12091/ 5:15: crc error (0x0000!=0xf146)
frame 12092/ 5:15: crc error (0x0000!=0xe803)
frame 12093/ 5:15: crc error (0x0000!=0xc26f)
frame 12094/ 5:15: crc error (0x0000!=0x82df)
frame 12095/ 5:15: crc error (0x0000!=0x085e)
frame 12096/ 5:15: crc error (0x0000!=0xe5d9)
frame 12097/ 5:16: file truncated, 1 byte missing for last frame

So, according to mp3check, every frame in the file has “0” for the CRC sum.

MP3 Diags

Unlike the other tools, MP3 Diags is a GUI-based application. It allows end-users to “identify issues with their MP3 files, fix some of the issues and make other changes, like adding track information.”

Results from MP3 Diags.

Here are the results in text form, prefaced with the 2-character “note labels”:

  1. [fa] No ID3V2.3.0 tag found, although this is the most popular tag for storing song information.
  2. [ab] Low quality MPEG audio stream.
  3. [an] No normalization undo information found. The song is probably not normalized by MP3Gain or a similar program. As a result, it may sound too loud or too quiet when compared to songs from other albums.
  4. [ak] Invalid MPEG stream. Stream has fewer than 10 frames.
  5. [jb] Truncated MPEG stream found. Since other streams follow, it is possible that players and tools will have problems using the file. Removing the stream or padding it with 0 to reach its declared size is strongly recommended.
  6. [ha] The only tag found that is capable of storing song information is ID3V1, which has pretty limited capabilities.

Points 4 [ak] and 5 [jb] are the only serious notes, but seem to mention only the truncated audio stream at the end — not any CRC errors with the main stream.

Fix

All of the diagnostic tools from the previous section also provide options to repair files. I ran these fixes (so that the reported errors disappeared) and replayed them to see which, if any, fixed the problem.

Program Fix Result
checkmp3 -sf optimistic.mp3 > optimistic_fixed.mp3 not fixed
mp3val -f optimistic.mp3 fixed!
mp3check --cut-junk-start --cut-junk-end --fix-headers --fix-crc optimistic.mp3 fixed!
MP3 Diags: remove truncated stream not fixed

Conclusions

Obviously, whatever software encoded the MP3 left the CRC values blank.

I don’t have a copy of the official MP3 file format specifications (since that requires paying for it2), so I don’t know what the official playback behavior should be (or even if it is defined). Apparently the question is a matter of opinion — the media players that failed obviously take the CRC checksums seriously, while others, such as Apple, took the approach of ignoring them.

Despite being only at version 0.1.7 at the time of this writing, mp3val seems to be the better of the two repair tools — it keeps the ID3 info, seems to be actively maintained, has a Windows version, and has graphic frontends available.

So that only leaves one puzzling question: Why did the MP3, which hadn’t changed, suddenly stop playing on software that also didn’t change?

Footnotes

1 I know many of these programs are old versions, but that’s because I don’t use them regularly. They just happened to be on my computer.

2 But check out MP3: The Definitive Guide by Scot Hacker / O’Reilly.

Leave a Reply

2 Responses to The Curious Case of the Silent MP3

  1.  

    |

  2. Very interesting article. I encountered a similar issue several years back with a corrupt CRC/checksum. This file definitely played silence on at least two different computers though.

    Winamp played it correctly as long as “check CRC” or some similar option was not checked. RealPlayer also played it. Quicktime and Windows Media did not…

    Do you have a copy of a file with this problem?