Smooth playback of 4K videos working under Ubuntu / mpv
#1
One of the main reasons I bought my rock64 was in the hope of being able to use it to play 4K videos. Although I have achieved that previously with libreelec, libreelec/kodi would always crash or reboot on me after a while plus I'd prefer to run a regular/proper Linux distro and mpv is a much more powerful video player than kodi is.

Today I finally got 4K videos to play back smoothly using mpv under ayufan's bionic/lxde Ubuntu image. The secret, as disclosed by @fcoulombe on github, was to edit /usr/local/bin/rkmpv and add:


 --drm-mode=21

To the mpv options, which fixed the green lines and very jerky playback I was experiencing without. A lot of my videos require that I also use the switch

 --video-aspect=1.3333 (and --video-rotate=no)

as using that rids of the letterboxing.

https://github.com/ayufan-rock64/linux-build/issues/249
#2
Turns out I spoke a bit too soon. A more accurate title for this thread would've been "Hardware video decoding working under Ubuntu" or at least it sometimes works.

The day after making this post, I noticed within another thread on these forums that --drm-mode=21 is a 1080 resolution. I am unsure where they got that info from unless it was by trial and error or by using this PR for mpv which gives more help and info regarding --drm-mode settings:

https://github.com/mpv-player/mpv/commit...f23bbab4a0

When using mpv wth --drm-mode=21, many of my home 4K h264 video files cannot play in full before encountering a few 'errinfo' frames that cause mpv to fallback to software decoding, at which point I need to quit mpv because CPU decoding is too slow and causes mpv to lock up after a few seconds.

I am still very happy to see hardware decoding working (a bit) under Ubuntu. It looks like we're nearly there with the r64 video playback.
#3
I do not believe that... I am sorry to say but I have seen other players working with KODI very well...you say is the software , I say is the hardware.! very poor hardware.


Possibly Related Threads…
Thread Author Replies Views Last Post
  Rock64 board not working, no HDMI no Ethernet. EDited 3 4,286 01-17-2023, 02:31 PM
Last Post: Flagtrax
  Ubuntu 18.04 Bionic LXDE Desktop karbon17 1 3,193 05-12-2020, 01:18 AM
Last Post: evilbunny
  ROCK64 RK3328 state of 4K (and FHD) video playback in FBdev kroko 3 5,009 03-31-2019, 11:43 AM
Last Post: kroko
  Video playback performance va88 0 2,305 12-19-2018, 01:19 PM
Last Post: va88
  How to get UHD 4k working (with Android TV 7) Hotkey 7 9,636 09-18-2018, 09:39 AM
Last Post: Trash_Can_Man
  Working desktop on Debian ? Chris66 5 7,813 08-29-2018, 12:21 PM
Last Post: dkryder
Question Need help on 4K Video playback leonqin 4 7,276 08-19-2018, 06:49 AM
Last Post: soerenderfor
  Ubuntu core porting on rock64 devangpanchal90 3 5,112 08-11-2018, 10:37 PM
Last Post: devangpanchal90
  Rock64 + XBox One X - 4K playback finally works!! S3phi40T 0 2,578 03-15-2018, 03:26 AM
Last Post: S3phi40T
  Nextcloud not working with external harddrive floweih 2 3,566 01-21-2018, 02:08 PM
Last Post: Luke

Forum Jump:


Users browsing this thread: 2 Guest(s)