The state of mainline hardware decoding
#17
(01-26-2022, 02:05 PM)sigmaris Wrote:
Code:
-c:v mjpeg_vaapi

This isn't going to get you hardware acceleration on RK3399, this is telling FFmpeg to use the VA-API to talk to the kernel/hardware, but the Hantro encoder driver in the kernel doesn't support this API, it only supports v4l2.

If there was a v4l2-accelerated MJPEG encoder in FFmpeg it would be called "mjpeg_v4l2m2m", but I don't think such an encoder exists, at least I can't see it in my list of ffmpeg -encoders, and I can't find any mention of such a thing online.

I've only seen GStreamer's v4l2jpegenc mentioned as working with the Hantro JPEG encoder, in this thread. I recommend trying the GStreamer encoder (and, the v4l2 stateless codecs e.g. v4l2slh264dec in Gstreamer 1.18 should work for hw-accelerated decoding on RK3399, too)

I'll give this a try, just to prove the hw encoding works in general.  However the request from my team was to see if v4l2 itself (and specifically not gstreamer) could be used for encoding.  Would you happen to know of a reference on how to use v4l2 directly (like on a commane line) to show hw encoding, specifically on mjpeg, on rk3399?

Also: I have a patch for ffmpeg 4.3.1 that adds v4l2_m2m_mjpeg encoder support. I don't know if it works, but it was in the pbp-tools collection back when I worked with the 5.10.17 kernel.
Michael J. Hammel
mjhammel@graphics-muse.org
michaelhammel@acm.org
  Reply


Messages In This Thread
RE: The state of mainline hardware decoding - by mjhammel - 01-26-2022, 02:35 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
Information Linux Mainline ayufan 63 106,613 05-14-2021, 10:41 AM
Last Post: Wizzard
  Hardware acceleration using FFmpeg gusarg81 0 3,150 08-21-2020, 01:36 PM
Last Post: gusarg81
  mainline kernel sound support Openwrt lucize 2 4,632 05-01-2020, 05:09 PM
Last Post: PakoSt
  Hardware Status Monitoring? Leapo 7 16,687 03-15-2020, 08:44 AM
Last Post: bendem
  Any advantages to using the mainline kernel dkebler 0 2,370 11-16-2019, 12:17 PM
Last Post: dkebler
  Does anybody run the mainline kernel? CameronNemo 3 5,214 09-09-2019, 07:56 PM
Last Post: CameronNemo
  hardware-accelerated video transcoding (Plex) on Rock64 mdr 2 8,166 02-07-2019, 03:42 PM
Last Post: mdr
  Updates on Mainline Linux Support? hnaguski 0 2,716 09-11-2018, 08:16 PM
Last Post: hnaguski
  How to do hardware decoding of video? SuperSaiyanCaleb 9 17,718 08-28-2018, 01:39 PM
Last Post: mcerveny
  H264 hardware encoder not work sueshieh 3 7,242 11-02-2017, 03:57 AM
Last Post: dalmate

Forum Jump:


Users browsing this thread: 4 Guest(s)