No V4L2 H265 hw. accel. with 6.12.17/18 (moonlight-qt)

This forum is for topics dealing with problems with software specifically in the AArch64 repo.

No V4L2 H265 hw. accel. with 6.12.17/18 (moonlight-qt)

Postby vaar » Wed Mar 12, 2025 8:39 pm

I use a raspberry pi 4 to stream games from my linux pc to my tv (sunshine in the pc, moonlight-qt in the rpi). It worked great until recent kernels. I get (in stderr):

Failed to find a V4L2 device for H265

However with 6.12.11:

Hwaccel V4L2 HEVC stateless V4; devices: /dev/media0,/dev/video19; buffers: src DMABuf, dst DMABuf; swfmt=rpi4_10

The problem is /dev/video19 does not exist with the recent kernels... goes from 18 to 20.

Do I have to use a new option in config.txt? Or was the feature not compiled?
vaar
 
Posts: 10
Joined: Sat Nov 09, 2019 9:05 am

Re: No V4L2 H265 hw. accel. with 6.12.17/18 (moonlight-qt)

Postby vaar » Wed Mar 19, 2025 4:08 pm

Updated to 6.12.19, now there *is* a /dev/video19, but does not seem to support whatever is required by moonlight-qt:

00:00:01 - FFmpeg: [hevc @ 0xaaaae45239c0] probe_video_device: path=/dev/video19 capabilities=0x4204000
00:00:01 - FFmpeg: [hevc @ 0xaaaae45239c0] /dev/video19: Buf caps 0x1d insufficient

and later:

00:00:01 - FFmpeg: [hevc @ 0xaaaae45239c0] Failed to find a V4L2 device for H265
00:00:01 - FFmpeg: [hevc @ 0xaaaae45239c0] Failed setup for format drm_prime: hwaccel initialisation returned error.
00:00:01 - FFmpeg: [hevc @ 0xaaaae45239c0] Format drm_prime not usable, retrying get_format() without it.
00:00:01 - FFmpeg: [hevc @ 0xaaaae45239c0] Error parsing NAL unit #3.




With 6.12.11:

00:00:01 - FFmpeg: [hevc @ 0xaaaac960fc80] probe_video_device: path=/dev/video19 capabilities=0x4204000
00:00:01 - FFmpeg: [hevc @ 0xaaaac960fc80] Adding: /dev/media0,/dev/video19 pix=0x35363253, type=10

and later:

00:00:01 - FFmpeg: [hevc @ 0xaaaac960fc80] Trying V4L2 devices: /dev/media0,/dev/video19
00:00:01 - FFmpeg: Dmabufs using Vidbuf
00:00:01 - FFmpeg: ctl_cma_new2: Not using dma_heap device /dev/dma_heap/vidbuf_cached: No such file or directory
00:00:01 - FFmpeg: ctl_cma_new2: Using dma_heap device /dev/dma_heap/linux,cma
00:00:01 - FFmpeg: [hevc @ 0xaaaac960fc80] Dmabufs opened - try dmabuf buffers
00:00:01 - FFmpeg: [hevc @ 0xaaaac960fc80] V4L2 HEVC stateless V4 probed successfully: driver v 0x60c0b
00:00:01 - FFmpeg: [hevc @ 0xaaaac960fc80] Slots=9: Reordering=2, threads=1, hw+=-1
00:00:01 - FFmpeg: [hevc @ 0xaaaac960fc80] frame_params: avctx=0xaaaac960fc80 ctx=0xaaaac99e6ae0 hw_frames_ctx=0xaaaac99baef0 hwfc=0xaaaac99fdc50 pool=(nil) width=1344 height=736 initial_pool_size=0
00:00:01 - FFmpeg: [hevc @ 0xaaaac960fc80] Failed to query ext id=0xa40a97, err=22
00:00:01 - FFmpeg: [hevc @ 0xaaaac960fc80] set_controls: Max slices 4096
00:00:01 - FFmpeg: [hevc @ 0xaaaac960fc80] set_controls: Entry point offsets 0
00:00:01 - FFmpeg: [hevc @ 0xaaaac960fc80] Hwaccel V4L2 HEVC stateless V4; devices: /dev/media0,/dev/video19; buffers: src DMABuf, dst DMABuf; swfmt=rpi4_10

