[arch-general] Hardware video acceleration
Hi, when playing youtube videos hardware video acceleration seems to gain absolutely nothing on my machine or I've done something wrong ;). Am I missing something? The percent values playing a youtube video with and without enhanced- h264ify are raw estimated values, based upon my impression, so I consider those values as quasi equal, the minimal difference is neglectable. https://addons.mozilla.org/firefox/addon/enhanced-h264ify/ https://chrome.google.com/webstore/detail/enhanced-h264ify/omkfmpieigblcllmk... $ firefox --safe-mode https://www.youtube.com/watch?v=wqLEg0MsSMQ & top %Cpu(s): 14 us 22% Web Content 14% firefox $ firefox https://www.youtube.com/watch?v=wqLEg0MsSMQ & top [x] Block VP8 [x] Block VP9 [x] Block AV1 %Cpu(s): 13 us 20% Web Content 15% firefox $ google-chrome-stable https://www.youtube.com/watch?v=wqLEg0MsSMQ & top [x] Block VP8 [x] Block VP9 [x] Block AV1 %Cpu(s): 8 us 14% chrome 13% chrome [ ] Block VP8 [ ] Block VP9 [ ] Block AV1 %Cpu(s): 11 us 15% chrome 14% chrome $ hwinfo --cpu | grep Model | sort -u; vainfo Model: 6.60.3 "Intel(R) Celeron(R) CPU G1840 @ 2.80GHz" vainfo: VA-API version: 1.5 (libva 2.5.0) vainfo: Driver version: Intel i965 driver for Intel(R) Haswell Desktop - 2.3.0 vainfo: Supported profile and entrypoints VAProfileMPEG2Simple : VAEntrypointVLD VAProfileMPEG2Simple : VAEntrypointEncSlice VAProfileMPEG2Main : VAEntrypointVLD VAProfileMPEG2Main : VAEntrypointEncSlice VAProfileH264ConstrainedBaseline: VAEntrypointVLD VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice VAProfileH264Main : VAEntrypointVLD VAProfileH264Main : VAEntrypointEncSlice VAProfileH264High : VAEntrypointVLD VAProfileH264High : VAEntrypointEncSlice VAProfileH264MultiviewHigh : VAEntrypointVLD VAProfileH264MultiviewHigh : VAEntrypointEncSlice VAProfileH264StereoHigh : VAEntrypointVLD VAProfileH264StereoHigh : VAEntrypointEncSlice VAProfileVC1Simple : VAEntrypointVLD VAProfileVC1Main : VAEntrypointVLD VAProfileVC1Advanced : VAEntrypointVLD VAProfileNone : VAEntrypointVideoProc VAProfileJPEGBaseline : VAEntrypointVLD $ uname -rvm; rtirq status 5.2.0-rt1-0-cornflower #1 SMP PREEMPT RT Thu Jul 18 09:49:07 CEST 2019 x86_64 PID CLS RTPRIO NI PRI %CPU STAT COMMAND 206 FF 90 - 130 0.0 S irq/28-xhci_hcd 207 FF 90 - 130 0.0 S irq/16-ehci_hcd 211 FF 89 - 129 0.0 S irq/23-ehci_hcd 336 FF 85 - 125 0.0 S irq/16-snd_hdsp 363 FF 80 - 120 0.0 S irq/16-snd_ice1 126 FF 50 - 90 0.0 S irq/9-acpi 138 FF 50 - 90 0.0 S irq/8-rtc0 205 FF 50 - 90 0.0 S irq/1-i8042 213 FF 50 - 90 0.0 S irq/29-ahci[000 324 FF 50 - 90 0.0 S irq/30-mei_me 325 FF 50 - 90 0.0 S irq/5-parport0 327 FF 50 - 90 0.0 S irq/18-i801_smb 338 FF 50 - 90 0.0 S irq/32-i915 387 FF 50 - 90 0.0 S irq/33-snd_hda_ 559 FF 50 - 90 0.0 S irq/31-enp3s0 9 TS - 0 19 0.4 S ksoftirqd/0 23 TS - 0 19 0.4 S ksoftirqd/1 $ pacman -Q intel-hybrid-codec-driver libva libva-utils intel-hybrid-codec-driver 2.0.0.r169.edead0c-2 libva 2.5.0-1 libva-utils 2.5.0-1 $ pacman -Q firefox google-chrome firefox 68.0.1-2 google-chrome 75.0.3770.142-1 $ pacman -Q x264 x264 2:157.r72db4377-1 Regards, Ralf -- pacman -Q linux{,-rt{-cornflower,-pussytoes,,-securityink}}|cut -d\ -f2 5.2.1.arch1-1 5.2_rt1-0 5.0.21_rt16-1 5.0.19_rt11-1 4.19.50_rt22-0
On Sun, 2019-07-21 at 16:00 +0200, Ralf Mardorf wrote:
The percent values playing a youtube video with and without enhanced- h264ify are raw estimated values ^^^^^^ average values ;) based upon the output of top
Hi Ralf,
when playing youtube videos hardware video acceleration seems to gain absolutely nothing on my machine or I've done something wrong ;).
Rather than use Firefox, have you tried ‘mpv foo.mp4’ so you can see what it outputs about its video out, ‘VO’, choice before it starts playing? It may be easier to investigate with a non-GUI video player. -- Cheers, Ralph.
On Sun, 2019-07-21 at 18:16 +0100, Ralph Corderoy wrote:
have you tried ‘mpv foo.mp4’ so you can see what it outputs about its video out, ‘VO’, choice before it starts playing?
Hi, thank you Ralph. $ ffmpeg -i IMG_2907.MOV -vcodec libx264 mp4_2907.mp4 [snip] $ mpv mp4_2907.mp4 Playing: mp4_2907.mp4 (+) Video --vid=1 (*) (h264 1920x1080 29.970fps) (+) Audio --aid=1 (*) (aac 2ch 44100Hz) VO: [gpu] 1920x1080 yuv420p [ao/alsa] Playback open error: Device or resource busy [ao/oss] Can't open audio device /dev/dsp: No such file or directory AO: [jack] 44100Hz stereo 2ch floatp AV: 00:00:06 / 00:00:06 (99%) A-V: 0.000 Exiting... (End of file) top CPU >20% mpv with spikes up to ≈70% $ mpv --hwdec=vaapi mp4_2907.mp4 Playing: mp4_2907.mp4 (+) Video --vid=1 (*) (h264 1920x1080 29.970fps) (+) Audio --aid=1 (*) (aac 2ch 44100Hz) [vo/gpu/vaapi-egl] vaAcquireSurfaceHandle() failed (invalid VASurfaceID) Cannot load libcuda.so.1 Using hardware decoding (vaapi). VO: [gpu] 1920x1080 vaapi[nv12] [ao/alsa] Playback open error: Device or resource busy [ao/oss] Can't open audio device /dev/dsp: No such file or directory AO: [jack] 44100Hz stereo 2ch floatp AV: 00:00:06 / 00:00:06 (99%) A-V: 0.000 Exiting... (End of file) top CPU ≈10% mpv no mentionable spikes Regards, Ralf
On Sun, Jul 21, 2019 at 4:01 PM Ralf Mardorf via arch-general <arch-general@archlinux.org> wrote:
Hi,
when playing youtube videos hardware video acceleration seems to gain absolutely nothing on my machine or I've done something wrong ;).
Am I missing something?
Neither Chrome nor Firefox support accelerated video decoding on Linux. We briefly patched it into chromium a while back, but retracted those patches because they were buggy.
On Sun, 2019-07-21 at 21:22 +0200, Jan Alexander Steffens wrote:
On Sun, Jul 21, 2019 at 4:01 PM Ralf Mardorf via arch-general <arch-general@archlinux.org> wrote:
Hi,
when playing youtube videos hardware video acceleration seems to gain absolutely nothing on my machine or I've done something wrong ;).
Am I missing something?
Neither Chrome nor Firefox support accelerated video decoding on Linux.
We briefly patched it into chromium a while back, but retracted those patches because they were buggy.
Thank you Jan, despite strange messages, it works when using mpv :). Regards, Ralf
On 21-07-19 21:46:42 +0200, Ralf Mardorf via arch-general wrote:
despite strange messages, it works when using mpv :). Yeah, those are just probing for nvidia stuff; not exactly errors. I also found that vp9 is pretty good with software decoding but things take a nosedive when you have to downscale or upscale a video in software. I used to do launch all videos on mpv from firefox before vp9 due to hwdec but now it doesn't matter much.
-- Regards Jagan PUBKEY: https://j605.tk/pgp
participants (4)
-
Jagannathan Tiruvallur Eachambadi
-
Jan Alexander Steffens
-
Ralf Mardorf
-
Ralph Corderoy