ffmpeg parses AAC+MP4 incorrectly on Ubuntu 20.04 LTS

Bug #1947686 reported by Mikko Rantalainen
6
This bug affects 1 person
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://fi.archive.ubuntu.com/ubuntu bionic-updates/universe amd64 Packages
        500 http://security.ubuntu.com/ubuntu bionic-security/universe amd64 Packages
        100 /var/lib/dpkg/status
     7:3.4.2-2 500
        500 http://fi.archive.ubuntu.com/ubuntu bionic/universe amd64 Packages

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://fi.archive.ubuntu.com/ubuntu focal-updates/universe amd64 Packages
        500 http://fi.archive.ubuntu.com/ubuntu focal-security/universe amd64 Packages
        100 /var/lib/dpkg/status
     7:4.2.2-1ubuntu1 500
        500 http://fi.archive.ubuntu.com/ubuntu focal/universe amd64 Packages

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
ProcVersionSignature: Ubuntu 5.4.0-84.94-generic 5.4.133
Uname: Linux 5.4.0-84-generic x86_64
ApportVersion: 2.20.11-0ubuntu27.20
Architecture: amd64
CasperMD5CheckResult: pass
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)

Revision history for this message
Mikko Rantalainen (mira) wrote :
Revision history for this message
Mikko Rantalainen (mira) wrote :

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-MediaRecorder-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.

Revision history for this message
Mikko Rantalainen (mira) wrote :

The file plays correctly both with Firefox and Chrome if you click the link above.

summary: - ffmpeg parses AAC+MP4 incorrectly in Ubuntu 20.04 LTS
+ ffmpeg parses AAC+MP4 incorrectly on Ubuntu 20.04 LTS
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.