VAAPI H264 playback error https://dumpert.nl : NS_ERROR_DOM_MEDIA_DECODE_ERR (0x806e0004) ... avcodec_send_packet error: -1094995529
Categories
(Core :: Audio/Video: Playback, defect)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox96 | --- | disabled |
People
(Reporter: banetmp+zxgfk, Unassigned)
References
(Blocks 1 open bug)
Details
Attachments
(5 files)
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:100.0) Gecko/20100101 Firefox/100.0
Steps to reproduce:
Firefox:
Nightly 20211130214422 100 experiment opt-in
media.ffmpeg.vaapi.enabled - true
media.ffmpeg.vaapi-drm-display.enabled - true
System:
Ubuntu 21.10 kernel 5.14.0-18.1 (comment: happens on newer kernels as well)
ffmpeg 7:4.4-6ubuntu5
AMD R9 280x, kernel driver amdgpu, mesa 22.0~git2111270600.b5848b (comment: still happening on earlier revisions)
Actual results:
Some videos on this site have broken video playback after a few seconds, returning a visual error message from the site's VIDEOJS media framework: "The media playback was aborted due to a corruption problem or because the media used features your browser did not support."
VAAPI works fine otherwise
Example URL of affected video: https://www.dumpert.nl/?selectedId=100016246_9c1498d8
Typical console error message:
Media resource blob:https://www.dumpert.nl/bd13c90b-de1f-4d3d-aaf8-4cdc2e785da6 could not be decoded, error: Error Code: NS_ERROR_DOM_MEDIA_DECODE_ERR (0x806e0004)
Details: virtual mozilla::MediaResult mozilla::FFmpegVideoDecoder<58>::DoDecode(mozilla::MediaRawData *, uint8_t *, int, bool *, MediaDataDecoder::DecodedData &): avcodec_send_packet error: -1094995529 www.dumpert.nl
Updated•4 years ago
|
Comment 1•4 years ago
|
||
Set the Severity to S4 for now. Feel free to change it.
Martin, would you mind having a look?
Comment 2•4 years ago
|
||
(In reply to V Dunord from comment #0)
Thanks for the report! Please open about:support, click on "Copy text to clipboard" and paste it here.
If any deeper debugging is needed a requested instructions for this would be appreciated. Installing debugging packages, running the debugger, collecting the traces etc.
It needs to be noted that the problem can be reproduced on a stock system as well, as you will notice indeed the system is indicating custom kernel and mesa stack in the about:support data.
Comment 5•4 years ago
|
||
https://media.dumpert.nl/dmp/media/video/7/b/7/7b780271-2007-e690-e615-b971662f60b0/index.m3u8 is h264.
Are you able to find a regression range, if there is any?
$ sudo apt install python3-pip
$ pip3 install --user mozregression
(It's located at ~/.local/bin/mozregression.)
For example:
$ mozregression --good 94 --bad 20211203094816 --pref gfx.x11-egl.force-enabled:true gfx.webrender.all:true media.ffmpeg.vaapi.enabled:true -a https://www.dumpert.nl/?selectedId=100016246_9c1498d8 -P stdout
After testing each build, type g for good or b for bad and press enter. Then it will open the next one until you get the most narrow pushlog url.
Comment 6•4 years ago
|
||
If first build (--good) is already bad, please try a wider range (bug 1715365 landed in 91 for example):
$ mozregression --good 90 --bad 20211203094816 --pref gfx.x11-egl.force-enabled:true gfx.webrender.all:true media.ffmpeg.vaapi.enabled:true -a https://www.dumpert.nl/?selectedId=100016246_9c1498d8 -P stdout
So starting from the Firefox 80 merge date that is found on the wiki, the bug starts
INFO: First bad revision: efa2336315eda0aaf78c2e94d6c9c98106ea136b (**2020-07-03**)
Before assuming the X11 HW accel was already merged, it could not be enabled even with the following prefs
--pref gfx.x11-egl.force-enabled:true gfx.webrender.all:true media.ffmpeg.vaapi-drm-display.enabled:true media.ffmpeg.vaapi.enabled:true media.ffmpeg.dmabuf-textures.enabled:true widget.dmabuf-textures.enabled:true
From on backwards the VAAPI does not enable and firefox (f0ac79e1ed53bbdc5f0b470f6889ebfcc05fa550 (2020-07-02)) prints
D/PlatformDecoderModule DMA-Buf/VA-API can't be used, WebRender/DMA-Buf is disabled"
also for all bisection, env set to MOZ_DISABLE_CONTENT_SANDBOX=1 MOZ_X11_EGL=1 MOZ_LOG="PlatformDecoderModule:5"
I'm unable to reproduce. Please try latest nightly:
https://fedoraproject.org/wiki/How_to_debug_Firefox_problems?rd=Bug_info_Firefox#Testing_Mozilla_binaries
If you still see that please run Firefox on terminal with MOZ_LOG="PlatformDecoderModule:5" env variable set and attach the log here.
Thanks.
| Reporter | ||
Comment 10•4 years ago
|
||
vainfo returns H264 supported. Attempting playback results in segfault, yet video plays, likely without HW acceleration since log notes: disabled by platform (yet media.ffmpeg.vaapi.enabled = true)
| Reporter | ||
Comment 11•4 years ago
|
||
Possible sandboxing problems
| Reporter | ||
Comment 12•4 years ago
|
||
| Reporter | ||
Comment 13•4 years ago
|
||
Comment 14•4 years ago
|
||
There is repeatedly "/usr/share/libdrm/amdgpu.ids: Permission denied".
Updated•4 years ago
|
Updated•4 years ago
|
NS_ERROR_DOM_MEDIA_DECODE_ERR is turned into decoder restart with SW decode now.
NS_ERROR_OUT_OF_MEMORY from the last log is Bug 1761217.
So closing now.
Comment 16•3 years ago
|
||
I've been having these FFmpeg repeated failures in Firefox on Debian with and without VAAPI enabled. They can be easily reproduced with the latest nightly and VAAPI disabled.
Comment 17•3 years ago
|
||
I've opened Bug 1770656
Description
•