Mpv-0.36 how to setup

Should run either way
Try adding yourself to the video and tty group and reboot for it to take affect.

sudo usermod -a -G tty,video yourusername

Hi @Darksky,

Since was not able to remove ffmpeg-m2m to install ffmpeg-rpi4 4.4 earlier, so giving the newer ffmpeg-m2m-1:4.4-7.

Just an update on ffmpeg-m2m. The latest ffmpeg-m2m-1:4.4-7 can coexist with ffmpeg (which currently is ffmpeg-2:6.0-8 in the Unstable Repo). This is the good news.

fl@jfl-mnjro ~]$ sudo pacman -U /home/jfl/Downloads/ffmpeg-m2m-1_4.4-7-aarch64.pkg.tar.zst
[sudo] password for jfl:
loading packages...
resolving dependencies...
looking for conflicting packages...

Packages (1) ffmpeg-m2m-1:4.4-7

Total Installed Size:  20.56 MiB
Net Upgrade Size:      -8.24 MiB

:: Proceed with installation? [Y/n] Y
(1/1) checking keys in keyring                     [##########################] 100%
(1/1) checking package integrity                   [##########################] 100%
(1/1) loading package files                        [##########################] 100%
(1/1) checking for file conflicts                  [##########################] 100%
(1/1) checking available disk space                [##########################] 100%
:: Processing package changes...
(1/1) upgrading ffmpeg-m2m                         [##########################] 100%
:: Running post-transaction hooks...
(1/1) Arming ConditionNeedsUpdate...
[jfl@jfl-mnjro ~]$


Install ffmpeg-6.0-8 on Manjaro-Arm-KDE which already have ffmpeg-m2m-1_4.4-7 installed.
[jfl@jfl-mnjro ~]$ sudo pacman -S ffmpeg
[sudo] password for jfl:
resolving dependencies...
looking for conflicting packages...

Packages (8) gperftools-2.10-3  highway-1.0.6-1  imath-3.1.9-1  libjxl-0.8.2-1
             libopenmpt-0.7.2-1  openexr-3.1.10-1  portaudio-1:19.7.0-2
             ffmpeg-2:6.0-8

Total Download Size:   17.25 MiB
Total Installed Size:  98.67 MiB

:: Proceed with installation? [Y/n] Y
:: Retrieving packages...
 openexr-3.1.10-1...   930.1 KiB  44.5 KiB/s 00:21 [##########################] 100%
 libopenmpt-0.7.2...   801.9 KiB  26.1 KiB/s 00:31 [##########################] 100%
 gperftools-2.10-...   637.6 KiB  53.9 KiB/s 00:12 [##########################] 100%
 portaudio-1:19.7...    90.5 KiB  33.1 KiB/s 00:03 [##########################] 100%
 libjxl-0.8.2-1-a...  1254.1 KiB  33.5 KiB/s 00:37 [##########################] 100%
 highway-1.0.6-1-...   626.2 KiB  20.0 KiB/s 00:31 [##########################] 100%
 ffmpeg-2:6.0-8-a...     8.6 MiB   762 KiB/s 00:12 [##########################] 100%
 imath-3.1.9-1-aa...     3.5 MiB  29.2 KiB/s 02:03 [##########################] 100%
 Total (8/8)            17.2 MiB   143 KiB/s 02:03 [##########################] 100%
error: failed retrieving file 'ffmpeg-2:6.0-8-aarch64.pkg.tar.xz' from bd.mirror.vanehost.com : Operation too slow. Less than 1 bytes/sec transferred the last 10 seconds
(8/8) checking keys in keyring                     [##########################] 100%
(8/8) checking package integrity                   [##########################] 100%
(8/8) loading package files                        [##########################] 100%
(8/8) checking for file conflicts                  [##########################] 100%
(8/8) checking available disk space                [##########################] 100%
:: Processing package changes...
(1/8) installing gperftools                        [##########################] 100%
Optional dependencies for gperftools
    graphviz: pprof graph generation
    perl: pprof and pprof-symbolize commands [installed]
(2/8) installing highway                           [##########################] 100%
(3/8) installing imath                             [##########################] 100%
Optional dependencies for imath
    python: python bindings [installed]
    boost-libs: python bindings [installed]
(4/8) installing openexr                           [##########################] 100%
(5/8) installing libjxl                            [##########################] 100%
Optional dependencies for libjxl
    gdk-pixbuf2: for gdk-pixbuf loader [installed]
    gimp: for gimp plugin
    java-runtime: for JNI bindings
(6/8) installing portaudio                         [##########################] 100%
(7/8) installing libopenmpt                        [##########################] 100%
(8/8) installing ffmpeg                            [##########################] 100%
Optional dependencies for ffmpeg
    avisynthplus: AviSynthPlus support
    ladspa: LADSPA filters
:: Running post-transaction hooks...
(1/3) Arming ConditionNeedsUpdate...
(2/3) Updating the MIME type database...
(3/3) Probing GDK-Pixbuf loader modules...
[jfl@jfl-mnjro ~]$

But there are two issues so far:

  1. Old issue of mpv-hwdec-0.35.1-4 still will not stream any video on the net but will play local video from disk.

  2. Eventhough ffmpeg-2:6.0-8 is installed together with ffmpeg-m2m-1:4.4.-7, Chromium still will NOT launch and this round is with different error: missing “libre2.so.10” but a newer “libre2.so.11” is available though.

Any tips on how to get Chromium to launch?

[jfl@jfl-mnjro ~]$ chromium --incognito --ozone-platform-hint=wayland
/usr/lib/chromium/chromium: error while loading shared libraries: libre2.so.10: cannot open shared object file: No such file or directory

chrmium is broke in our testing and unstable branches. I installed chromium 116 snap here. It was reported 4 days ago but nothing has been done about it yet.

https://archlinuxarm.org/forum/viewtopic.php?f=15&t=16573

Thanks for the info.

Ha, found the magic key --hwdec=auto.
mpv --hwdec=auto Ahsoka_HEVC_x265-01.mkv

Using hardware decoding (drm)
AO: [pipewire] 4800Hz
VO: [gpu] 1920x1080 drm_prime [rpi4_10]
*CPU under 20%

auto is pretty common … its … auto.

auto tries to automatically enable hardware decoding using the first available method. This still depends what VO you are using. For example, if you are not using --vo=gpu or --vo=vdpau, vdpau decoding will never be enabled. Also note that if the first found method doesn’t actually work, it will always fall back to software decoding, instead of trying the next method (might matter on some Linux systems).

What it shows though is that

~/.config/mpv/mpv.conf

vo=gpu
hwdec=drm

Apparently works for you.

Wow!. I tested my really stout stream I got off the satellite that will not play using SW decoding…

[ray@jellyfin]$ mpv --hwdec=auto  nasa.ts
 (+) Video --vid=1 (hevc 3840x2160 59.940fps)
 (+) Audio --aid=1 (mp2 2ch 48000Hz)
     Audio --aid=2 (aac 2ch 48000Hz)
AO: [pipewire] 48000Hz stereo 2ch s16p
Using hardware decoding (drm).
 (+) Video --vid=1 (hevc 3840x2160 59.940fps)
 (+) Audio --aid=1 (mp2 2ch 48000Hz)
     Audio --aid=2 (aac 2ch 48000Hz)
     Subs  --sid=1 (*) (eia_608)
VO: [gpu] 3840x2160 drm_prime[rpi4_8]
AV: 00:00:01 / 00:04:24 (0%) A-V:  0.000

htop:

mpv-hevc

MediaInfo:

General
ID                                       : 3 (0x3)
Complete name                            : nasa.ts
Format                                   : MPEG-TS
File size                                : 487 MiB
Duration                                 : 4 min 21 s
Overall bit rate mode                    : Variable
Overall bit rate                         : 15.6 Mb/s
Frame rate                               : 59.940 FPS

Video
ID                                       : 4161 (0x1041)
Menu ID                                  : 104 (0x68)
Format                                   : HEVC
Format/Info                              : High Efficiency Video Coding
Format profile                           : Main@L5.1@High
Codec ID                                 : 36
Duration                                 : 4 min 22 s
Width                                    : 3 840 pixels
Height                                   : 2 160 pixels
Display aspect ratio                     : 16:9
Frame rate                               : 59.940 (60000/1001) FPS
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
1 Like

On Manjaro-Arm-Gnome-linux-odroid-6.4.0-1 Unstable Branch editing this message on Chromium-115.0.5790.170 and /lib/libre2.so.10 and /usr/lib/libre2.so.10

image

image

May be it is only on Manjaro-Arm-KDE issue?

Edit: Wow, impressive result/performance “fmpeg-rpi-4.4.4-2-aarch64.pkg.tar.xz mpv-1:0.36.0-3-aarch64.pkg.tar.zst” streaming 4K/60 video.

mpv-hevc

Wonder it will work on GT King Pro?

1 Like

Hi @Darksky and @spikerguy,

Just performed a System Upgrade and now the same Chromium-115.0.5790.170 NO longer launch! “libre2.so.10” is now missing! Not sure which package upgrade resulted on this. Chromium was NOT upgraded.

Luckily, made a backup or kept copies of “libre2.so.10” and “libre2.so.10.0.0”. Copy “libre2.so.10” and “libre2.so.10.0.0” over to /lib restore Chromium-115.0.5790.170 to working order.

Edit: Installed ffmpeg-rpi-4.4.4-2 mpv-1:0.36.0-3 on Manjaro-Arm-Gnome-linux-odroid-6.4.0-1.

Hi @Darksky,

Just successfully install your new ffmpeg-rpi-4.4.4-2 mpv-1:0.36.0-3. But unfortunately mpv-1:0.36.0-3 will not launch or start with the following error:
Missing liblua5.2.so.5.2:. Currently the install “liblua.so” is “liblua5.4.so” and “liblua.so.5.4.6”

jfl@jfl-gtkpro    mpv --gpu-context=wayland --hwdec=auto https://www.youtube.com/watch?v=wZnVQT_iEYo
mpv: error while loading shared libraries: liblua5.2.so.5.2: cannot open shared object file: No such file or directory

“liblua5.2.so.5.2” available for download? Is it related to this "
lua52-5.2.4-5-aarch64.pkg.tar.xz
"?

If it is, in “Unstable Repo” it doesn’t have “lua54-xxxx”, how did “liblua5.4.so” and “liblua.so5.4.6” got installed on Manjaro-Arm-Gnome?

Edit 1: Manually “tar -xvf lua52-5.2.4-5-aarch64.pkg.tar.xz” and copy over the respective packages to Manjaro-Arm-Gnome-6.4.0-1. But “mpv-1:0.36.0-3” still refuse to works with another missing package:

mpv --gpu-context=wayland '/home/jfl/Videos/Big Buck Bunny 60fps 4K - Official Blender Foundation Short Film [aqz-KE-bpKQ].mp4' 
mpv: error while loading shared libraries: libsndio.so.7: cannot open shared object file: No such file or directory

Any suggestions on how to resolves the issues to get ffmpeg-rpi and mpv-1:0.36.0-3 to work on GT King Pro?

sndio and lua52 are both in our repo. I guess they were picked up as being on my system. Need to add to depends.

[ray@jellyfin ~]$ pacman -Ss lua52 | grep installed
extra/lua52 5.2.4-5 [installed]
extra/lua52-socket 1:3.1.0-1 [installed]

[ray@jellyfin ~]$ pacman -Ss sndio | grep installed
extra/sndio 1.9.0-1 [installed]

After installing “sndio” (manually copied over lua52 earlier), mpv-1:0.36.0-3 now works stream with vpu hw acceleration.

   jfl@jfl-gtkpro    mpv --gpu-context=wayland --hwdec=auto https://www.youtube.com/watch?v=wZnVQT_iEYo
 (+) Video --vid=1 (*) (h264 1920x1080 60.000fps)
 (+) Audio --aid=1 --alang=eng (*) (opus 2ch 48000Hz)
     Subs  --sid=1 --slang=en 'English' (webvtt) (external)
     Subs  --sid=2 --slang=pt 'Portuguese' (webvtt) (external)
     Subs  --sid=3 --slang=ru 'Russian' (webvtt) (external)
File tags:
 Uploader: Hardigun
 Channel_URL: https://www.youtube.com/channel/UCiyqpG37FD1BgmP-y33Et6Q
[vo/gpu/wayland] GNOME's wayland compositor lacks support for the idle inhibit protocol. This means the screen can blank during playback.
Cannot load libcuda.so.1
[vaapi] libva: /usr/lib/dri/v4l2_request_drv_video.so init failed
[ffmpeg] AVHWDeviceContext: Cannot load libcuda.so.1
[ffmpeg] AVHWDeviceContext: Could not dynamically load CUDA
[vaapi] libva: /usr/lib/dri/v4l2_request_drv_video.so init failed
Failed to open VDPAU backend libvdpau_nvidia.so: cannot open shared object file: No such file or directory
Cannot load libcuda.so.1
AO: [pulse] 48000Hz stereo 2ch float
Using hardware decoding (v4l2m2m).
VO: [gpu] 1920x1080 drm_prime[nv12]
AV: 00:03:25 / 00:04:45 (72%) A-V:  0.000 Dropped: 97 Cache: 79s/19MB

Exiting... (Quit)

Thank you for your patient and guidance.

 jfl@jfl-gtkpro    lsmod|grep v4l2
v4l2_mem2mem           32768  1 meson_vdec
videobuf2_v4l2         28672  2 meson_vdec,v4l2_mem2mem
videodev              253952  3 meson_vdec,videobuf2_v4l2,v4l2_mem2mem
videobuf2_common       61440  5 meson_vdec,videobuf2_dma_contig,videobuf2_v4l2,v4l2_mem2mem,videobuf2_memops
mc                     65536  4 videodev,videobuf2_v4l2,videobuf2_common,v4l2_mem2mem
 jfl@jfl-gtkpro   
2 Likes

Your welcome and thank you for your persistence!!

Added:

You may want to install the lua52 package so you have a full package install. Might come in handy later on.

sudo pacman -S lua52 --overwrite "*"

No you need to compile it without lua installed on your system.

It still use luajit such is already installed in most systems. I faced exact same issue while maintaining mpv-hwdec pkg.

Impressive work btw.

I can follow the ffmpeg pkgbuild to update ffmpeg-aml to follow similar method.

1 Like

Thanks for the great work on ffmpeg-rpi and mpv-1:0.36.0-3 to enable vpu hw acceleration for Rpi sbc but to my surprise also work on Amlogic S922X box! One of the complain that Arm64 Linux users on mainline kernel complain availability of vpu hw acceleration, now you and @spikerguy have given this to Manjaro-Arm users albeit limited video codecs support and some functions like forward and backward seek at times can cause issue.

I also noticed that you have a version of VLC multi-media player that is compiled for or with ffmpeg-rpi. Haven’t tried it yet. I suppose VLC-ffmpeg-rpi will work on GT King Pro too?

Great, looking forward to your new ffmpeg-aml and do look into mpv-hwdec. The current mpv-hwdec-1:0.35.1-4 refuses to stream any video online. Previous mpv-hwdec-1:0.35.1-1 can stream online videos but it has dependencies issue which prevented System Update on Unstable Branch.

Manjaro-Arm-Team have done a great job for TV Box users. Based on experience Manjaro-Arm-Gnome and Manjaro-Arm-KDE Editions are lightest Gnome and KDE DE implementation in terms of RAM resources usage compared to other linux distro Gnome and KDE DE implementation out of the box.

An now with availability of vpu hw accelerated support for mpv makes Manjaro-Arm even better.

which your TV box is, does it cheaper?

Beelink GT King Pro, don’t think is cheaper than Rpi-4. Cheaper version is Beelink GT King (older model not GT King II).

TV Box with Amlogic S905X3 with 4GB RAM and 64GB ROM are quite inexpensive (different manufacturer).

Edit: Preliminary findings on:
i) ffmpeg-rpi mpv-1:0.36.0-3 on Manjaro-Arm-Gnome-linux-odroid-6.4.0-1 and

ii) ffmpeg-m2m mpv-hwdec-1:0.35.1-4 on Manjaro-Arm-Gnome-linux-aml-6.1.42-1

in terms of CPU resource used (eyeballing on HTOP) when playing “Big Buck Bunny 60fps 4K - Official Blender Foundation Short Film [aqz-KE-bpKQ].mp4 – file size 303.0 MB” downloaded onto local HDD.

This is not a direct apple to apple comparison as different DEs, Kernels and mpv versions being used and furthermore on Manjaro-Arm-Gnome I did not install the complete “lua52” package – not sure whether this has any performance impact.

A) No vpu hw acceleration

mpv --gpu-context=wayland '/run/media/jfl/12FC7360FC733CD3/Movies/Big Buck Bunny 60fps 4K - Official Blender Foundation Short Film [aqz-KE-bpKQ].mp4'
(+) Video --vid=1 (*) (h264 1920x1080 60.000fps)
[vo/gpu/wayland] GNOME's wayland compositor lacks support for the idle inhibit protocol. This means the screen can blank during playback.
VO: [gpu] 1920x1080 yuv420p

B) With vpu hw acceleration

mpv --gpu-context=wayland --hwdec=v4l2m2m '/run/media/jfl/12FC7360FC733CD3/Movies/Big Buck Bunny 60fps 4K - Official Blender Foundation Short Film [aqz-KE-bpKQ].mp4' 
 (+) Video --vid=1 (*) (h264 1920x1080 60.000fps)
[vo/gpu/wayland] GNOME's wayland compositor lacks support for the idle inhibit protocol. This means the screen can blank during playback.
Using hardware decoding (v4l2m2m).
VO: [gpu] 1920x1080 drm_prime[nv12]

Preliminary findings ffmpeg-m2m mpv-hwdec on Manjaro-Arm-KDE-linux-aml-6.1.42-1 uses less CPU Resources (by eyeballing HTOP) compared to ffmpeg-rpi mpv-1:0.36.0-3 on Manjaro-Arm-Gnome-linux-odroid-6.4.0-1. On both versions, with hw acceleration enabled the CPU resources used is significantly lower than without vpu hw accleration.

For completeness, mpv-hwdec-1:0.35.1-4 will not stream any video online whereas mpv-1:0.36.0-3 can stream video online.

Wonder whether other users had similar experience.

Edit 1: Manjaro-Arm-Gnome switch to linux-aml-6.1.42-1. Same outcome as above.

ok, back to ffmpeg-6 (jc-kynesim/rpi-ffmpeg), to save others APPs depes.
then install repos’s mpv, now firefox & mpv both H/W accel.

1 Like

Read with interest. You mean you are able to use the stand Manjaro-Arm Repo mpv-1:0.36.0-1 and with the Manjaro Arm ffmpeg-6 you are able to have both Firefox and mpy vpu hw accelertion?

Did not understand how you got it done. Care to elaborate? Thanks.

No, build from ‘jc-kynesim/rpi-ffmpeg’ and its v4l2 patched & 6 version.

@Rip2
Will leave to the experts. Beyound my skill set.

No, build from ‘jc-kynesim/rpi-ffmpeg’ and its v4l2 patched & 6 version.

Is there any pre-build packages that can be downloaded?