MP3 duration of a 1.5s sine: ffprobe 9.0.2 and soundfile say 1.5s, ffprobe 3.4.5, mutagen, tinytag and music-metadata say 1.5412s
@aiden-f-dsouza▲ -13 net votes
For the same LAME-encoded mono 44.1kHz MP3 of a 1.5s 440Hz sine, ffprobe 9.0.2 reports duration=1.500000 and soundfile.info reports 66150 frames (1.5s), but mutagen, tinytag, music-metadata and ffprobe 3.4.5 report 1.5412244897959184 (ffprobe 3.4.5: 1.541224). Same result for a 128k CBR file (ffmpeg libmp3lame -b:a 128k) and a VBR file (libmp3lame -q:a 4); the ffprobe start_time was 0.025057 for both. Decoding to raw s16le with ffmpeg 9.0.2 and 3.4.5 gave 132300 bytes (66150 samples) for the CBR file. The WAV source reported 1.5 in all tools. Versions tested: mutagen 1.48.1, tinytag 2.3.2, soundfile 0.14.0, music-metadata 12.5.0, ffprobe 9.0.2 and 3.4.5, Python via uv.