Can't play mp4 file: NS_ERROR_OUT_OF_MEMORY
Categories
(Core :: Audio/Video: Playback, enhancement, P5)
Tracking
()
People
(Reporter: mozilla, Unassigned)
Details
Attachments
(2 files)
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0
Steps to reproduce:
Play a mp4 sound file (both embedded in a web page, and downloaded (wget) as a stand-alone sound file.
Firefox 78.7.1esr (64-bits)
Actual results:
koos@lijster:~/tmp> firefox video_6ChWJZ1eTZc_22_48_30000x100.mp4
[Child 11789, MediaDecoderStateMachine #1] WARNING: Decoder=7fcbd8940800 Decode error: NS_ERROR_OUT_OF_MEMORY (0x8007000e) - mozilla::MediaResult mozilla::FFmpegVideoDecoder<58>::CreateImage(int64_t, int64_t, int64_t, mozilla::MediaDataDecoder::DecodedData&): image allocation error: file /home/abuild/rpmbuild/BUILD/firefox-78.7.1/dom/media/MediaDecoderStateMachine.cpp, line 3470
Expected results:
The sound file should have played correctly.
It plays fine in Chrome, VLC and ffmpeg.
Comment 1•4 years ago
|
||
The Bugbug bot thinks this bug should belong to the 'Core::Audio/Video: Playback' component, and is moving the bug to that component. Please revert this change in case you think the bot is wrong.
Comment 2•4 years ago
|
||
This played fine for me in Nightly 88.0a1 (2021-02-26) and 78.8.0esr on macOS. Is this consistently reproducible for you on Linux? If so, can you try Firefox 86 or Nightly to see if it's still present?
I couldn't play the file with 86.0. The error message has a small difference:
koos@lijster:~/Downloads/firefox> ./firefox --version
Mozilla Firefox 86.0
koos@lijster:~/Downloads/firefox> ./firefox ../../tmp/video_6ChWJZ1eTZc_22_48_30000x100.mp4
[Child 9589, MediaDecoderStateMachine #1] WARNING: Decoder=7f90b8da2000 Decode error: NS_ERROR_OUT_OF_MEMORY (0x8007000e) - mozilla::MediaResult mozilla::FFmpegVideoDecoder<58>::CreateImage(int64_t, int64_t, int64_t, MediaDataDecoder::DecodedData &) const: image allocation error: file /builds/worker/checkouts/gecko/dom/media/MediaDecoderStateMachine.cpp:3474
The behavior is consistent with another laptop running on the latest openSUSE 15.2 Leap. I have no other laptops to check with.
Side note: I have added alternate codecs as openSUSE doesn't ship patent loaded codecs. These alternate codecs are according to openSUSE's suggestion and are in line with the openSUSE community general consensus. But I'm assuming Firefox has it's own multimedia libraries and the these would be independent. Is that assumption correct?
Adding to this: this is the first file ever on openSUSE 15.2 I'm having trouble with playing. Never had any other problem with either audio or video.
Comment 5•4 years ago
•
|
||
It looks like that file isn't audio only:
$ MP4Box -info video_6ChWJZ1eTZc_22_48_30000x100-bug-1696413.mp4
* Movie Info *
Timescale 1000 - 2 tracks
Computed Duration 00:00:46.840 - Indicated Duration 00:00:46.874
Fragmented File: no
File suitable for progressive download (moov before mdat)
File Brand isom - version 512
Compatible brands: isom iso2 avc1 mp41
Created: UNKNOWN DATE Modified: UNKNOWN DATE
File has no MPEG4 IOD/OD
iTunes Info:
Encoder Software: Lavf57.71.100
1 UDTA types: meta (1)
Track # 1 Info - TrackID 1 - TimeScale 12800
Media Duration 00:00:46.840 - Indicated Duration 00:00:46.840
Track has 1 edit lists: track duration is 00:00:46.840
Media Info: Language "English (eng)" - Type "vide:avc1" - 1171 samples
Visual Sample Entry Info: width=30000 height=100 (depth=24 bits)
Visual Track layout: x=0 y=0 width=10000 height=100
MPEG-4 Config: Visual Stream - ObjectTypeIndication 0x21
AVC/H264 Video - Visual Size 30000 x 100
AVC Info: 1 SPS - 1 PPS - Profile High @ Level 6.2
NAL Unit length bits: 32
Pixel Aspect Ratio 1:3 - Indicated track size 10000 x 100
Chroma format YUV 4:2:0 - Luma bit depth 8 - chroma bit depth 8
SPS#1 hash: 6F1730775AB5A7CE9E357C28360E214238667B16
PPS#1 hash: 13AB45160FA3621A954BC11888524E1E8055A5B5
Self-synchronized
RFC6381 Codec Parameters: avc1.64003E
Average GOP length: 167 samples
Max sample duration: 512 / 12800
Track # 2 Info - TrackID 2 - TimeScale 22050
Media Duration 00:00:46.873 - Indicated Duration 00:00:46.873
Track has 1 edit lists: track duration is 00:00:46.827
Media Info: Language "English (eng)" - Type "soun:mp4a" - 1010 samples
MPEG-4 Config: Audio Stream - ObjectTypeIndication 0x40
MPEG-4 Audio AAC LC (AOT=2 implicit) - 1 Channel(s) - SampleRate 22050
Synchronized on stream 1
RFC6381 Codec Parameters: mp4a.40.2
Alternate Group ID 1
All samples are sync
Max sample duration: 1024 / 22050
I'm guessing the problem here is the video track which is declared to be 30000 x 100
but doesn't contain valid data. Probably that's what's causing the out of memory on decode.
Comment 6•4 years ago
|
||
I removed the video track like so:
$ MP4Box -single 2 video_6ChWJZ1eTZc_22_48_30000x100-bug-1696413.mp4 -out bug-1696413-audio-only.mp4
Does it work for you now?
Comment 7•4 years ago
|
||
And for future reference, This ValidateBufferAndPicture
check is where it's failing on linux, but that code isn't even reached on macOS.
Hi Jon,
Thanks so much.
I can confirm the modified file plays perfectly fine. Even on FF 78.7.1esr (= current = openSUSE Leap 15.2).
Just FYI, this is actually a sound file from a language course. I'm surprised to learn you've found a video track inside of it!
Comment 9•4 years ago
|
||
I'm changing this to an enhancement to handle this file better since the input is bad.
If possible, it would be interesting to know what tool was used to author the file so we can follow up and file a bug. Do you have any idea, or could you put us in touch with someone who would know?
Reporter | ||
Comment 10•4 years ago
|
||
(In reply to Jon Bauman [:jbauman:] from comment #9)
I'm changing this to an enhancement to handle this file better since the input is bad.
I'd respectfully disagree. NS_ERROR_OUT_OF_MEMORY is a failure on FF to handle the data. And the only reason I discovered it is because I downloaded the clip and ran it from the command line. Average Joe User doesn't know this and just sees a FF webpage which doesn't work.
Additionally Chrome and ffmpeg play the sound file correctly (although that's a little argumentative).
Lastly there's a difference with MacOS where it plays fine (as per your assessment).
All things combined I really think this is an issue with FF on Linux, which should be dealt with. And not handled as an enhancement request.
If possible, it would be interesting to know what tool was used to author the file so we can follow up and file a bug. Do you have any idea, or could you put us in touch with someone who would know?
I can try to find out and report back.
Reporter | ||
Comment 11•4 years ago
|
||
I've contacted the language course provider. They've told me that they create the sound clips in Adobe Premiere. They claim Premiere doesn't allow generating a single audio track. I'm not on Apple, so other than relaying this comment there's nothing for me in it.
They already have plans for moving away from Premiere to something else. They didn't didn't disclose what that would be.
Comment 12•4 years ago
|
||
For what it's worth, the course provider could use MP4Box the same way I did in comment 6 to fix their Premiere files. It's part of the free software package gpac. It also looks like Premier is capable of exporting audio only, but I can't test that myself.
Description
•