... and moonlight works fine.
vaar
 
Posts: 10
Joined: Sat Nov 09, 2019 9:05 am

Re: No V4L2 H265 hw. accel. with 6.12.17/18 (moonlight-qt)

Postby Duanra » Fri Apr 04, 2025 5:20 pm

Moonlight always complain about hardware accel is missing. Isn't it supposed to be included in the RPi5?
I'm using 6.12.21-1-rpi-16k
Duanra
 
Posts: 6
Joined: Fri Apr 04, 2025 5:17 pm

Re: No V4L2 H265 hw. accel. with 6.12.17/18 (moonlight-qt)

Postby graysky » Fri Apr 04, 2025 6:31 pm

No idea what moonlight-qt is but if you need hwaccel ffmpeg, that is provided by ffmpeg-rpi.
graysky
Developer
 
Posts: 1876
Joined: Sun Jun 26, 2011 6:56 am
Location: /run/user/1000

Re: No V4L2 H265 hw. accel. with 6.12.17/18 (moonlight-qt)

Postby Duanra » Thu Apr 10, 2025 1:16 pm

It's a gaming streaming app [url=https://aur.archlinux.org/packages/moonlight-qt-git] on the AUR [/url]

That would explain a lot... I have no idea how to use the ffmpeg-rpi instead of the default ffmpeg, especially for compiling. I'll research :idea:
Duanra
 
Posts: 6
Joined: Fri Apr 04, 2025 5:17 pm

Re: No V4L2 H265 hw. accel. with 6.12.17/18 (moonlight-qt)

Postby vaar » Mon Apr 14, 2025 4:22 pm

Again: it works fine with 6.12.11 and older kernels. I've been streaming flawlessly for many months from my PC with sunshine to the RPi 4 with moonlight. No need for a different ffmpeg. Downgrade to 6.12.11 -> works. Update to 6.12.17/18 -> does not work. The kernel is the only package I change between fast, hardware-accelerated streaming and a terribly slow experience.

The PKGBUILD I use is much simpler than the one in AUR, it uses the deb from buster without any problems:

[code]_pkgname=moonlight-qt
pkgname=$_pkgname-bin
pkgver=6.1.0
pkgrel=3
pkgdesc='Moonlight streaming client'
arch=(aarch64)
url="https://github.com/moonlight-stream/$_pkgname"
license=(GPL3)
depends=(libxv qt5-quickcontrols2 qt5-svg openssl-1.1)
conflicts=($_pkgname)
source=("https://dl.cloudsmith.io/public/moonlight-game-streaming/$_pkgname/deb/raspbian/pool/buster/main/m/mo/${_pkgname}_$pkgver-$pkgrel/${_pkgname}_$pkgver-${pkgrel}_arm64.deb")
sha256sums=(SKIP)

package() {
tar xf data.tar.xz -C "${pkgdir}"
rm -rf "${pkgdir}"/lib/
}
[/code]

Anyway, I moved on to a 86€ Intel N100 from AliExpress (with an USB microcontroller for GPIOs), tired of dealing with bugs like this. Couldn't be happier. Goodbye, ARM.
vaar
 
Posts: 10
Joined: Sat Nov 09, 2019 9:05 am

Re: No V4L2 H265 hw. accel. with 6.12.17/18 (moonlight-qt)

Postby graysky » Wed Apr 16, 2025 7:01 pm

vlc-rpi is compiled against ffmpeg-rpi and then it is used as a drop-in for ffmpeg so you could try rebuilding your software against it. See the vlc-rpi PKGBUILD on the github repo as an example.
graysky
Developer
 
Posts: 1876
Joined: Sun Jun 26, 2011 6:56 am
Location: /run/user/1000

Re: No V4L2 H265 hw. accel. with 6.12.17/18 (moonlight-qt)

Postby Duanra » Thu Apr 17, 2025 11:39 am

Thanks for the help. Can't get it to compile, without surprise. Back to regular setup, I don't understand this RPi5. Thanks again!
Duanra
 
Posts: 6
Joined: Fri Apr 04, 2025 5:17 pm


Return to ARMv8

Who is online

Users browsing this forum: No registered users and 30 guests