PINE64
Smooth UHD / 4K h264 playback with mpv - Printable Version

+- PINE64 (https://forum.pine64.org)
+-- Forum: ROCK64 (https://forum.pine64.org/forumdisplay.php?fid=85)
+--- Forum: Linux on Rock64 (https://forum.pine64.org/forumdisplay.php?fid=88)
+--- Thread: Smooth UHD / 4K h264 playback with mpv (/showthread.php?tid=6305)



Smooth UHD / 4K h264 playback with mpv - danboid - 07-23-2018

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-build/blob/master/recipes/video-playback.md


RE: Smooth UHD / 4K h264 playback with mpv - danboid - 07-23-2018

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.


RE: Smooth UHD / 4K h264 playback with mpv - danboid - 07-24-2018

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


RE: Smooth UHD / 4K h264 playback with mpv - Luke - 07-24-2018

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


RE: Smooth UHD / 4K h264 playback with mpv - danboid - 07-24-2018

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


RE: Smooth UHD / 4K h264 playback with mpv - danboid - 07-24-2018

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.


RE: Smooth UHD / 4K h264 playback with mpv - easyfab - 07-24-2018

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.


RE: Smooth UHD / 4K h264 playback with mpv - danboid - 07-24-2018

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.