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
  Reply
#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.
  Reply
#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.
  Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
  ROCK64 RK3328 state of 4K (and FHD) video playback in FBdev kroko 3 683 03-31-2019, 11:43 AM
Last Post: kroko
  Video playback performance va88 0 413 12-19-2018, 01:19 PM
Last Post: va88
  How to get UHD 4k working (with Android TV 7) Hotkey 7 1,098 09-18-2018, 09:39 AM
Last Post: Trash_Can_Man
  Working desktop on Debian ? Chris66 5 708 08-29-2018, 12:21 PM
Last Post: dkryder
Question Need help on 4K Video playback leonqin 4 1,182 08-19-2018, 06:49 AM
Last Post: soerenderfor
  Ubuntu core porting on rock64 devangpanchal90 3 795 08-11-2018, 10:37 PM
Last Post: devangpanchal90
  Rock64 + XBox One X - 4K playback finally works!! S3phi40T 0 978 03-15-2018, 03:26 AM
Last Post: S3phi40T
  Nextcloud not working with external harddrive floweih 2 429 01-21-2018, 02:08 PM
Last Post: Luke
  trouble with video playback MaWalla 8 2,015 01-01-2018, 09:41 AM
Last Post: Lalith
  Video playback ChrisJ 1 733 09-30-2017, 06:37 AM
Last Post: elatllat

Forum Jump:


Users browsing this thread: 1 Guest(s)