(06-18-2020, 12:09 PM)as400 Wrote: I am trying to understand how hw video accel things work in general. For me it's one big mess to be honest
So maybe I will ask a question - what should I do to enable hw video accel on Firefox or Chromium ?
Thanks for your work @xmixahlx.
well, i completely agree that it is a big mess. it is that way because the v4l2 APIs are not yet stable, and we have two different VPU drivers for different codecs: hantro and rkvdec.
while many folks are working on these bits upstream, kwiboo and jernej from the libreelec+kodi team have put in a tremendous amount of work to make a usable WIP system, and that work is what this hwaccel patch is based on right now.
now:
in the mainline kernel, you have mpeg2 and h264 support. the hwaccel patch provides for x264 10bit, x265 8bit and 10bit, vp8 and vp9, as well as patching ffmpeg with the v4l2request API necessary for userspace to use these kernel drivers, like with kodi. currently, drm hwaccel is what is working "best". i currently use kodi + inputstream.adaptive + youtube and jellyfin to playback my media with great success, all hardware decoded. awesome.
coming up:
gstreamer has a new v4l2codecs project in gstreamer-plugins-bad that has a usable h264 decoder. VAAPI is currently broken, but DID support mpeg2 months ago. there was some work to add hantro support to libva and libva-v4l2-request with some success, but that has since broken with an ffmpeg bug and since the kernel has progressed since that development. (you must use the current kernel media headers otherwise the whole system breaks.)
firefox and chromium will depend on VAAPI, but VAAPI is still a ways away. also, since the hantro and rkvdec patches needed to work with libva will never be upstreamed, this approach seems complicated.
(06-19-2020, 02:58 AM)codanostra Wrote: Just wanted to say thanks for this one! It's a great set of tools, really appreciate the hardwork and effort
thanks, and you're welcome.
added pbp-build-alacritty