Closed Bug 1442598 Opened 6 years ago Closed 6 years ago

mp4 video with m4a codec ID not playing

Categories

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

defect

Tracking

()

RESOLVED INVALID

People

(Reporter: dragos.tatulea, Unassigned)

Details

(Keywords: testcase, Whiteboard: [INVALID?])

Attachments

(4 files)

Attached video dbg5.mp4
User Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.167 Safari/537.36

Steps to reproduce:

Trying to play a mp4 file (h264 avc1.64001E) dumped from a streaming server.

(Context: while investigating why this encoding doesn't work over MSE).


Actual results:

Firefox says file is corrupt. Error in console:

Media resource file:///tmp/dbg5.mp4 could not be decoded, error: Error Code: NS_ERROR_DOM_MEDIA_FATAL_ERR (0x806e0005)
Details: mozilla::H264Converter::CreateDecoderAndInit(mozilla::MediaRawData*)::<lambda(const mozilla::MediaResult&)>: Unable to initialize H264 decoder


Expected results:

The video should have played. Chrome is able to play it.
Tried on Linux and Windows and the issue is the same.
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:60.0) Gecko/20100101 Firefox/60.0
20180302104326

It also doesn't play in Edge, IE, or Vivaldi.

ffmpeg [1] shows these errors:
[h264 @ 000001353d6160e0] Invalid NAL unit size (1460 > 1347).
[h264 @ 000001353d6160e0] Error splitting the input into NAL units.
Error while decoding stream #0:0: Invalid data found when processing input

It looks like the file identifies itself as audio:

Format                         : MPEG-4
Format profile                 : Apple audio with iTunes info
Codec ID                       : M4A  (M4A /mp42/isom)
File size                      : 2.98 MiB
Duration                       : 583 ms
Overall bit rate               : 42.8 Mb/s
IsTruncated                    : Yes

Video
ID                             : 1
Format                         : AVC
Format/Info                    : Advanced Video Codec
Codec ID                       : avc1
Codec ID/Info                  : Advanced Video Coding
Duration                       : 583 ms
Bit rate                       : 42.7 Mb/s
Width                          : 1 024 pixels
Height                         : 1 024 pixels
Display aspect ratio           : 1.000
Frame rate mode                : Constant
Frame rate                     : 120.000 FPS
Bits/(Pixel*Frame)             : 0.339
Stream size                    : 2.97 MiB (100%)
Title                          : NVIDIA MPEG4 container
Language                       : English

[1] https://superuser.com/questions/100288/how-can-i-check-the-integrity-of-a-video-file-avi-mpeg-mp4
Has Regression Range: --- → irrelevant
Has STR: --- → yes
Component: Untriaged → Audio/Video: Playback
Keywords: testcase
OS: Unspecified → All
Product: Firefox → Core
Hardware: Unspecified → All
Summary: mp4 video not playing → mp4 video with m4a codec ID not playing
Whiteboard: [INVALID?]
Thanks for the report, and thanks for the diagnosis, Gingerbread Man!

Jean-Yves, is this invalid file something you care about supporting?
Flags: needinfo?(jyavenard)
Priority: -- → P3
After fixing the decoding error "Invalid NAL unit size (1460 > 1347). Error splitting the input into NAL units.", firefox is still not able to play it.

See newly attached file and (very verbose) log.
Attached video mp4_enc.mp4
Fixed the "Invalid NAL unit size (1460 > 1347). Error splitting the input into NAL units." in the file. But Firefox still can't play it.
Attached file local_playback.log
Verbose log of local playback
Attached file playback_over_mse.log
Playback of video stream (same encoding) with Media Source Extensions.
Safari also fails to decode this file...

after analysis of the content:
The file doesn't provide an SPS NAL or PPS nal in the avcC box, which in itself is okay if it is AVC3.

The first sample does provide an inband SPS.
But this SPS NAL has a size of 2669 bytes, and contains embed all the NAL that followed.

This is very wrong.
Typically, a SPS NAL is around 20ish bytes.

FFmpeg accepts to parse the data that followed, we don't (and neither will safari).

Closing as invalid.
Status: UNCONFIRMED → RESOLVED
Closed: 6 years ago
Flags: needinfo?(jyavenard)
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: