Hello, I'm testing the window manager sway for wayland. I would like to watch some videos with mpv unfortunately it doesn't work. I'm trying to run mpv as a native application for wayland, I don't use xwayland. With Xorg, mpv works fine. What I did so far: - I modified the port for libva by removin "--disable-wayland" - I patched "libva-intel" with this patch https://git.archlinux.org/svntogit/packages.git/tree/trunk/427.patch?h=packa... My mpv configuration: ------------------------------- $ mpv -v [cplayer] Command line options: '-v' [cplayer] mpv 0.29.1 Copyright © 2000-2018 mpv/MPlayer/mplayer2 projects [cplayer] built on Tue Aug 20 09:59:24 CEST 2019 [cplayer] ffmpeg library versions: [cplayer] libavutil 56.31.100 [cplayer] libavcodec 58.54.100 [cplayer] libavformat 58.29.100 [cplayer] libswscale 5.5.100 [cplayer] libavfilter 7.57.100 [cplayer] libswresample 3.5.100 [cplayer] ffmpeg version: 4.2 [cplayer] [cplayer] Configuration: ./waf configure --prefix=/usr --enable-libarchive --enable-wayland --enable-gl-wayland --enable-libmpv-shared -j 8 [cplayer] List of enabled features: alsa asm atomics build-date cplayer cplugins debug-build drm drmprime egl-drm egl-helpers egl-x11 fchmod ffmpeg gbm gbm.h gl gl-wayland gl-x11 glibc-thread-name glob glob-posix gnuc gpl iconv jpeg lcms2 libaf libarchive libass libass-osd libav-any libavcodec libavdevice libdl libm libmpv-shared librt linux-fstatfs lua luajit optimize oss-audio plain-gl posix posix-or-mingw posix-spawn posix-spawn-native pthreads stdatomic vaapi vaapi-drm vaapi-egl vaapi-glx vaapi-wayland vaapi-x-egl vaapi-x11 vdpau vdpau-gl-x11 vt.h wayland wayland-protocols x11 xv zlib [cplayer] Reading config file /usr/etc/mpv/encoding-profiles.conf [cplayer] mpv 0.29.1 Copyright © 2000-2018 mpv/MPlayer/mplayer2 projects [cplayer] built on Tue Aug 20 09:59:24 CEST 2019 [cplayer] ffmpeg library versions: [cplayer] libavutil 56.31.100 [cplayer] libavcodec 58.54.100 [cplayer] libavformat 58.29.100 [cplayer] libswscale 5.5.100 [cplayer] libavfilter 7.57.100 [cplayer] libswresample 3.5.100 [cplayer] ffmpeg version: 4.2 [cplayer] [cplayer] Usage: mpv [options] [url|path/]filename [cplayer] [cplayer] Basic options: [cplayer] --start=<time> seek to given (percent, seconds, or hh:mm:ss) position [cplayer] --no-audio do not play sound [cplayer] --no-video do not play video [cplayer] --fs fullscreen playback [cplayer] --sub-file=<file> specify subtitle file to use [cplayer] --playlist=<file> specify playlist file [cplayer] [cplayer] --list-options list all mpv options [cplayer] --h=<string> print options which contain the given string in their name [cplayer] [ytdl_hook] script-opts/ytdl_hook.conf not found. [ytdl_hook] lua-settings/ytdl_hook.conf not found. [stats] script-opts/stats.conf not found. [stats] lua-settings/stats.conf not found. [ytdl_hook] Exiting... [stats] Exiting... [osc] script-opts/osc.conf not found. [osc] lua-settings/osc.conf not found. [osc] Exiting... -------------------------------------------- First try to play a video (just tell me if you need the entire log): -------------------------------- $ mpv -v --vo=drm --gpu-context=wayland When\ not\ knowing\ Math\ can\ cost\ you\ \$15\,000-BbX44YSsQ2I.mkv . . . demux] Detected file format: Matroska [cplayer] Opening done: When not knowing Math can cost you $15,000-BbX44YSsQ2I.mkv [find_files] Loading external files in . [cplayer] Running hook: ytdl_hook/on_preloaded [mkv] select track 0 [mkv] select track 1 [cplayer] (+) Video --vid=1 (*) (h264 320x240 11.988fps) [cplayer] (+) Audio --aid=1 --alang=eng (*) (opus 2ch 48000Hz) [vo/drm] VT_GETMODE failed: Inappropriate ioctl for device [vo/drm] Failed to set up VT switcher. Terminal switching will be unavailable. [osd/libass] Using font provider fontconfig [osd/libass] Done. [vo/drm/kms] Connector 71 currently connected to encoder 70 [vo/drm/kms] Selected Encoder 70 with CRTC 41 [vo/drm] DRM Atomic support found [vo/drm/kms] Using default plane 28 for OSD [vo/drm/kms] Using default plane 33 for video [vo/drm] Cannot set CRTC: Permission denied [cplayer] Error opening/initializing the selected video_out (--vo) device. [mkv] deselect track 0 [cplayer] Video: no video [ad] Codec list: . . . ------------------------------------- Second try: ------------------------ $ mpv -v --vo=gpu --gpu-context=wayland When\ not\ knowing\ Math\ can\ cost\ you\ \$15\,000-BbX44YSsQ2I.mkv . . . cplayer] Running hook: ytdl_hook/on_preloaded [mkv] select track 0 [mkv] select track 1 [cplayer] (+) Video --vid=1 (*) (h264 320x240 11.988fps) [cplayer] (+) Audio --aid=1 --alang=eng (*) (opus 2ch 48000Hz) [vo/gpu/opengl] Initializing GPU context 'wayland' [vo/gpu/wayland] Registered for protocol wl_shm [vo/gpu] Enabling event driven renderloop! [vo/gpu/wayland] Registered for protocol wl_compositor [vo/gpu/wayland] Registered for protocol wl_data_device_manager [vo/gpu/wayland] Registered for protocol zwp_idle_inhibit_manager_v1 [vo/gpu/wayland] Registered for protocol xdg_wm_base [vo/gpu/wayland] Registered for protocol org_kde_kwin_server_decoration_manager [vo/gpu/wayland] Registered for protocol wl_seat [vo/gpu/wayland] Registered for protocol wl_output [vo/gpu/wayland] Enabling server decorations [osd/libass] Using font provider fontconfig [osd/libass] Done. [vo/gpu] Failed initializing any suitable GPU context! [cplayer] Error opening/initializing the selected video_out (--vo) device. [mkv] deselect track 0 [cplayer] Video: no video [ad] Codec list: . . . ---------------------------------- Does anybody have an idea ? Thank you !
Hi Cédric, On Tue, 20 Aug 2019 10:29:55 +0200 Cédric <rainbow@indie.host> wrote:
Does anybody have an idea ?
I don't use wayland myself, but any chance it needs contrib/wayland-protocols? Since I have wayland installed, I have to build mpv with --disable-gl-wayland \ --disable-wayland{,-protocols,-scanner} \ otherwise the build will fail. Best regards -- Tim Biermann
Hi Tim, thank you for your answer.
I don't use wayland myself, but any chance it needs contrib/wayland-protocols? Since I have wayland installed, I have to build mpv with --disable-gl-wayland \ --disable-wayland{,-protocols,-scanner} \ otherwise the build will fail.
I have changed my Pkgfile for mpv: -------------------- name=mpv version=0.29.1 release=2 source=(https://github.com/$name-player/$name/archive/v$version/$name-v$version.tar....) build() { cd $name-$version [ -e '/usr/lib/pkgconfig/libcdio_cdda.pc' ] && PKGMK_MPV+=' --enable-cdda' [ -e '/usr/lib/pkgconfig/dvdnav.pc' ] && PKGMK_MPV+=' --enable-dvdread --enable-dvdnav' ./bootstrap.py ./waf configure ${PKGMK_MPV} \ --prefix=/usr \ --disable-x11 \ --disable-sdl \ --enable-libarchive \ --enable-wayland \ --enable-wayland-protocols \ --enable-wayland-scanner \ --enable-vaapi-wayland \ --enable-gl-wayland \ --enable-libmpv-shared \ -j ${JOBS-1} ./waf build ./waf install --destdir=$PKG rm -r $PKG/usr/share/doc } ---------------------------------- Unfortunately, it still doesn't work. Wayland and wayland protocols are installed on my system. -------------- $ pkginfo -i | grep wayland wayland 1.17.0-1 wayland-protocols 1.18-1 ---------------- I have just discovered there is a new version of libva, I don't know if it can help.
Hi Cédric, On Tue, 20 Aug 2019 18:22:18 +0200 Cédric <rainbow@indie.host> wrote:
Unfortunately, it still doesn't work. Wayland and wayland protocols are installed on my system.
I have just discovered there is a new version of libva, I don't know if it can help. Me neither, really, and I think I can't be of much more help, unfortunately. I was thinking about trying out wayland on my laptop, but reading up on the topic, I think I'm gonna wait a while longer for
have you seen these instructions for mpv on wayland? https://wayland.freedesktop.org/extras.html I suppose this would work with a release tarball as well. that.. O:-) Best regards, Tim -- Tim Biermann
Hi Tim,
have you seen these instructions for mpv on wayland? https://wayland.freedesktop.org/extras.html I suppose this would work with a release tarball as well.
Yes, but it didn't help. I tried with those compilation parameters, but it didn't change. I know it should work, but something is missing. Do you have any idea where I could ask for some help ? Perhaps the best is directly on github, but I'm not sure it's the idea. For me it's rather to report bugs.
I have just discovered there is a new version of libva, I don't know if it can help. Me neither, really, and I think I can't be of much more help, unfortunately. I was thinking about trying out wayland on my laptop, but reading up on the topic, I think I'm gonna wait a while longer for that.. O:-)
It didn't help. In fact Wayland works, but if you want to only use native applications, I think you have to wait. For example I use gimp and it's not ready. So I had to give up and install Xwayland. With it, there is no problem. At least, I can already test some native softwares for Wayland and the window manager sway. Feel free to ask if you want to test, for me it was not so easy to install sway. Regards, Cédric
Ok, I have it, the problem was mesa3d. It was not built with wayland support. You can have a look here: https://github.com/mpv-player/mpv/issues/6895 Thank you for your help! Regards, Cédric
participants (2)
-
Cédric
-
Tim