Index | Thread | Search

From:
José Maldonado <josemald89@gmail.com>
Subject:
Re: Enable VA-API in graphics/ffmpeg
To:
Rafael Sadowski <rafael@sizeofvoid.org>
Cc:
ports <ports@openbsd.org>
Date:
Wed, 24 Jul 2024 05:17:17 -0400

Download raw body.

Thread
  • Rafael Sadowski:

    Enable VA-API in graphics/ffmpeg

  • El mié, 24 jul 2024 a la(s) 2:01 a.m., Rafael Sadowski
    (rafael@sizeofvoid.org) escribió:
    >
    > On Sun Jul 21, 2024 at 04:58:15PM GMT, Lucas Gabriel Vuotto wrote:
    > > On Sat, Jul 20, 2024 at 11:32:29AM GMT, Rafael Sadowski wrote:
    > > > OK to enable VA-API? It only depends on xenocara libva. Since libva
    > > > builds on almost all arches, I see no reason to restrict it by CPU
    > > > architectures any further.
    > >
    > > This worked well with mpv but is giving me issues in Firefox:
    >
    > I can confirm that it works well with mpv(1) but not in ff. In my last
    > test I only tested WebGL and simple youtube stuff.
    
    Let me tell my story...I have ffmpeg and mpv with the VAAPI patch
    active, and I use mpv constantly for videos (even with GLSL shaders
    and using Vulkan's video output).
    
    So far no problems on an old AMD RX 580.
    
    First, I was able to solve my problem with acceleration in Firefox
    using this about:config option
    
    media.ffmpeg.vaapi.enabled = true
    
    Once I enabled it, in about:support I saw h264 hardware decoding
    support (but not h265 and my card is capable). VP8 and VP9 support is
    something my old RX 580 doesn't have, so I can't test the 4k video you
    posted.
    
    >
    > I have not noticed taht playing youtube run on my CPU. That's because up
    > to 1080p60 always runs smoothly. But 2160p60 is the end of the line
    > here.
    >
    > What I cannot confirm, any disadvantages with enabling or disabling
    > VAAPI.
    >
    
    Using HWaccel in Firefox (in my case only work with h264) the CPU
    usage drop a 10% aprox in 1080p60. Nice!
    
    > >
    > > - Invidious instances (YouTube alternative frontend) give me "No
    > >   compatible source was found for this media"
    > > - Twitch gives a similar message
    > > - Couldn't test in YouTube because it thinks I'm a bot
    >
    > WTF!
    >
    > > - Some meme pages show webms just fine
    >
    > I don't see it, I'll test it with a new profile. Can you give me a test
    > example?
    >
    > >
    > > In any case, disabling hardware media decoding didn't help. Rolling back
    > > to 4.4.4p3 (that's what's in cdn.openbsd.org) makes the issues go away.
    > > I can try with 4.4.4p4 too (adds --disable-vaapi), if it's needed.
    > >
    > >       Lucas
    > >
    >
    > Can AMD users play https://www.youtube.com/watch?v=LXb3EKWsInQ in
    > 2160p60 on FF without blowing the CPU?
    >
    > If so, it is only an Intel problem
    >
    
    This video in 2160p60 use VP9 codec, in my case I don´t have hwaccel
    for this codec but testing the CPU goes to 40-45% use.
    
    In any case, my best experience is with ffmpeg+mpv, in this case VAAPI
    works perfectly even with my custom mpv configuration which is quite
    demanding (several GLSL including one that simulates FSR, I have
    tested it with resolutions up to 2160p60 in h264 and h265, and no
    problems with acceleration).
    
    
    -- 
    "Dios en su Cielo, todo bien en la Tierra"
    ***********************************************
    
    
    
  • Rafael Sadowski:

    Enable VA-API in graphics/ffmpeg