Skip to content
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

Orange Pi 5-Plus: MiniArch-EndeavourOS Gnome Desktop - Firefox, Chromium or MPV No VPU Hardware Acceleration #70

Open
JFLim1 opened this issue Jan 4, 2025 · 3 comments

Comments

@JFLim1
Copy link

JFLim1 commented Jan 4, 2025

Hi Piotr Oniszczuk,

Just install MiniArch EndeavourOS with Gnome desktop environment on Orange Pi 5-Plus. Firefox_v133 or Chromium_v131 both don't seem to have vpu hw acceleration when streaming Youtube h264 videos.

chromium default-flags.conf:

--incognito
--ozone-platform-hint=auto
#--use-gl=egl
--show-component-extension-options
--enable-gpu-rasterization
--no-default-browser-check
--disable-pings
--media-router=0
# Enable V4L2 decoding and  NV12 direct rendering
--enable-features=AcceleratedVideoDecoder,AcceleratedVideoDecodeLinuxGL,AcceleratedVideoDecodeLinuxZeroCopyGL

Installed mpv and yt-dlp. No luck with vpu hardware acceleration with mpv too.

Had followed the instructions to Install MiniArch and EndeavourOS.as set out in "Quick Start". Is there any other settings or packages needed to be installed to have VPU hardware acceleration on Firefox, Chromium and mpv?

Happy New Year.

@warpme
Copy link
Owner

warpme commented Jan 9, 2025

