We use some essential cookies to make our website work.

We use optional cookies, as detailed in our cookie policy, to remember your settings and understand how you use our website.

3 posts • Page 1 of 1
mad.daemon
Posts: 5
Joined: Sun Jun 15, 2025 12:57 pm

Is it possible to use accelerated H264 encoding with upstream 6.x kernel on RPI2 in 2025?

Mon Jun 16, 2025 8:12 pm

Hello,

I have a bunch of Pi's, all running upstream Debian (not Raspbian) Bookworm with upstream (a.k.a. mainline or vanilla) 6.x kernels. A few months ago I spent quite a lot of time of trying to get ffmpeg working with h264_v4l2m2m codec on Pi 4B, but I never managed to get it working and eventually found a mid-2024 thread in this forum which explained that support for accelerated encoding on BCM2711 wasn't merged into upstream kernel yet, so I gave up with trying to make it work on Pi 4.

Right now I'm attempting to make it work on Pi 2B v1.1 (BCM2836 SoC in mainline kernel terminology), but I'm getting basically the same results as when I failed with Pi 4B - although I seem to have all the relevant drivers (e.g. BCM2835_VCHIQ, BCM2835_VCHIQ_MMAL, V4L2_MEM2MEM_DEV, V4L_PLATFORM_DRIVERS, CONFIG_V4L_MEM2MEM_DRIVERS) compiled in my kernel, gpu_mem set to 128 in config.txt, I don't see any /dev/video* device nodes and ffmpeg's h264_v4l2m2m codec doesn't work.

So my question is as in the title - is it possible to use accelerated H264 encoding with recent upstream kernels (tried 6.1.141 and 6.12.33) upstream kernels on Rpi 2B? And if it's possible, which way should work (h264_v4l2m2m or h264_omx)?

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 18476
Joined: Wed Dec 04, 2013 11:27 am

Re: Is it possible to use accelerated H264 encoding with upstream 6.x kernel on RPI2 in 2025?

Tue Jun 17, 2025 11:15 am

No it's still not in mainline.
Mainline devs are wanting vc04_services to be destaged before extra things get merged, and that is being chipped away at.
Software Engineer at Raspberry Pi Ltd. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

mad.daemon
Posts: 5
Joined: Sun Jun 15, 2025 12:57 pm

Re: Is it possible to use accelerated H264 encoding with upstream 6.x kernel on RPI2 in 2025?

Tue Jun 17, 2025 1:33 pm

Thanks for the quick reply. Now I know that a switch to a downstream kernel is inevitable when it gets to accelerated encoding (on the other hand, this will also allow me to use Pi 4 for that camera).

Also, many thanks to everyone involved in working on related drivers; the efforts spent on these so far seem just formidably enormous to me, and it's good to hear that the mainlining process is still underway!

3 posts • Page 1 of 1

Return to "Graphics programming"

AltStyle によって変換されたページ (->オリジナル) /