[Guide] Install Gstreamer, FFmpeg and mpv (with youtube-dl)

does not matter what I try, mpv is not working.

I tried a lot the last days
the way you show at the 12.01.19 and also the short form from the 3.2.19.

gstreamer works, but i cant control the replay of an video.
no pause, forward or backward etc…

mpv works not, only a window is shown shortly

my plan was to use mpv with kodi, but i guess it will not work if mpv runs not well.

or does somebody know how to optimize kodi for RockPi

@pumuckll do

In terminal and post the output
Also as for gstreamer - do

hi
first thank you for the support.

I tested with a clean installation, this time without [OpenCV](http://root@linaro-alip:/home/rock# env GST_PLUGIN_PATH=/usr/local/lib/gstreamer-1.0 QT_GSTREAMER_WIDGET_VIDEOSINK=rkximagesink /usr/lib/aarch64-linux-gnu/qt5/examples/multimediawidgets/player/player QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to ‘/tmp/runtime-root’ libEGL warning: DRI2: failed to authenticate (gst-plugin-scanner:4629): GStreamer-WARNING **: 18:34:18.344: Failed to load plugin ‘/usr/local/lib/gstreamer-1.0/libgstrkv4l2.so’: librk_aiq.so: cannot open shared object file: No such file or directory (gst-plugin-scanner:4629): GStreamer-WARNING **: 18:34:18.344: Failed to load plugin ‘/usr/local/lib/gstreamer-1.0/librk_aiq.so’: /usr/local/lib/gstreamer-1.0/librk_aiq.so: undefined symbol: __cxa_pure_virtual root@linaro-alip:/home/rock# env GST_PLUGIN_PATH=/usr/local/lib/gstreamer-1.0 QT_GSTREAMER_WIDGET_VIDEOSINK=rkximagesink /usr/lib/aarch64-linux-gnu/qt5/examples/multimediawidgets/player/player QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to ‘/tmp/runtime-root’ libEGL warning: DRI2: failed to authenticate) installation

I followed the short method and made the shortcuts at the end.

apt-get install librockchip-mpp1 (unsure about this, need testing) or [this package)

the installation of "this package does not work. there is no error , but I could install it endless.

apt-get install build-dep `

E: Paket build-dep kann nicht gefunden werden.
could not be found

lip:/media/rock/Stick/Bumblebee.2018.German.DL.AC3.Dubbed.1080p.WEBRip.x264-PsO$ mpv --hwdec=rkmpp --vo=gpu --gpu-api=opengl --gpu-context=drm pso-bumblebee_webrip.1080p.mkv
mpv: symbol lookup error: mpv: undefined symbol: eglQueryString

root@linaro-alip:/home/rock# env GST_PLUGIN_PATH=/usr/local/lib/gstreamer-1.0 QT_GSTREAMER_WIDGET_VIDEOSINK=rkximagesink /usr/lib/aarch64-linux-gnu/qt5/examples/multimediawidgets/player/player
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to ‘/tmp/runtime-root’
libEGL warning: DRI2: failed to authenticate

(gst-plugin-scanner:4629): GStreamer-WARNING **: 18:34:18.344: Failed to load plugin ‘/usr/local/lib/gstreamer-1.0/libgstrkv4l2.so’: librk_aiq.so: cannot open shared object file: No such file or directory

(gst-plugin-scanner:4629): GStreamer-WARNING **: 18:34:18.344: Failed to load plugin ‘/usr/local/lib/gstreamer-1.0/librk_aiq.so’: /usr/local/lib/gstreamer-1.0/librk_aiq.so: undefined symbol: __cxa_pure_virtual
root@linaro-alip:/home/rock# env GST_PLUGIN_PATH=/usr/local/lib/gstreamer-1.0 QT_GSTREAMER_WIDGET_VIDEOSINK=rkximagesink /usr/lib/aarch64-linux-gnu/qt5/examples/multimediawidgets/player/player
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to ‘/tmp/runtime-root’
libEGL warning: DRI2: failed to authenticate

when I start QT-play:
libEGL warning: DRI2: failed to authenticate

I want to use kodi on this device, and it would be nice if you can help me.
I already compiled kodi, but play videos works not very well.

so my plan was to use kodi with mpv.

can i make some optimization wile compile process?

greetings
have a nice weekend

I will check then the whole install setup then

Just for clarification.

(gst-plugin-scanner:4629): GStreamer-WARNING **: 18:34:18.344: Failed to load plugin ‘/usr/local/lib/gstreamer-1.0/libgstrkv4l2.so’: librk_aiq.so: cannot open shared object file: No such file or directory 
(gst-plugin-scanner:4629): GStreamer-WARNING **: 18:34:18.344: Failed to load plugin ‘/usr/local/lib/gstreamer-1.0/librk_aiq.so’: /usr/local/lib/gstreamer-1.0/librk_aiq.so: undefined symbol: __cxa_pure_virtual

This means that depends are all over the places and broken

mpv: symbol lookup error: mpv: undefined symbol: eglQueryStrin

And here is the same, usually it fixed by installing Mpv-depens package and you need to be careful about apt autoremove.

I understood the problem behind your problem, and gonna try to create properly packages now (yes it’s problem with packages if built from scratch it will work, but as soon as i try to go with fast&dirty packages from checkinstall - it doesn’t work)

I fixed gstreamer, you should be good to go with it, tomorrow i will work on ffmpeg&mpv and fix them

rock@linaro-alip:~/video$ sudo dpkg --unpack --force-all
[sudo] password for rock:
dpkg: error: --unpack needs at least one package archive file argument

which package should her installed?

So, for some reason i don’t yet understand i can’t get packages to work. Nor official’s, nor Radxa’s, nor packages i got from checkinstall. So until then there is script that do everything (downloading, compile, installing)

Hi, we have built player and gstreamer player packages. To use them, try:

$ apt-get install -y mpv
$ apt-get install -y librockchip-mpp1

$ apt-get install -y gstreamer1.0-tools gstreamer1.0-plugins-bad 
$ apt-get install -y gstreamer1.0-plugins-ugly gstreamer1.0-plugins-good gstreamer1.0-plugins-base 
$ apt-get install -y gstreamer1.0-plugins-base-apps glib-2.0 libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev 
$ apt-get install -y gstreamer1.0-rockchip1

Bty, I use rockpi4b-ubuntu-bionic-minimal-20190104_2101-gpt.img and mate desktop. Before installing the above packages, I do this:

$ sudo apt install -y ubuntu-mate-core
$ sudo apt install -y ubuntu-mate-desktop
2 Likes

So I did it with fresh inminimized image with xfce4 installed (to check, maybe my memory is bad and it actually worked).
Mpv fails with

mpv: error while loading shared libraries: librockchip_mpp.so.1: cannot open shared object file: No such file or directory

For gstreamer (gstreamer1.0-alsa is needed to use gst-play-1.0) I have this problems (erm…which inconsistent? it disappeared after i installed qt5 libraries)

Summary

(gst-plugin-scanner:13741): GStreamer-WARNING **: 11:00:42.267: Failed to load plugin ‘/usr/local/lib/gstreamer-1.0/libgstrkv4l2.so’: librk_aiq.so: cannot open shared object file: No such file or directory
(gst-plugin-scanner:13741): GStreamer-WARNING **: 11:00:42.268: Failed to load plugin ‘/usr/local/lib/gstreamer-1.0/librk_aiq.so’: /usr/local/lib/gstreamer-1.0/librk_aiq.so: undefined symbol: __cxa_pure_virtual

And after i installed qt5base5-example and qtmultimedea5-examples the problem with librockchip_mpp.so.1 disappeared? I’m unsure, i will try another fresh installation.

P.S. @pumuckll you should be ok with packages @Stephen posted. To use mpv with hardware acceleration you need to use command (ignore errors)
mpv --hwdec=rkmpp --vo=gpu --gpu-api=opengl --gpu-context=drm

P.S.S. Additional testing showed that just by installing

$ apt-get install -y mpv
$ apt-get install -y librockchip-mpp1
$ apt-get install -y gstreamer1.0-tools gstreamer1.0-plugins-bad 
$ apt-get install -y gstreamer1.0-plugins-ugly gstreamer1.0-plugins-good gstreamer1.0-plugins-base 
$ apt-get install -y gstreamer1.0-plugins-base-apps glib-2.0 libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev 
$ apt-get install -y gstreamer1.0-rockchip1

I still have

mpv: error while loading shared libraries: librockchip_mpp.so.1: cannot open shared object file: No such file or directory

But, after i install any(?) package, everything seems to be corrected

Can you check does mpv still works? Because i’m getting “Segmentaton fault” (if i use hwdec=rkmpp) error with both gstreamer and mpv on both radxa’s packages and building from scratch

I’m having the same “segmentation fault” issue with the Ubuntu server image and mpp from the Radxa repo.

If I install the latest librockchip-mpp from the rockchip repository, “mpv --hwdec=rkmpp --vo=null” plays fine with hardware decoding enabled (without any video output of course).

But “mpv --hwdec=rkmpp --vo=drm” shows error:

[autoconvert] can't find video conversion for drm_prime/nv12

1 Like

The mpv-gbm shortcut under fresh Armbian Bionic desktop + media script (from the Armbian rk3399 subforum) works with no hiccups playing 4k hevc videos.

It ships with this version of mpv, not sure how it differentiate from the upstream one:

mpv-rockchip/now 2:2018.12.12.d6d6da4711-0bionic1 arm64 [installed,local]

“–vo=drm” doesn’t work on Armbian either, got the same color format error.

The Armbian Bionic desktop image for Rock Pi 4 ships with the wrong kernel (4.4.182-rockchip64), which doesn’t activate the mali gpu on rock pi 4 (/dev/mali0 doesn’t exist). I had to manually do “apt install linux-dtb-rk3399 linux-image-rk3399” (which contains 4.4.179-rk3399) to get gpu acceleration working.

1 Like

Still, don’t understand what exactly got broken ther. Maybe should check previous mpv versions

@Stephen, i’m sorry to bother you, but i’m lost there. mpv and gsteamer seems to have nothing with that and since both of them fails (so that means it’s not ffmpeg either). So i thought maybe it’s mpp - but installing version from january (via github commits) did not helped. Nor the version from repo worked. All of them report Segmentation fault. Can you confirm is that actually bug that affect even your system or it something user-sided?

So that’s is reason why i’m getting screen crash and Segmentation fault on mpv. That’s what i get in syslog.

Aug  1 19:52:32 localhost kernel: [  461.913630] rk_vcodec: vpu_service_ioctl:1875: error: unknown vpu service ioctl cmd 40086c01
Aug  1 19:52:33 localhost kernel: [  462.556554] [drm:rockchip_gem_dumb_map_offset] *ERROR* failed to lookup gem object.

And i have zero idea what to do with this.

So as far i googled - difference not in mpv, but in kernel. Seems like there was update to mpp or mali libs and because of this .154 is now not working, i.e.

Hi, is this guide still valid? I’m trying to get MPP working on RockPi4c+ to enable FFMPEG hardware decode, running the builtin mpp version on the official rock-4c-plus-debian-bullseye-xfce4-arm64-20221109-1514-gpt (last official release)

sudo mpi_dec_test -i Big_Buck_Bunny_1080_10s_30MB.mp4 -w 1920 -h 1080 -t 7 -o decoded.yuv -n 100 -d 255

This testing command report Segfault, so MPP is not working what can I do? Should I use older Raxda images?
Thank you

Hello, my advice try TwistedOS or Armbian with Panfrost

Hello, I would like to know if there are already advances on the topic of the giua to install gstreamer with the plugins and that we can use the encoding with the GPU.?