Miniarch uses the same kernel like MiniMyth2 and hw accell decode works for me well (i'm using it daily for HD tv watching)

I think issue might be at v4l2_request at chromium building.
Are you sure that your chromium build correctly detects/uses v4l2_request offered by kernel?

@JFLim1
Copy link
Author

JFLim1 commented Jan 9, 2025

I think issue might be at v4l2_request at chromium building.
Are you sure that your chromium build correctly detects/uses v4l2_request offered by kernel?

Am using the Chromium from alarm-repo and currently is Version 131.0.6778.204 (Official Build) Arch Linux ARM (64-bit). Am not sure whether v4l2_request is included.

Does mpv support v4l2_request?

@warpme
Copy link
Owner

warpme commented Jan 10, 2025

Yes - mpv supports v4l2_request
Here is output from mpv 0.39 playing h264 video
(i not provided drm_plane id - so only hw decondig is in use; there is no DMA transfers of decoded video frame to framebuffer)

● Video  --vid=1               (h264 1920x1080 25 fps)
● Audio  --aid=1  --alang=pol  (mp2 2ch 48000 Hz 320 kbps)
○ Audio  --aid=2  --alang=org  (ac3 2ch 48000 Hz 448 kbps)
○ Subs   --sid=1  --slang=pol  (dvb_teletext)
○ Subs   --sid=2  --slang=pol  (dvb_subtitle)
[vo/gpu/opengl] Initializing GPU context 'drm'
[vo/gpu/drm] VT_GETMODE failed: Inappropriate ioctl for device
[vo/gpu/drm] Failed to set up VT switcher. Terminal switching will be unavailable.
[vo/gpu/drm] Picked DRM card 0, primary node /dev/dri/card0 as the default.
[vo/gpu/drm] Driver: rockchip 1.0.0 (0)
[vo/gpu/drm] Connector 65 currently connected to encoder 64
[vo/gpu/drm] Selected Encoder 64 with CRTC 42
[vo/gpu/drm] Selected mode: 1920x1080 ([email protected])
[vo/gpu/drm] DRM Atomic support found
[vo/gpu/drm] Using primary plane 32 as draw plane
[vo/gpu/drm] Failed to find drmprime plane with idx=-2. drmprime-overlay hwdec interop will not work
[vo/gpu] GBM_FORMAT_ARGB8888 supported by draw plane.
[vo/gpu] Supported modifier: 0x0
[vo/gpu] Creating GBM device
[vo/gpu] Initializing GBM surface (1920 x 1080)
[vo/gpu/opengl] Initializing EGL
[vo/gpu/opengl] EGL_VERSION=1.5
[vo/gpu/opengl] EGL_VENDOR=Mesa Project
[vo/gpu/opengl] EGL_CLIENT_APIS=OpenGL OpenGL_ES
[vo/gpu/opengl] Trying to create Desktop OpenGL context.
[vo/gpu/opengl] Attempting to find EGLConfig matching GBM_FORMAT_ARGB8888
[vo/gpu/opengl] Found matching EGLConfig for GBM_FORMAT_ARGB8888
[vo/gpu/opengl] Initializing EGL surface
[vo/gpu] GL_VERSION='3.1 Mesa 24.3.3'
[vo/gpu] Detected desktop OpenGL 3.1.
[vo/gpu] GL_VENDOR='Mesa'
[vo/gpu] GL_RENDERER='Mali-T860 (Panfrost)'
[vo/gpu] GL_SHADING_LANGUAGE_VERSION='1.40'
[vo/gpu] Loaded extension GL_ARB_sync.
[vo/gpu] Loaded extension GL_ARB_invalidate_subdata.
[vo/gpu] Loaded extension GL_ARB_get_program_binary.
[vo/gpu] Loaded extension GL_ARB_buffer_storage.
[vo/gpu] Loaded extension GL_ARB_shader_image_load_store.
[vo/gpu] Loaded extension GL_ARB_shader_storage_buffer_object.
[vo/gpu] Loaded extension GL_ARB_arrays_of_arrays.
[vo/gpu] Loaded extension GL_ARB_debug_output.
[vo/gpu] Loaded extension GL_KHR_debug.
[vo/gpu/opengl] Preparing framebuffer
[vo/gpu/drm] crtc is not VRR capable
[vo/gpu/drm] Monitor pixel aspect: 1
[vo/gpu/opengl] Could not find path to render node.
[vo/gpu] Testing FBO format rgba16f
[vo/gpu] Using FBO format rgba16f.
[vo/gpu] Disabling HDR peak computation (one or more of the following is not supported: compute shaders=0, SSBO=1).
[vo/gpu] Assuming 60.000000 FPS for display sync.
[vd] Container reported FPS: 25.000000
[vd] Codec list:
[vd]     h264 - H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10
[vd]     h264_v4l2m2m (h264) - V4L2 mem2mem H.264 decoder wrapper
[vd]     h264_cuvid (h264) - Nvidia CUVID H264 decoder
[vd] Opening decoder h264
[vd] Looking at hwdec h264-nvdec...
[vo/gpu] Loading hwdec drivers for format: 'cuda'
[vo/gpu] Loading hwdec driver 'cuda'
Cannot load libcuda.so.1
[vo/gpu/cuda] Failed to load CUDA symbols
[vo/gpu] Loading failed.
[vd] Could not create device.
[vd] Looking at hwdec h264-vaapi...
[vo/gpu] Loading hwdec drivers for format: 'vaapi'
[vo/gpu] Loading hwdec driver 'vaapi'
[vo/gpu/vaapi] Using EGL dmabuf interop via GL_EXT_EGL_image_storage
[vo/gpu/vaapi] Trying to open a wayland VA display...
[vo/gpu/vaapi] Trying to open a drm VA display...
[vo/gpu/vaapi] Could not create a VA display.
[vo/gpu] Loading failed.
[vd] Could not create device.
[vd] Looking at hwdec h264-nvdec-copy...
[ffmpeg] AVHWDeviceContext: Cannot load libcuda.so.1
[ffmpeg] AVHWDeviceContext: Could not dynamically load CUDA
[vd] Could not create device.
[vd] Looking at hwdec h264-vaapi-copy...
[vd] Could not create device.
[vd] Looking at hwdec h264-v4l2request...
[vo/gpu] Loading hwdec drivers for format: 'drm_prime'
[vo/gpu] Loading hwdec driver 'drmprime'
[vo/gpu/drmprime] Using EGL dmabuf interop via GL_EXT_EGL_image_storage
[vo/gpu/drmprime] Using DRM device: /dev/dri/renderD128
[vo/gpu] Loading hwdec driver 'drmprime-overlay'
[vo/gpu/drmprime-overlay] Using primary plane 32 as draw plane
[vo/gpu/drmprime-overlay] Failed to find drmprime plane with idx=-2. drmprime-overlay hwdec interop will not work
[vo/gpu/drmprime-overlay] No drmprime video plane. You might need to specify it manually using --drm-drmprime-video-plane
[vo/gpu] Loading failed.
[vd] Could not create device.
[vd] Looking at hwdec h264_cuvid-cuda...
[vo/gpu] Loading hwdec drivers for format: 'cuda'
[vo/gpu] Loading hwdec driver 'cuda'
Cannot load libcuda.so.1
[vo/gpu/cuda] Failed to load CUDA symbols
[vo/gpu] Loading failed.
[vd] Could not create device.
[vd] Looking at hwdec h264_v4l2m2m-v4l2m2m...
[vo/gpu] Loading hwdec drivers for format: 'drm_prime'
[vo/gpu] Loading hwdec driver 'drmprime-overlay'
[vo/gpu/drmprime-overlay] Using primary plane 32 as draw plane
[vo/gpu/drmprime-overlay] Failed to find drmprime plane with idx=-2. drmprime-overlay hwdec interop will not work
[vo/gpu/drmprime-overlay] No drmprime video plane. You might need to specify it manually using --drm-drmprime-video-plane
[vo/gpu] Loading failed.
[vd] Trying hardware decoding via h264_v4l2m2m-v4l2m2m.
[vd] Using underlying hw-decoder 'h264_v4l2m2m'
[ffmpeg/video] h264_v4l2m2m: Could not find a valid device
[ffmpeg/video] h264_v4l2m2m: can't configure decoder
Could not open codec.
[vd] Attempting next decoding method after failure of h264_v4l2m2m-v4l2m2m.
[vd] Looking at hwdec h264-v4l2request-copy...
[vd] Trying hardware decoding via h264-v4l2request-copy.
[vd] Selected decoder: h264 - H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10
[vd] Pixel formats supported by decoder: cuda drm_prime vaapi yuv420p
[vd] Codec profile: Main (0x4d)
[vd] Requesting pixfmt 'drm_prime' from decoder.
[ffmpeg/video] h264: reference picture missing during reorder
[ffmpeg/video] h264: Missing reference picture, default is 65756
[ffmpeg/video] h264: reference picture missing during reorder
[ffmpeg/video] h264: Missing reference picture, default is 65757
[ffmpeg/video] h264: reference picture missing during reorder
[ffmpeg/video] h264: Missing reference picture, default is 65764
AO: [alsa] 48000Hz stereo 2ch s16
Using hardware decoding (v4l2request-copy).
[vd] Decoder format: 1920x1080 nv12 bt.709/bt.709/bt.1886/limited/auto CL=mpeg2/4/h264 crop=1920x1080+0+0
VO: [gpu] 1920x1080 nv12
[vo/gpu] reconfig to 1920x1080 nv12 bt.709/bt.709/bt.1886/limited/display CL=mpeg2/4/h264 crop=1920x1080+0+0
[vo/gpu] Resize: 1920x1080
[vo/gpu] Window size: 1920x1080 (Borders: l=0 t=0 r=0 b=0)
[vo/gpu] Video source: 1920x1080 (1:1)
[vo/gpu] Video display: (0, 0) 1920x1080 -> (0, 0) 1920x1080
[vo/gpu] Video scale: 1.000000/1.000000
[vo/gpu] OSD borders: l=0 t=0 r=0 b=0
[vo/gpu] Video borders: l=0 t=0 r=0 b=0
[vo/gpu] Reported display depth: 8
[vo/gpu] Texture for plane 0: 1920x1080
[vo/gpu] Texture for plane 1: 960x540
[vo/gpu] Testing FBO format rgba16f
[vo/gpu] Using FBO format rgba16f.
[ffmpeg/demuxer] mpegts: PES packet size mismatch
[ffmpeg/demuxer] mpegts: Packet corrupt (stream = 1, dts = 6690260374).
[vo/gpu] Dither to 8.
AV: 00:02:04 / 00:02:04 (100%) A-V:  0.000 Cache: 0.0s

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants