Seeking a video on youtube causes the hardware av1 decoding to stop processing frames until website refresh(media.ffmpeg.vaapi.enabled = true) on AMD Ryzen 6850U, Linux(fedora, opensuse tumbleweed, ubuntu).
Categories
(Core :: Audio/Video: Playback, defect)
Tracking
()
People
(Reporter: jakubby, Unassigned)
References
(Blocks 1 open bug)
Details
Attachments
(5 files)
Steps to reproduce:
- Install Fedora/Opensuse Tumbleweed/Ubuntu with media codecs enabled.
- Make sure vaapi for my gpu is installed. (For fedora also enable and install the openh264 repo).
- Go to about:config media.ffmpeg.vaapi.enabled set this to true.
- Enable the usual: bring back the old UI layout by removing empty space bringing back the search bar, set maximum tracking protection, disable system proxy settings, enable DNS over HTTPS, enable crashlogs, disable telemetry from settings, disable deceptive software protection, make the URL bar just a quick search bar for URL history, make the search bar the search bar.
- Install ublock origin.
- Login to youtube force enable AV1 on all videos.
- Play some videos, after sometime seek backwards with a mouse on a youtube player.
Actual results:
Frames don't get updated/decoded.
Expected results:
Frames get updated/decoded.
| Reporter | ||
Comment 1•2 years ago
|
||
It could be that it breaks down on x264/vp9/av1 videos, the way youtube works one of the 3 video codecs can be pushed to the web browser, I haven't verified which one gets pushed.
I'm not sure if the issue is with vaapi in general, but mpv with vaapi doing the decoding has no problem with seeking backwards and forwards.
Comment 2•2 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 correct in case you think the bot is wrong.
Updated•2 years ago
|
Comment 3•2 years ago
|
||
I assume I have the same issue. I wondered why since some days suddenly the CPU fans are going loud and I saw the decoding for Youtube videos no longer happens on the GPU but then when I restart Firefox all worked nicely again. I also checked debug output but when starting a Youtube video all seems fine. So I had the suspicion maybe things brake after lots of seeking but I didn't test further.
Comment 4•2 years ago
|
||
Thanks for the reports.
NI Stransky for VAAPI.
A copy of about:support, and logs of when the problem happen using about:logging, https://paul.cx/public/about-logging-presentation.webm shows how, nothing to install. Please make sure to upload the profile or download it, and then attach it here (or paste the link).
To automatically select the right logging configuration, please copy-paste the following in a new tab address bar:
about:logging?modules=HTMLMediaElement:4,HTMLMediaElementEvents:4,cubeb:5,PlatformDecoderModule:5,AudioSink:5,AudioSinkWrapper:5,MediaDecoderStateMachine:4,MediaDecoder:4,MediaFormatReader:5,GMP:5,EME:5,FFmpegVideo:4&threads=cubebaudio,BackgroundThreadPool,camera,capture,Compositor,decoder,GeckoMain,gmp,graph,grph,InotifyEventThread,IPDLBackground,media,ModuleProcessThread,PacerThread,RemVidChild,RenderBackend,Renderer,SocketThread,SwComposite,webrtc,TextureUpdate
Updated•2 years ago
|
Updated•2 years ago
|
Comment 5•2 years ago
|
||
Added to AMD tracker, may be a bug there. We don't enable VA-API by default on AMD due to various bugs in the drivers. Please try by different application like mpv, by runnint ' mpv --hwdec=vaapi test_clip' on terminal. mpv can play YT clips directly so you can put it to command line like:
mpv --hwdec=vaapi https://www.youtube.com/watch?v=kmk43_2dtn0
Comment 6•2 years ago
|
||
(In reply to Martin Stránský [:stransky] (ni? me) from comment #5)
Added to AMD tracker, may be a bug there. We don't enable VA-API by default on AMD due to various bugs in the drivers. Please try by different application like mpv, by runnint ' mpv --hwdec=vaapi test_clip' on terminal. mpv can play YT clips directly so you can put it to command line like:
mpv --hwdec=vaapi https://www.youtube.com/watch?v=kmk43_2dtn0
IIUC comment #1 said it's working fine with mpv.
Comment 7•2 years ago
•
|
||
(In reply to Mario Limonciello from comment #6)
(In reply to Martin Stránský [:stransky] (ni? me) from comment #5)
Added to AMD tracker, may be a bug there. We don't enable VA-API by default on AMD due to various bugs in the drivers. Please try by different application like mpv, by runnint ' mpv --hwdec=vaapi test_clip' on terminal. mpv can play YT clips directly so you can put it to command line like:
mpv --hwdec=vaapi https://www.youtube.com/watch?v=kmk43_2dtn0IIUC comment #1 said it's working fine with mpv.
I see, thanks. In such case please set 'media.ffmpeg.vaapi.force-surface-zero-copy' to 0 at about:config, restart browser and try again. That's now mpv plays the clips.
Updated•2 years ago
|
Updated•2 years ago
|
| Reporter | ||
Comment 8•2 years ago
|
||
(In reply to Martin Stránský [:stransky] (ni? me) from comment #7)
(In reply to Mario Limonciello from comment #6)
(In reply to Martin Stránský [:stransky] (ni? me) from comment #5)
Added to AMD tracker, may be a bug there. We don't enable VA-API by default on AMD due to various bugs in the drivers. Please try by different application like mpv, by runnint ' mpv --hwdec=vaapi test_clip' on terminal. mpv can play YT clips directly so you can put it to command line like:
mpv --hwdec=vaapi https://www.youtube.com/watch?v=kmk43_2dtn0IIUC comment #1 said it's working fine with mpv.
I see, thanks. In such case please set 'media.ffmpeg.vaapi.force-surface-zero-copy' to 0 at about:config, restart browser and try again. That's now mpv plays the clips.
Sadly seeking back video doesn't work on reddit(it works on youtube):
https://www.reddit.com/r/interestingasfuck/comments/1d02pt6/hawk_vs_windshield_watch_as_the_hawk_slowly/
| Reporter | ||
Comment 9•2 years ago
|
||
| Reporter | ||
Comment 10•2 years ago
|
||
Comment 11•2 years ago
|
||
(In reply to Jakub Strzelecki from comment #8)
mpv --hwdec=vaapi https://www.youtube.com/watch?v=kmk43_2dtn0
Sadly seeking back video doesn't work on reddit(it works on youtube):
https://www.reddit.com/r/interestingasfuck/comments/1d02pt6/hawk_vs_windshield_watch_as_the_hawk_slowly/
Thanks for testing.
- Is the video seeking broken in Firefox or in mpv?
- If it's broken in Firefox, can you try with media.ffmpeg.vaapi.force-surface-zero-copy ?
Thanks.
| Reporter | ||
Comment 12•2 years ago
|
||
- firefox the video breaks on seek-back. On mpv the audio breaks on seek-back and video breaks on seek forward(video+audio has fit into mpv cache/has been cached when I seeked).
- If it's broken in Firefox, can you try with media.ffmpeg.vaapi.force-surface-zero-copy: I've tried with the media.ffmpeg.vaapi.force-surface-zero-copy set to 0 as per instructions. Tihs fixes the youtube seek back, but doesn't fix it on the reddit link.
| Reporter | ||
Comment 13•2 years ago
|
||
Is the video seeking broken in Firefox or in mpv?
Youtube video works on both with force-surface-zero-copy set to 0.
Reddit video is broken on both.
Comment 14•2 years ago
|
||
Thanks. Can you run Firefox on terminal with MOZ_LOG="FFmpegVideo:5" env variable like:
MOZ_LOG="FFmpegVideo:5" firefox > log.txt 2>&1
do the broken reddit one seek with force-surface-zero-copy set to 0 and attach the log here?
Thanks.
Comment 15•2 years ago
|
||
A lot of different variables than the report but, but I CND. Here's the environment I tested it with:
- Framework 13 AMD
- AMD Phoenix
- CachyOS (Arch linux based)
- mpv 1:0.38.0-4.1
- Kernel 6.9.1-4-cachyos
- Mesa 1:24.1.0-1
- Linux firmware 20240510.b9d2bf23
I tried with both of these commands to reproduce but can seek just fine.
mpv "https://packaged-media.redd.it/r852my2zph2d1/pb/m2-res_720p.mp4?m=DASHPlaylist.mpd&v=1&e=1716825600&s=2dff9d9c5e363c950867737cb41789e7532617dd#t=0" --hwdec=vaapi
mpv "https://packaged-media.redd.it/r852my2zph2d1/pb/m2-res_720p.mp4?m=DASHPlaylist.mpd&v=1&e=1716825600&s=2dff9d9c5e363c950867737cb41789e7532617dd#t=0" --hwdec=vaapi-copy
Comment 16•2 years ago
|
||
Also CND on either YT or Reddit link on Firefox 126.
Comment 17•2 years ago
|
||
(In reply to Mario Limonciello from comment #16)
Also CND on either YT or Reddit link on Firefox 126.
Okay, can you please produce the firefox log from scenario where it's broken?
Thanks.
Updated•2 years ago
|
| Reporter | ||
Comment 18•2 years ago
|
||
(In reply to Martin Stránský [:stransky] (ni? me) from comment #14)
Thanks. Can you run Firefox on terminal with MOZ_LOG="FFmpegVideo:5" env variable like:
MOZ_LOG="FFmpegVideo:5" firefox > log.txt 2>&1
do the broken reddit one seek with force-surface-zero-copy set to 0 and attach the log here?
Thanks.
Comment 19•2 years ago
|
||
Here is the log from the working Phoenix laptop captured using:
MOZ_LOG="FFmpegVideo:5" firefox "https://packaged-media.redd.it/r852my2zph2d1/pb/m2-res_720p.mp4?m=DASHPlaylist.mpd&v=1&e=1716825600&s=2dff9d9c5e363c950867737cb41789e7532617dd#t=0" > foo.txt 2>&1
Comment 20•2 years ago
|
||
Here is the log from the working Phoenix laptop captured using:
MOZ_LOG="FFmpegVideo:5" firefox "https://packaged-media.redd.it/r852my2zph2d1/pb/m2-res_720p.mp4?m=DASHPlaylist.mpd&v=1&e=1716825600&s=2dff9d9c5e363c950867737cb41789e7532617dd#t=0" > foo.txt 2>&1
Comment 21•1 year ago
|
||
There has been AMD updates recently, can you re-test please?
Thanks.
Comment 22•1 year ago
|
||
There has been AMD updates recently, can you re-test please?
Presumably you meant to needinfo Jakub (since I couldn't reproduce the issue).
Maybe some more guidance of what version to test would be helpful for Jakub (With a release FF version or a nightly, or what).
Per guidance I provided on https://bugzilla.mozilla.org/show_bug.cgi?id=1837140 it's best to ensure you have mesa 24.3 or later.
Comment 23•1 year ago
|
||
Hi, I've tried to align Jakub's environment but still can reproduce this issue. Here is my setup:
OS: Ubuntu 24.04
kernel: 6.8.0-52-generic
Mesa: 24.0.9
VCN firmware version: ENC: 1.27 DEC: 2 VEP: 0 Revision: 0
Firefox: 126
I've confirmed hardware decoding is in use. While either playing AV1 video on youtube or the reddit video, I can seek back or forward normally.
Comment 24•1 year ago
|
||
(In reply to Alan Liu from comment #23)
Hi, I've tried to align Jakub's environment but still can reproduce this issue. Here is my setup:
OS: Ubuntu 24.04
kernel: 6.8.0-52-generic
Mesa: 24.0.9
VCN firmware version: ENC: 1.27 DEC: 2 VEP: 0 Revision: 0
Firefox: 126
I've confirmed hardware decoding is in use. While either playing AV1 video on youtube or the reddit video, I can seek back or forward normally.
I can't reproduce the issue I mean.
Comment 25•1 year ago
|
||
hi Martin, this issue is likely to have been fixed by https://gitlab.freedesktop.org/mesa/mesa/-/issues/8044
Since Mario and I both can't reproduce it now, can we close it if no more detailed info is provided?
Updated•1 year ago
|
Comment 26•1 year ago
|
||
Redirect a needinfo that is pending on an inactive user to the triage owner.
:jimm, since the bug has recent activity, could you have a look please?
For more information, please visit BugBot documentation.
Comment 27•1 year ago
|
||
Okay, closing now.
Updated•1 year ago
|
Description
•