MTG / freesound

The Freesound website
https://freesound.org
GNU Affero General Public License v3.0
311 stars 87 forks source link

File with mp3 ending gets encoded to a glitch (m4a, mp42, isommp42, android 9) #1768

Open qubodup opened 4 months ago

qubodup commented 4 months ago

A user uploaded a file with an mp3 ending that gets encoded to a glitch

https://freesound.org/tickets/03dec013ea3848e39cece02ac0c50215/

The original file is available via link in that ticket. I checked it with file/ffmpeg/soxi

file output: ISO Media, MP4 v2 [ISO 14496-14]

ffmpeg output: https://paste.c-net.org/DamienBrainy

soxi output: https://paste.c-net.org/PossumMathesar (mp3-util freaks out, then it gets identified as 8k sample rate mp1/2/3 which seems weird.

Converting the file with sox to a wav produces a 1.15s long glitch sound. Maybe it's related to freesound glitching it.

Audacity and Audition open the file without a problem.

I tried creating such a file via ffmpeg -i in.ogg -c aac -brand mp42 out.m4a twice and in one case renamed it to an .mp3 file ending. Both uploads were encoded on freesound without issue. However the file I generated had minor_version: 512 and compatible_brands: mp42isomiso2 while the problematic file has the values 0 and isommp42 respectively.

The hint com.android.version: 9 in the ffmpeg output might indicate an issue with the OS. This might be related: https://stackoverflow.com/questions/41704754/android-mediarecorder-recorded-mpeg4-aac-audio-files-header-incomplete