Open Bug 1762450 Opened 3 years ago Updated 3 years ago

mp4 file fails to play properly in Firefox

Categories

(Core :: Audio/Video, defect, P3)

Desktop
All
defect

Tracking

()

People

(Reporter: jimm, Unassigned)

Details

mp4 sample - https://github.com/caugner/test/issues/1

This plays in Chrome, but fails to play in Firefox. It was reported that it also does not play correctly in Safari.

ffprobe -i

[mov,mp4,m4a,3gp,3g2,mj2 @ 0x22c96c0] Skipping unhandled metadata com.android.video.temporal_layers_count of type 67
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '161040286-6b783e8c-386f-4fa8-91eb-531da44b367d.mp4':
  Metadata:
    major_brand     : mp42
    minor_version   : 0
    compatible_brands: isommp42
    creation_time   : 2022-03-30T07:25:48.000000Z
    com.android.version: 9
    com.android.capture.fps: 60.000000
  Duration: 00:00:17.02, start: 0.000000, bitrate: 3166 kb/s
  Stream #0:0[0x1](eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709/bt709/smpte170m, progressive), 720x1280, 3037 kb/s, SAR 1:1 DAR 9:16, 29.12 fps, 90k tbr, 90k tbn (default)
    Metadata:
      creation_time   : 2022-03-30T07:25:48.000000Z
      handler_name    : VideoHandle
      vendor_id       : [0][0][0][0]
  Stream #0:1[0x2](eng): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, mono, fltp, 128 kb/s (default)
    Metadata:
      creation_time   : 2022-03-30T07:25:48.000000Z
      handler_name    : SoundHandle
      vendor_id       : [0][0][0][0]

There are some warning messages indicating the file is kinds of malformed:

[Child 10579, MediaPDecoder #2] WARNING: Frame incorrectly marked as non-keyframe @ pts:0 dur:28077 dts:0: file /Users/johnlin/WFH/mozilla-unified/dom/media/mp4/MP4Demuxer.cpp:405

and turning on log module PlatformDecoderMoudle shows no frame is sent to the actual decoder in RDD process.

It looks like the container says these frames are keyframes but the AVC/H.264 bitstream says otherwise[1], and we decided to trust the latter (bug 1300296). Because of this, these frames will be dropped by MediaChangeMonitor for it's waiting for the keyframes[2] to ensure a proper decoding sequence.

[1] https://searchfox.org/mozilla-central/source/dom/media/mp4/MP4Demuxer.cpp#391-407
[2] https://searchfox.org/mozilla-central/source/dom/media/platforms/wrappers/MediaChangeMonitor.cpp#395-397

To note, this was recorded on an Android 9 using the AZ screen Recorder app.

Severity: -- → S3
Priority: -- → P3
No longer blocks: media-triage
You need to log in before you can comment on or make changes to this bug.