Package Details: mpv-rpi 1:0.30.0-1

Git Clone URL: https://aur.archlinux.org/mpv-rpi.git (read-only, click to copy)
Package Base: mpv-rpi
Description: mpv with Raspberry Pi support
Upstream URL: https://mpv.io/
Licenses: GPL3
Conflicts: mpv
Provides: mpv
Submitter: fmang
Maintainer: fmang
Last Packager: fmang
Votes: 8
Popularity: 0.000003
First Submitted: 2016-09-14 09:47
Last Updated: 2019-11-06 02:22

Required by (158)

Sources (2)

Pinned Comments

alvearian commented on 2020-02-27 23:58

To sum up, mpv-rpi is not needed for rpi4, and --vo=rpi is not going to be fixed.

mpv --vo=gpu --gpu-context=drm --drm-connector=<card-number>.<connector-name> --hwdec=v4l2m2m-copy (or --hwdec=mmal-copy) does the job and makes use of hardware acceleration

For that to achieve you need the newest ffmpeg-git (for mmal, built like ffmpeg-mmal). Here is all the info https://www.raspberrypi.org/forums/viewtopic.php?f=28&t=266123&p=1618765#p1618765

Latest Comments

1 2 3 4 5 Next › Last »

fmang commented on 2020-02-28 02:17

@alvearian Thanks for the tip!

alvearian commented on 2020-02-27 23:58

To sum up, mpv-rpi is not needed for rpi4, and --vo=rpi is not going to be fixed.

mpv --vo=gpu --gpu-context=drm --drm-connector=<card-number>.<connector-name> --hwdec=v4l2m2m-copy (or --hwdec=mmal-copy) does the job and makes use of hardware acceleration

For that to achieve you need the newest ffmpeg-git (for mmal, built like ffmpeg-mmal). Here is all the info https://www.raspberrypi.org/forums/viewtopic.php?f=28&t=266123&p=1618765#p1618765

alvearian commented on 2020-02-27 09:23

Reported the issue upstream https://github.com/mpv-player/mpv/issues/7492

alvearian commented on 2020-02-25 17:20

Here is some follow up info on this topic from the pi engineers: https://www.raspberrypi.org/forums/viewtopic.php?f=28&t=266123&p=1617098#p1617098

They say that this error means, that mpv-rpi:

is trying to use the old (legacy) firmware GLES driver which does not exist on the Pi4.

alvearian commented on 2020-02-25 09:58

I'm trying to launch mpv-rpi on rpi4, but getting this error:

➜ ~ mpv --drm-mode=highest --hwdec=mmal --vo=rpi movie.mkv
(+) Video --vid=1 (*) (h264 1920x1080 24.000fps)
(+) Audio --aid=1 --alang=eng (*) (eac3 6ch 48000Hz)
(+) Subs --sid=1 --slang=rus (*) 'TeamNotDead' (subrip)
Subs --sid=2 --slang=eng (subrip)
AO: [pulse] 48000Hz 5.1(side) 6ch float
Using hardware decoding (mmal).
VO: [rpi] 1920x1080 mmal
* failed to add service - already in use?

This error seems to come from EGL, as intensive googling suggests. If I change it to --vo=gpu it's the same.

I have dtoverlay=vc4-fkms-v3d in boot/config.txt, if it matters. Also, I have libglvnd & mesa installed in my system as dependencies of smth, maybe some wrong EGL comes from them?

Any ideas?

fmang commented on 2020-01-07 01:18

@ivanich Thanks for the links. I did get the build error caused by the missing typedef EGLAttrib. Looks like even if I had got it to build it wouldn’t have worked anyway though…

I’ll wait and see how the issue 7314 gets solved. If it takes to much time or no satisfying workaround is found, maybe I’ll rollback this package. There’s no point of using mpv-rpi instead of mpv if hardware acceleration doesn’t work.

