Smooth UHD / 4K h264 playback with mpv
#1
Hi all

After putting it off for months then waiting weeks for it to arrive from the US (I live in England) my rock64 arrived today!

One of the biggest draws for me of the rock64 over the RPi3 etc is the ability to decode and play UHD and 4K h264 in hardware. I've already verified this works with my UHD h264 videos under LibreELEC but I found LibreELEC to be very unstable and I really want to use 'desktop linux' with mpv as it is a superior video player. The only 'proper' Linux distro I have tried so far on my r64 has been bionic-lxde-rock64-0.6.44 but when I try playing my h264 files (that play fine under LibreELEC) using rkmpv I get lots of horizontal green lines and a very poor, jerky frame rate.

So, which version of which distro has the best HW accelerated video playback under mpv? Does HW video decoding (and OGLES 2 3D accel) work under armbian xenial? How about arch?

I found this guide useful, if incomplete:

https://github.com/ayufan-rock64/linux-b...layback.md
  Reply
#2
The guide I linked to above seems to indicate libmali is required for hardware video decoding under mpv. It also mentions a specific minimum ayufan kernel version. Does ayufan's kernel contain a specific patch for this (rkmpp) that may not be present in armbian xenial, for example? Are the ayufan bionic distros the only ones where this should work currently, without patching your kernel?

Is it still the case that we have to choose between accelerated fullscreen video and working GLES or has that been fixed now?

The guide could also be improved by listing the video codecs that are supported by rkmpp.
  Reply
#3
I've filed a bug report for this on ayufan's linux-build github repo here:

https://github.com/ayufan-rock64/linux-build/issues/249
  Reply
#4
Thanks. Think you could give 0.7.8 a go (https://github.com/ayufan-rock64/linux-build/releases) and after contribute here: https://github.com/ayufan-rock64/linux-build/issues/243 ?

cheers
You can find me on IRC, Discord and Twitter


  Reply
#5
Hi Luke

I didn't know about the 0.7.8 pre-release - thanks for pointing that out. I'll give it a go shortly and report back.

Thanks
  Reply
#6
Hi Luke

I've tested mpv under the 0.7.8 pre-release now and added my feedback to that ticket. It has the same issues as 0.6.44 unfortunately.
  Reply
#7
You won't be able to have smooth 4k playing with rkmpv.

IIRC the rendering process with bionic (Xorg) in not HW but sadly for the moment in SW and rock64 is not powerfull enough. You can easily decode 4K videos but not render at 4K resolution.
With libreelec ( thanks to Kwiboo) all the process is in HW.

You can try to lower the render resolution with --drm-mode ( don't remember --drm-mode=21 or --drm-mode=17 to have 1080p@60hz) or better with https://github.com/lvml/mpv-plugin-xrandr .
Laste time I tried 4K HEVC 10Bits rendered @1080p played well.
  Reply
#8
I'm not bothered about being able to play videos in a window using mpv, I'd just prefer to use mpv instead of kodi so whatever (full screen) video output mode kodi uses I want to see that working just as well under mpv, even if it means having to exit X before running it. mpv supports all of the common Linux video output modes so I presume it already supports whichever one kodi/libreELEC uses.
  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Delayed sound playback omkar.ppk@gmail.com 0 1,722 06-28-2018, 03:41 PM
Last Post: omkar.ppk@gmail.com
  H264 hardware encoder not work sueshieh 3 7,150 11-02-2017, 03:57 AM
Last Post: dalmate

Forum Jump:


Users browsing this thread: 3 Guest(s)