ffmpeg parses AAC+MP4 incorrectly on Ubuntu 20.04 LTS
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
ffmpeg (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
The ffmpeg version distributed via apt on Ubuntu 20.04 LTS cannot correctly decode AAC audio in MP4 container when the file is generated by iOS.
The ffmpeg version on Ubuntu 18.04 LTS results in correct parsing.
Here's working version from Ubuntu 18.04 LTS:
$ apt policy ffmpeg
ffmpeg:
Installed: 7:3.4.8-0ubuntu0.2
Candidate: 7:3.4.8-0ubuntu0.2
Version table:
*** 7:3.4.8-0ubuntu0.2 500
500 http://
500 http://
100 /var/lib/
7:3.4.2-2 500
500 http://
Here's not-working version from Ubuntu 20.04 LTS:
$ apt policy ffmpeg
ffmpeg:
Installed: 7:4.2.4-1ubuntu0.1
Candidate: 7:4.2.4-1ubuntu0.1
Version table:
*** 7:4.2.4-1ubuntu0.1 500
500 http://
500 http://
100 /var/lib/
7:
500 http://
The ffmpeg version distributed via snap does parse the file correctly but snap version is much slower than the version distributed via apt so I'd much prefer using the apt version if it worked correctly.
ProblemType: Bug
DistroRelease: Ubuntu 20.04
Package: ffmpeg 7:4.2.4-1ubuntu0.1
ProcVersionSign
Uname: Linux 5.4.0-84-generic x86_64
ApportVersion: 2.20.11-
Architecture: amd64
CasperMD5CheckR
Date: Tue Oct 19 11:36:34 2021
InstallationDate: Installed on 2020-12-21 (301 days ago)
InstallationMedia: Ubuntu-Server 20.04.1 LTS "Focal Fossa" - Release amd64 (20200731)
SourcePackage: ffmpeg
UpgradeStatus: No upgrade log present (probably fresh install)
Example file with length of about 8.4 with me speaking numbers 1..10 in Finnish with some background noise. This has been recorded by Apple Safari on iOS 15.0.1 using the MediaRecorder API in HTML5 document.
To reproduce the problem, try this:
$ time ffmpeg -i iPad-15. 0.1-MediaRecord er-audio. mp4 -acodec libmp3lame -ac 2 -qscale:a 9 -ar 48000 -joint_stereo 1 out.mp3
It should result in file called out.mp3 with a length of about 8.4 seconds. With the ffmpeg version in Ubuntu 20.04 LTS the output length is only 1 second.
The ffmpeg version distributed with Ubuntu 18.04 LTS and the snap version distributed with Ubuntu 20.04 LTS do work correctly so this bug is strictly about the version distributed via apt on Ubuntu 20.04 LTS.