For anyone preferring to use the older but working mpv-rpi 0.29.1, here’s the previous version: 69b28392d825. (Edit: plain version of the PKGBUILD at https://aur.archlinux.org/cgit/aur.git/plain/PKGBUILD?h=mpv-rpi&id=69b28392d825)

ivanich commented on 2020-01-06 22:27

@fmang There is some info from upstream https://github.com/mpv-player/mpv/issues/7314 https://github.com/mpv-player/mpv/issues/6838

fmang commented on 2020-01-05 23:10

@iegubkin @xigurat Someone reported the same issue on GitHub, with a workaround: https://github.com/mpv-player/mpv-build/issues/89#issuecomment-404628857

Disabling GL from raspi-config sounds a bit overkill, but if that works, then at least we’ll have an idea where to look.

I’ve also noticed mpv 0.31 just got released, so I’ll update this package and, who knows, maybe that will fix the issue.

xigurat commented on 2019-12-26 21:54

@iegubkin I'm experiencing exactly the same thing, what i did, clone the mpv-rpi repo, go to the previous commit (69b2839) and compile it

git clone https://aur.archlinux.org/mpv-rpi.git
cd mpv-rpi
git checkout HEAD^
makepkg -si

iegubkin commented on 2019-12-25 00:00

mpv-rpi 1:0.30.0-1 cannot use hardware acceleration:

Fully updated Arch Linux Arm

user@alarmpi:[~/video]: mpv
mpv 0.30.0 Copyright © 2000-2019 mpv/MPlayer/mplayer2 projects
 built on Wed Dec 25 00:32:21 +04 2019
ffmpeg library versions:
   libavutil       56.31.100
   libavcodec      58.54.100
   libavformat     58.29.100
   libswscale      5.5.100
   libavfilter     7.57.100
   libswresample   3.5.100
ffmpeg version: n4.2

user@alarmpi:[~/video]: ffmpeg
ffmpeg version n4.2 Copyright (c) 2000-2019 the FFmpeg developers
  built with gcc 8.3.0 (GCC)
  configuration: --prefix=/usr --disable-debug --disable-static --disable-stripping --enable-fontconfig --enable-gmp --enable-gnutls --enable-gpl --enable-ladspa --enable-libass --enable-libbluray --enable-libdav1d --enable-libdrm --enable-libfreetype --enable-libfribidi --enable-libgsm --enable-libiec61883 --enable-libjack --enable-libmodplug --enable-libmp3lame --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libv4l2 --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxcb --enable-libxml2 --enable-libxvid --enable-mmal --enable-omx --enable-omx-rpi --enable-shared --enable-version3 --host-cflags='"-fPIC"'
  libavutil      56. 31.100 / 56. 31.100
  libavcodec     58. 54.100 / 58. 54.100
  libavformat    58. 29.100 / 58. 29.100
  libavdevice    58.  8.100 / 58.  8.100
  libavfilter     7. 57.100 /  7. 57.100
  libswscale      5.  5.100 /  5.  5.100
  libswresample   3.  5.100 /  3.  5.100

Hardware acceleration fails:

user@alarmpi:[~/video]: mpv 'test.mkv' 
 (+) Video --vid=1 (*) (h264 1280x720 23.976fps)
 (+) Audio --aid=1 --alang=eng (*) (opus 2ch 48000Hz)
[vo/gpu/opengl] glGetString(GL_VERSION) returned NULL.
[vo/gpu/opengl] Suspected software renderer or indirect context.
[vo/gpu/vulkan/libplacebo] Failed creating instance: VK_ERROR_EXTENSION_NOT_PRESENT
[vo/gpu/vulkan/libplacebo] Failed initializing vulkan instance
[vo/gpu/vulkan/libplacebo] Failed creating instance: VK_ERROR_EXTENSION_NOT_PRESENT
[vo/gpu/vulkan/libplacebo] Failed initializing vulkan instance
Failed to open VDPAU backend libvdpau_nvidia.so: cannot open shared object file: No such file or directory
[vo/vdpau] Error when calling vdp_device_create_x11: 1
[vo/xv] No Xvideo support found.
[vo/x11] Warning: this legacy VO has bad performance. Consider fixing your graphics drivers, or not forcing the x11 VO.
AO: [pulse] 48000Hz stereo 2ch float
Using hardware decoding (mmal).
[autoconvert] Unexpected AVFrame/imgfmt hardware context mismatch.
[autoconvert] HW-downloading from mmal
[autoconvert] cannot copy surface of this format to CPU memory
Cannot convert decoder/filter output to any format supported by the output.
Falling back to software decoding.
VO: [x11] 1280x720 yuv420p
AV: 00:00:11 / 00:03:51 (5%) A-V:  0.000

user@alarmpi:[~/video]: mpv -vo=rpi 'test.mkv'
 (+) Video --vid=1 (*) (h264 1280x720 23.976fps)
 (+) Audio --aid=1 --alang=eng (*) (opus 2ch 48000Hz)
[vo/rpi] Could not get DISPMANX objects.
Error opening/initializing the selected video_out (--vo) device.
Video: no video

No problems after compiling and reverting back a version:

user@alarmpi:[~/video]: mpv
mpv 0.29.1 Copyright © 2000-2018 mpv/MPlayer/mplayer2 projects
 built on Wed Dec 25 00:57:02 +04 2019
ffmpeg library versions:
   libavutil       56.31.100
   libavcodec      58.54.100
   libavformat     58.29.100
   libswscale      5.5.100
   libavfilter     7.57.100
   libswresample   3.5.100
ffmpeg version: n4.2

user@alarmpi:[~/video]: mpv 'test.mkv'
Playing: /home/video/test.mkv
 (+) Video --vid=1 (*) (h264 1280x720 23.976fps)
 (+) Audio --aid=1 --alang=eng (*) (opus 2ch 48000Hz)
Using hardware decoding (mmal).
AO: [pulse] 48000Hz stereo 2ch float
VO: [rpi] 1280x720 mmal
AV: 00:00:14 / 00:03:51 (6%) A-V:  0.000

During the build process of mpv 0.30 many similar messages appeared that might be relevant:

[119/488] Compiling ta/ta.c
[120/488] Compiling video/out/opengl/context_glx.c
In file included from /opt/vc/include/interface/vmcs_host/vc_dispmanx.h:36,
                 from /opt/vc/include/bcm_host.h:50,
                 from ../video/out/opengl/context_rpi.c:21:
/opt/vc/include/interface/vmcs_host/vc_dispmanx_types.h:133:5: предупреждение: «__VCCOREVER__» не определена, оценивается как 0 [-Wundef]
 #if __VCCOREVER__ >= 0x04000000
     ^~~~~~~~~~~~~
In file included from /opt/vc/include/interface/vchi/vchi.h:34,
                 from /opt/vc/include/interface/vmcs_host/vc_dispmanx.h:37,
                 from /opt/vc/include/bcm_host.h:50,
                 from ../video/out/opengl/context_rpi.c:21:
/opt/vc/include/interface/vchi/vchi_cfg.h:43:8: предупреждение: «__VCCOREVER__» не определена, оценивается как 0 [-Wundef]
 #   if __VCCOREVER__ >= 0x04000000
        ^~~~~~~~~~~~~
/opt/vc/include/interface/vchi/vchi_cfg.h:54:8: предупреждение: «__VCCOREVER__» не определена, оценивается как 0 [-Wundef]
 #   if __VCCOREVER__ >= 0x04000000
        ^~~~~~~~~~~~~