Closed Bug 1661746 Opened 5 years ago Closed 4 years ago

distorted audio with mono fltp mp4a

Categories

(Core :: Audio/Video: Playback, defect, P5)

x86_64
macOS
defect

Tracking

()

RESOLVED FIXED

People

(Reporter: arai, Unassigned)

References

Details

(Keywords: parity-chrome)

Attachments

(3 files)

Attached video testcase.mp4

Steps to reproduce:

  1. run Nightly 82.0a1 (2020-08-27) (64-bit) with clean profile on macOS
  2. open attached file (mp4a, 44100 Hz, mono, fltp, 80 kb/s in mp4)

Actual result:
distorted audio playback

Expected result:
normal audio playback

this plays normally on VLC and google chrome

Attached audio same audio in mp3

this plays normally on Nightly

I don't see the difference between these two files, but I am on Ubuntu 18 now.

OS: Unspecified → macOS
Hardware: Unspecified → x86_64

yes, tested on ubuntu and windows 10, and confirmed that this is macOS specific issue.

Safari doesn't recognize this as a valid MP4 file and QuickTime player rejects it as well, so I'm inclined to think there's something invalid (or at least unsupported) with the file here. I'm not so familiar with the audio side of things, but here's a fairly similar file which does play (mp4a, 44100 Hz, mono, fltp, 69 kb/s).

Looking at this file with ffprobe, the thing that stands out to me are differences in the stream:

    Stream #0:0(und): Audio: mp3 (mp4a / 0x6134706D), 44100 Hz, mono, fltp, 80 kb/s (default)
    Stream #0:0(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, mono, fltp, 69 kb/s (default)

It looks like the file that plays back distorted is encoded with MPEG-1 Audio Layer III (aka, MP3) stored in an mp4 container. Is that the intent? If you can tell us more about how the file was created, that may be helpful.

chunmin, do you know off-hand if this is something we intend to support? If not, it would probably be preferable to reject it with an error message rather than play it distorted.

Severity: -- → S3
Flags: needinfo?(cchang)
Priority: -- → P3
Attached video input testcase

Sorry I've lost the exact steps and input file to reproduce the previous files, but here's steps to reproduce almost same file:
(so, the resulting file has different audio, but the distorted playback happens as well)

preparation:

  1. download attachment as testcase.mov
  2. install ffmpeg with homebrew

steps to create audio-only mp4:

  1. run ffmpeg -i testcase.mov testcase.mp3
  2. run ffmpeg -i testcase.mp3 -ac 1 -acodec libmp3lame testcase.mp4

steps to create video+audio mp4:

  1. run ffmpeg -i testcase.mov -ac 1 -acodec libmp3lame testcase2.mp4

ffmpeg version

ffmpeg version 4.3.1 Copyright (c) 2000-2020 the FFmpeg developers
  built with Apple clang version 11.0.3 (clang-1103.0.32.62)
  configuration: --prefix=/usr/local/Cellar/ffmpeg/4.3.1 --enable-shared --enable-pthreads --enable-version3 --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libbluray --enable-libdav1d --enable-libmp3lame --enable-libopus --enable-librav1e --enable-librubberband --enable-libsnappy --enable-libsrt --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librtmp --enable-libspeex --enable-libsoxr --enable-videotoolbox --disable-libjack --disable-indev=jack
  libavutil      56. 51.100 / 56. 51.100
  libavcodec     58. 91.100 / 58. 91.100
  libavformat    58. 45.100 / 58. 45.100
  libavdevice    58. 10.100 / 58. 10.100
  libavfilter     7. 85.100 /  7. 85.100
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  7.100 /  5.  7.100
  libswresample   3.  7.100 /  3.  7.100
  libpostproc    55.  7.100 / 55.  7.100

I don't think we have plan to support this. It seems it's not a common case.

Flags: needinfo?(cchang)

Changing priority to P5 to indicate we're not likely to get to this ourselves, but we welcome submissions to address it.

Out of curiosity, what's the use-case for embedding mp3 audio in an mp4 container? At this point, I would think AAC would be a better choice.

Flags: needinfo?(arai.unmht)
Priority: P3 → P5

I've encountered this case (distorted audio in video file) twice on video posted to anonymous imageboard,
and the attachment above is the reproduction with my own video.
So I don't know use-case or why this combination is chosen.
but yeah, I agree that this is rare case.

Flags: needinfo?(arai.unmht)

arai, I've been testing the various files on this page, and they are rendered identically on Chrome, VLC and Firefox (I'm using a recent Nightly).

I've changed Gecko to always use ffmpeg to decode mp3 in bug 1668824 about at the same time as your last message here, that might be the reason why it appears fixed. This is possible because the patents on mp3 have expired, and it's better (in terms of performance and maintainability) to just use ffmpeg.

Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Depends on: 1668824
See Also: 1668824
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: