-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
vf_scale_v4l2m2m: effective HWA scaling for raspberry-pi #42
Comments
I was told that the ISP on RPi4 cannot handle SAND30(10bit)=> SAND8(8bit) conversion but this filter indeed works for 8bit to 8bit scaling in https://getchannels.com/raspberry-pi/ |
Indeed the ISP can't handle SAND30, you need the HVS (though that only gets you RGB out) but that is harder to get at though I am working on that (via DRM rather than V4L2). I'll look at this patch when I have a bit of free time - it is something that we should have. |
that seems great. |
That's great! Since the decoder is using DRM, is it feasible to interop with the existing Vulkan filters in ffmpeg via drm-buf import/export functions to avoid extra copy-back?
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15426 |
If there was Vulcan support on the Pi then that would work. But there isn't (if I'm wrong on that point I would be delighted). |
IIRC the v3dv vulkan 1.1 driver is supported on Pi 4. |
Hey there! I'm in real need of this, how can I help to see this implemented? |
I don't know if this helps us? https://arstechnica.com/gadgets/2022/08/raspberry-pi-4-expands-3d-potential-with-vulkan-update/ |
Thank to @jc-kynesim, the v4l2 scaler seems to have progressed recently, where I found the SAND30/V4L2_PIX_FMT_NV12_10_COL128 aka 10bit. Does this mean we can now convert from HEVC 10bit to H.264 8bit using hardware? |
No - I'm afraid not - the V4L2 scaler is the ISP and that doesn't accept SAND30. The only bit of h/w on the board that can accept SAND30 is the HVS and that has 2 problems (1) it is already claimed by DRM and (2) it can only output RGB which I suspect doesn't help you. |
Also beware - the heads of nearly all my branches currently have bust h/w encode - so don't use them right now if you need that. Fix coming today or tomorrow (with any luck). |
Hello, what's the current status for this? |
With hardware acceleration enabled, I found PGS Subtitles ONLY work on the Jellyfin Media Player APP Windows version. |
@jc-kynesim Did anything change? Can I custom compile some branch which will enable H265 10bit decoding on RPI4? |
You can decode it but not transcode it. Transcoding is much more compute intensive and the CPU of Pi 4 can not handle the scaling and pixel format conversion effectively. |
I am not sure if I understand you correctly. Does that mean, that transcoding HEVC 10bit on RPI4 in Jellyfin won't ever be possible? |
It will be insanely slow before this issue is resolved. |
Nothing has changed recently. H265 h/w decode works fine (8 & 10 bit). However from the thread above it looks like you want transcode to H264 and there is no h/w path for 10bit to do that. This is a h/w limitation and so isn't going to be fixed because it can't be. If you are asking a different question then please clarify. |
My usage is media server (Jellyfin), where I have HEVC HDR 10 bit files and I want to watch them in a browser which isn't compatible with HEVC. For me it would be ok to transcode from HEVC 10bit to h264 8bit. |
Yup - so as above - cannot work. You can get quite close in h/w + s/w if you don't need more than HD, but if you want 4k then you are just doomed. |
Better to use Pi 4 as a media player or file server instead of transcoding server. |
Sad that we are still at the point where we dont have support like AMD or Intel Quick Sync, I will assume this will forever be the case for ARM. |
Dear Sir or Madam,
One of the avid users of the rpi-ffmpeg package is of course jellyfin.
For quite some time, HWA using V4L2 on a RPI has been in the making.
Currently it seems it kind of works, but performance is bad.
The reason for this seems to be a missing HWA scaling filter (
vf_scale_v4l2m2m
) in ffmpeg.After some digging it seems that a patch was created to add this filter to ffmpeg quite some time ago: https://patchwork.ffmpeg.org/project/ffmpeg/patch/20190903010230.96236-21-ffmpeg@tmm1.net/
Would it be possible to implement and/or review this patch, such that we can have a fully hardware-accelerated pipeline in jellyfin?
Thanks in advance!
Kindest regards,
Johannes
The text was updated successfully, but these errors were encountered: