Closed Bug 1768838 Opened 3 years ago Closed 3 years ago

vaapi stop working and fallback to software decode after move video progress bar

Categories

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

Firefox 100
defect

Tracking

()

RESOLVED FIXED

People

(Reporter: ovearj, Unassigned)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

Attached file firefox.2.log

User Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.54 Safari/537.36

Steps to reproduce:

This is another situation happended shares exactly same operation which describe in Bug 1768830, i am not sure if it's duplicate problem.

  1. fresh install firefox
  2. set follow configration in about:config
    gfx.webrender.all=true
    media.ffmpeg.vaapi.enabled=true
    media.ffvpx.enabled=false
    media.navigator.mediadatadecoder_vpx_enabled=true
    3.run firefox with "MOZ_DISABLE_RDD_SANDBOX=1" env
    4.watch one Bilibili.com video in 4k resolution(this reslution only available with paid account)

Kernel Version: 5.17.5-arch1-1 (64-bit)
Graphics Platform: X11
Graphics Processor: Mesa Intel® UHD Graphics 630
Have tried both i965 and iHD va driver, both have this problem.

Actual results:

After enable hardware acceleration to firefox, i am unable to watch some videos like https://www.bilibili.com/video/BV12Z4y1h7cn?t=0 in 4k resolution.

Step to reproduce

  1. launch configured firefox
  2. open https://www.bilibili.com/video/BV12Z4y1h7cn?t=0 with logined paid account, switch to 4k resolution
  3. navigate any postion in video progress bar(especially unbuffered range)
  4. vaapi stop working, and firefox fallback to software decoding according intel_gpu_top
  5. firefox remains software decoding excep refresh entire page, but it will happened again if repect these procedure

Some information may help diagnose this problem.

No error log output, but i have also attached a full log with "MOZ_LOG="PlatformDecoderModule:5" option, hope this helps.

Mime Type: video/mp4;codecs="avc1.640034", audio/mp4;codecs="mp4a.40.2"

[~]$ vainfo
vainfo: VA-API version: 1.14 (libva 2.14.0)
vainfo: Driver version: Intel iHD driver for Intel(R) Gen Graphics - 22.4.1 ()
vainfo: Supported profile and entrypoints
VAProfileNone : VAEntrypointVideoProc
VAProfileNone : VAEntrypointStats
VAProfileMPEG2Simple : VAEntrypointVLD
VAProfileMPEG2Simple : VAEntrypointEncSlice
VAProfileMPEG2Main : VAEntrypointVLD
VAProfileMPEG2Main : VAEntrypointEncSlice
VAProfileH264Main : VAEntrypointVLD
VAProfileH264Main : VAEntrypointEncSlice
VAProfileH264Main : VAEntrypointFEI
VAProfileH264Main : VAEntrypointEncSliceLP
VAProfileH264High : VAEntrypointVLD
VAProfileH264High : VAEntrypointEncSlice
VAProfileH264High : VAEntrypointFEI
VAProfileH264High : VAEntrypointEncSliceLP
VAProfileVC1Simple : VAEntrypointVLD
VAProfileVC1Main : VAEntrypointVLD
VAProfileVC1Advanced : VAEntrypointVLD
VAProfileJPEGBaseline : VAEntrypointVLD
VAProfileJPEGBaseline : VAEntrypointEncPicture
VAProfileH264ConstrainedBaseline: VAEntrypointVLD
VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice
VAProfileH264ConstrainedBaseline: VAEntrypointFEI
VAProfileH264ConstrainedBaseline: VAEntrypointEncSliceLP
VAProfileVP8Version0_3 : VAEntrypointVLD
VAProfileVP8Version0_3 : VAEntrypointEncSlice
VAProfileHEVCMain : VAEntrypointVLD
VAProfileHEVCMain : VAEntrypointEncSlice
VAProfileHEVCMain : VAEntrypointFEI
VAProfileHEVCMain10 : VAEntrypointVLD
VAProfileHEVCMain10 : VAEntrypointEncSlice
VAProfileVP9Profile0 : VAEntrypointVLD
VAProfileVP9Profile2 : VAEntrypointVLD

Expected results:

Firefox stop carshing with this video, and hardware acceleration perform well.

Tested in Chome stable without this problem, so i think it may be firefox problem.

The Bugbug bot thinks this bug should belong to the 'Core::Audio/Video: Playback' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → Audio/Video: Playback
Product: Firefox → Core
Flags: needinfo?(stransky)

(In reply to ovearj from comment #0)

Tested in Chome stable without this problem, so i think it may be firefox problem.

Does Chome stable support VA-API?

Flags: needinfo?(stransky) → needinfo?(ovearj)

(In reply to Martin Stránský [:stransky] (ni? me) from comment #2)

(In reply to ovearj from comment #0)

Tested in Chome stable without this problem, so i think it may be firefox problem.

Does Chome stable support VA-API?

Yes, chrome stable support va-api for i965 driver which works fine for me (confirmed with intel_gpu_top and chrome://gpu). But it also needs some extra command line options.

Flags: needinfo?(ovearj)

By the way, there are "chrome://media-internals/" and Media tab in Chrome develop tools, which also confirms hardware accelerate works, and provide many useful infomration. I am not sure if firefox has one, but it would be great to have.

Do you see any Firefox crashes in coredumpctl ? Can you attach a backtrace if there's any?
https://fedoraproject.org/wiki/Debugging_guidelines_for_Mozilla_products#Using_coredumpctl_to_get_backtrace
Thanks.

Flags: needinfo?(ovearj)
Hi, There are plenty of firefox crashes through this guide. I randomly choose one of them, full backtrace attached below. Thanks

I think this problem is fixed in beta 101, that is why I am using beta. :D

(In reply to Ivan from comment #7)

I think this problem is fixed in beta 101, that is why I am using beta. :D

Oh, sorry for that. Let me have try with firefox nightly.

Flags: needinfo?(ovearj)

#0 0x00007ff94b4ce281 in () at /usr/lib/libavutil.so.57
#1 0x00007ff94b4bcc07 in () at /usr/lib/libavutil.so.57
#2 0x00007ff94b4bc999 in av_buffer_unref () at /usr/lib/libavutil.so.57

That bt looks promising but please install debug info packages for both firefox and ffmpeg and try to attach the backtrace again.
And yes, please try latest nightly.

Thanks.

Hi,
After some day tests, i think this bug are fixed in firefox 101 as Ivan said, and i am also not able to reproduce in Firefox 102.0a1(nightly).
Thank you all for your kind help, have a nice one!

Severity: -- → S4
Severity: S4 → S2

Okay, closing per comment 10.

Status: UNCONFIRMED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: