Testing hardware video decoding (rockchip, allwinner?)


 Share

3 3

Recommended Posts

Hello, recent upgrades to armbian are regarding kernel 5.15.

I noticed that many v4l2 fixes and enhancements went into this release, so I decided to compile ffmpeg using LibreELEC patched version and mpv over it.

mpv turns out to be statically linked with ffmpeg, so I propose it here for people who is interested in cutting edge kernel and wants to do some tests.

 

This has been tested on Debian Bullseye and Ubuntu Hirsute on following platforms:

  • Rockchip RK3228/9 (kernel 5.10, 5.14)
  • Rockchip RK3288 (kernel 5.14)
  • Rockchip RK3318/28 (kernel 5.15)

 

It should work on allwinner platforms too, but I didn't test it there.

Binaries are built by me on developing boards.

 

The binary for armhf is available here

The binary for aarch64 is available here

 

Dependencies for Debian Bullseye and Ubuntu Hirsute:

apt install libass9 libbluray2 librubberband2 libsdl2-2.0-0 libva-drm2 libva-wayland2 libva-x11-2 libva2 libvdpau1 libx264-160 libx265-192 libxss1 libxv1 libfdk-aac2

 

I have had issues with dependencies on Debian Buster/Ubuntu Focal, in particular libx264-160 and libx265-192 are not available there.

I Solved the issue downloading the packages from Debian Bullseye web page and manually installing them.

There may be the need for some other dependency depending upon your actual installation.

 

Run mpv in a virtual terminal (videos up to 4K) with this CLI:

mpv --vo=gpu --hwdec=drm --gpu-hwdec-interop=drmprime-drm --drm-draw-plane=overlay --drm-drmprime-video-plane=primary <video.mp4>

 

Mpv can be run in X11 with this other CLI, but due to buffer copying it requires a good CPU - rk3228 and rk3328 won't even play 720p, rk3288 do 720p fine:

 mpv --vo=gpu --hwdec=auto-copy --gpu-context=x11egl --gpu-hwdec-interop=drmprime-drm <video.mp4>

 

This is an experiment and your mileage may vary a lot:

  • H.264 codec should be well supported around the boards;
  • H.265 has more limited support
  • VP8 should be generally supported
  • VP9 seems to still require some work.
Link to post
Share on other sites

Donate and support the project!

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

3 3