diff --git a/.gitignore b/.gitignore
index e9245169..d1a49c43 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,6 @@
#snapcraft specifics
parts
stage
-prime
\ No newline at end of file
+prime
+*.snap
+dep
diff --git a/README.md b/README.md
index 975504de..31d7016e 100644
--- a/README.md
+++ b/README.md
@@ -1,5 +1,7 @@
+[](https://build.snapcraft.io/user/nilsboy/mpv)
+
-
+
mpv
@@ -20,9 +22,6 @@ distributions.
([Don't have snapd installed?](https://snapcraft.io/docs/core/install))
-
-
-
Published for
with :gift_heart: by Snapcrafters
## Remaining tasks
diff --git a/screenshot.jpg b/screenshot.jpg
deleted file mode 100644
index aaeb33cd..00000000
Binary files a/screenshot.jpg and /dev/null differ
diff --git a/snap/gui/mpv.desktop b/snap/gui/mpv.desktop
index 2d56affb..55928d07 100644
--- a/snap/gui/mpv.desktop
+++ b/snap/gui/mpv.desktop
@@ -25,7 +25,7 @@ Comment[pl]=Odtwarzaj filmy i muzykę
Comment[ru]=Воспроизвести фильмы и музыку
Comment[zh_CN]=播放电影和歌曲
Comment[zh_TW]=播放電影和歌曲
-Icon={SNAP}/meta/gui/mpv.svg
+Icon=${SNAP}/meta/gui/mpv.svg
TryExec=mpv
Exec=mpv --player-operation-mode=pseudo-gui -- %U
Terminal=false
diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml
index 9bf447ee..bdebc539 100644
--- a/snap/snapcraft.yaml
+++ b/snap/snapcraft.yaml
@@ -1,147 +1,344 @@
-name: mpv
-version: '0.26.0'
+base: core18
+name: mpv-nilsboy
+version: "git"
summary: a free, open source, and cross-platform media player.
+icon: snap/gui/mpv.svg
description: |
mpv is a media player based on MPlayer and mplayer2.
It supports a wide variety of video file formats,
audio and video codecs, and subtitle types.
- Remember to connect this snap to the removable-media slot,
- otherwise external media won't be accessible!
+
+ This version features a motion compensation option via vapoursynth.
+
+ Install with:
+ sudo snap install --edge mpv-nilsboy --devmode
+
+ Repository: https://github.com/nilsboy/mpv
grade: stable
confinement: strict
+architectures:
+ - build-on: amd64
+ run-on: amd64
+
apps:
mpv:
- command: desktop-launch $SNAP/usr/bin/mpv
- plugs: [x11, opengl, unity7, pulseaudio, home, network, removable-media, optical-drive]
+ environment:
+ # directory where vapoursynth plugins should reside
+ VAPOURSYNTH_PLUGIN_PATH: $SNAP/lib/vapoursynth
+ # https://forum.snapcraft.io/t/opengl-error-mesa-loader-fails/15197/
+ LD_LIBRARY_PATH: $SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/:$SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/dri:$SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/mesa:$SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/mesa-gl:$SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/xorg:$SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/pulseaudio/
+ LIBGL_DRIVERS_PATH: $SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/dri
+ LIBVA_DRIVERS_PATH: $SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/dri
+ # command: desktop-launch $SNAP/usr/bin/mpv
+ command: ./usr/bin/mpv
+ # TODO: vainfo vdpauinfo
+ plugs:
+ - home
+ - network
+ - opengl
+ - optical-drive
+ - pulseaudio
+ - removable-media
+ - unity7
+ - x11
+ # allow access to ~/.config/mpv
+ # - config-mpv
+ # allow access to system fonts
+ - desktop
-parts:
- youtube-dl:
- source: https://github.com/rg3/youtube-dl/archive/2017.07.30.1.tar.gz
- plugin: python
- python-version: python3
- after: [ffmpeg]
+# plugs:
+# config-mpv:
+# interface: personal-files
+# write:
+# - $HOME/.config/mpv
+parts:
mpv:
- source: https://github.com/mpv-player/mpv/archive/v0.26.0.tar.gz
+ source: https://github.com/mpv-player/mpv.git
+ source-depth: 1
plugin: waf
configflags:
- --enable-cdda
- --enable-dvdnav
- - --enable-dvdread
- - --enable-encoding
+ # - --enable-dvdread
+ # - --enable-encoding
- --enable-libmpv-shared
- --disable-static-build
- - --enable-libsmbclient
- - --enable-lua
+ # - --enable-libsmbclient
- --disable-build-date
- prepare: |
+ override-build: |
./bootstrap.py
- stage-packages:
- - lua5.2
- - libasound2
- - libass5
- - libatomic1
- - libbluray1
- - libc6
- - libcdio-cdda1
- - libcdio-paranoia1
- - libcdio13
- - libdrm2
- - libdvdnav4
- - libdvdread4
- - libegl1-mesa
- - libgbm1
- - libgl1-mesa-glx
- - libjack-jackd2-0
- - libjpeg8
- - liblcms2-2
- - liblua5.2-0
- - libpulse0
- - librubberband2v5
- - libsdl2-2.0-0
- - libsmbclient
- - libsndio6.1
- - libuchardet0
- - libv4l-0
- - libva-drm1
- - libva-wayland1
- - libva-x11-1
- - libva1
- - libvdpau1
- - libwayland-client0
- - libwayland-cursor0
- - libwayland-egl1-mesa
- - libx11-6
- - libxext6
- - libxinerama1
- - libxkbcommon0
- - libxrandr2
- - libxss1
- - libxv1
- - zlib1g
- - libsodium18
- build-packages:
+ snapcraftctl build
+ build-packages:
+ - yasm
+ - va-driver-all
+ - vdpau-va-driver
+ - libvdpau-va-gl1
+ - mesa-vdpau-drivers
+ - vdpauinfo
- build-essential
+ - libasound2
- libasound2-dev
- libass-dev
+ - libass9
+ - libasyncns0
- libbluray-dev
+ - libbluray2
+ - libbs2b0
+ - libcaca0
+ - libcairo2
+ - libcdio-cdda2
- libcdio-paranoia-dev
+ - libcdio-paranoia2
+ - libcdio17
+ - libcrystalhd3
+ - libdrm2
- libdvdnav-dev
+ - libdvdnav4
- libdvdread-dev
+ - libdvdread4
+ - libegl1
- libegl1-mesa-dev
- libenca-dev
+ - libfdk-aac-dev
+ - libfdk-aac1
+ - libfftw3-double3
+ - libflac8
+ - libflite1
+ - libfontconfig1
+ - libfreetype6
+ - libfribidi0
- libgbm-dev
+ - libgbm1
+ - libgl1
- libgl1-mesa-dev
+ - libglvnd0
+ - libglx0
+ - libgme0
+ - libgomp1
+ - libgraphite2-3
+ - libgsm1
- libguess-dev
+ - libharfbuzz-dev
+ - libharfbuzz0b
+ - libicu60
- libjack-dev
+ - libjack0
- libjpeg-dev
+ - libjpeg-turbo8
+ - liblcms2-2
- liblcms2-dev
+ - liblua5.2-0
- liblua5.2-dev
+ - libmp3lame0
+ - libnorm1
+ - libnuma1
+ - libogg0
+ - libopenal1
+ - libopenjp2-7
+ - libopus0
+ - libpgm-5.2-0
+ - libpixman-1-0
+ - libpng16-16
- libpulse-dev
+ - libpulse0
+ - libpython3.6
- librubberband-dev
+ - librubberband2
+ - libsamplerate0
+ - libsdl2-2.0-0
- libsdl2-dev
- - libssl-dev
- - libsmbclient-dev
+ - libshine3
+ - libslang2
+ - libsnappy1v5
+ - libsndfile1
- libsndio-dev
+ - libsndio6.1
+ - libsodium23
+ - libsoxr0
+ - libspeex1
+ - libssh-gcrypt-4
+ - libssl-dev
- libswscale-dev
+ - libtheora0
+ - libtwolame0
- libuchardet-dev
- libv4l-dev
- libva-dev
+ - libva-drm2
+ - libva-x11-2
+ - libva2
- libvdpau-dev
+ - libvdpau1
+ - libvorbis0a
+ - libvorbisenc2
+ - libvpx5
+ - libwavpack1
+ - libwayland-client0
+ - libwayland-cursor0
- libwayland-dev
+ - libwayland-egl1
+ - libwayland-server0
+ - libwebp6
+ - libwebpmux3
+ - libx11-6
- libx11-dev
+ - libx264-152
+ - libx264-dev
+ - libx265-146
+ - libxau6
+ - libxcb-render0
+ - libxcb-shape0
+ - libxcb-shm0
+ - libxcb-xfixes0
+ - libxcb1
+ - libxcursor1
+ - libxdmcp6
+ - libxext6
+ - libxfixes3
+ - libxi6
- libxinerama-dev
+ - libxinerama1
- libxkbcommon-dev
+ - libxkbcommon0
+ - libxml2
- libxrandr-dev
+ - libxrandr2
+ - libxrender1
- libxss-dev
+ - libxss1
- libxv-dev
- - pkg-config
+ - libxv1
+ - libxvidcore4
+ - libxxf86vm1
+ - libzmq5
+ - libzvbi0
+ # - pkg-config
- python
- python-docutils
+ stage-packages:
+ - i965-va-driver
+ - va-driver-all
+ - vdpau-va-driver
+ - libvdpau-va-gl1
+ - mesa-vdpau-drivers
+ - vdpauinfo
+ - vainfo
+ - libuchardet0
+ - libharfbuzz0b
+ - libx265-146
+ - libx264-152
+ - libssh-4
+ - libsnappy1v5
+ - libgsm1
+ - libfreetype6
+ - libfontconfig1
+ - samba-libs
+ - libpython3.6
+ - libsmbclient
+ - libgl1
+ - libglu1-mesa
+ - libglx0
+ - libglvnd0
+ - libsdl2-2.0-0
+ - libxcursor1
+ - libxi6
+ - libxxf86vm1
+ - libslang2
+ - libwayland-egl1
+ - libegl1
+ - liblua5.2-0
+ - liblcms2-2
+ - libfftw3-3
+ - libasound2
+ - libass9
+ - libatomic1
+ - libbluray2
+ - libbs2b0
+ - libcaca0
+ - libcdio-cdda2
+ - libcdio-paranoia2
+ - libcdio17
+ - libchromaprint1
+ - libcrystalhd3
+ - libdrm2
+ - libdvdnav4
+ - libdvdread4
+ - libegl-mesa0
+ - libenca0
+ - libfdk-aac1
+ - libflite1
+ - libfribidi0
+ - libgbm1
+ - libgme0
+ - libguess1
+ - libjack0
+ - libjpeg62
+ - libjpeg8
+ - libjpeg9
+ - liblzma5
+ - libmp3lame0
+ - libnetcdf13
+ - libomxil-bellagio0
+ - libopenal1
+ - libopencore-amrnb0
+ - libopencore-amrwb0
+ - libopus0
+ - libpulse0
+ - librubberband2
+ - libsctp1
+ - libshine3
+ - libsodium23
+ - libsoxr0
+ - libspeex1
+ - libssh-gcrypt-4
+ - libswscale4
+ - libtesseract4
+ - libtheora0
+ - libtwolame0
+ - libva-drm2
+ - libva-wayland2
+ - libva2
+ - libvdpau1
+ - libvo-amrwbenc0
+ - libvpx5
+ - libwavpack1
+ - libwayland-client0
+ - libwayland-cursor0
+ - libwebp6
+ - libxcb-shape0
+ - libxext6
+ - libxinerama1
+ - libxkbcommon0
+ - libxrandr2
+ - libxss1
+ - libxv1
+ - libxvidcore4
+ - libxvmc1
+ - libzmq5
+ - libzvbi0
+ - freeglut3
after:
- - desktop-glib-only
+ # - desktop-glib-only
- ffmpeg
+ # - vapoursynth
+ # - libvdpau-va-gl
organize:
usr/local: usr/
- # Exclude some junk from the final snap
- prime:
- - -usr/include
- - -usr/share/doc
- - -usr/share/icons
- - -usr/doc
- - -usr/man
ffmpeg:
- source: https://ffmpeg.org/releases/ffmpeg-3.3.3.tar.xz
+ source: https://github.com/FFmpeg/FFmpeg.git
+ source-depth: 1
plugin: autotools
configflags:
- --enable-gpl
- --enable-openssl
- --enable-nonfree
- --enable-avresample
- - --enable-avisynth
+ # TODO: install headers for avisynth - got removed from ffmpeg master?:
+ # - --enable-avisynth
- --enable-ladspa
- --enable-libass
- --enable-libbluray
@@ -168,12 +365,15 @@ parts:
- --enable-libtwolame
- --enable-libvorbis
- --enable-libvpx
- - --enable-libwavpack
+ # unknown option (2020-12-12)
+ # - --enable-libwavpack
- --enable-libwebp
+ - --enable-libx264
+ - --enable-libfdk-aac
- --enable-libx265
- --enable-libxvid
- --enable-libzmq
- - --enable-libzvbi
+ - --enable-libzvbi
- --enable-omx
- --enable-openal
- --enable-opengl
@@ -245,16 +445,273 @@ parts:
- libxvmc-dev
- libzmq3-dev
- libzvbi-dev
- - pkg-config
+ # - pkg-config
- texinfo
- - nasm
- zlib1g-dev
+ - libasound2
+ - libass9
+ - libasyncns0
+ - libbluray2
+ - libbs2b0
+ - libcaca0
+ - libcairo2
+ - libcdio-cdda2
+ - libcdio-paranoia2
+ - libcdio17
+ - libcrystalhd3
+ - libdrm2
+ - libfdk-aac1
+ - libfftw3-double3
+ - libflac8
+ - libflite1
+ - libfontconfig1
+ - libfreetype6
+ - libfribidi0
+ - libgl1
+ - libglvnd0
+ - libglx0
+ - libgme0
+ - libgomp1
+ - libgraphite2-3
+ - libgsm1
+ - libharfbuzz0b
+ - libicu60
+ - libmp3lame0
+ - libnorm1
+ - libnuma1
+ - libogg0
+ - libopenal1
+ - libopenjp2-7
+ - libopus0
+ - libpgm-5.2-0
+ - libpixman-1-0
+ - libpng16-16
+ - libpulse0
+ - librubberband2
+ - libsamplerate0
+ - libsdl2-2.0-0
+ - libshine3
+ - libslang2
+ - libsnappy1v5
+ - libsndfile1
+ - libsndio6.1
+ - libsodium23
+ - libsoxr0
+ - libspeex1
+ - libssh-gcrypt-4
+ - libtheora0
+ - libtwolame0
+ - libva-drm2
+ - libva-x11-2
+ - libva2
+ - libvdpau1
+ - libvorbis0a
+ - libvorbisenc2
+ - libvpx5
+ - libwavpack1
+ - libwayland-client0
+ - libwayland-cursor0
+ - libwayland-egl1
+ - libwebp6
+ - libwebpmux3
+ - libx11-6
+ - libx264-152
+ - libx265-146
+ - libxau6
+ - libxcb-render0
+ - libxcb-shape0
+ - libxcb-shm0
+ - libxcb-xfixes0
+ - libxcb1
+ - libxcursor1
+ - libxdmcp6
+ - libxext6
+ - libxfixes3
+ - libxi6
+ - libxinerama1
+ - libxkbcommon0
+ - libxml2
+ - libxrandr2
+ - libxrender1
+ - libxss1
+ - libxv1
+ - libxvidcore4
+ - libxxf86vm1
+ - libzmq5
+ - libzvbi0
+ stage-packages:
+ - libasound2
+ - libass9
+ - libasyncns0
+ - libbluray2
+ - libbs2b0
+ - libcaca0
+ - libcairo2
+ - libcdio-cdda2
+ - libcdio-paranoia2
+ - libcdio17
+ - libcrystalhd3
+ - libdrm2
+ - libfdk-aac1
+ - libfftw3-double3
+ - libflac8
+ - libflite1
+ - libfontconfig1
+ - libfreetype6
+ - libfribidi0
+ - libgl1
+ - libglvnd0
+ - libglx0
+ - libgme0
+ - libgomp1
+ - libgraphite2-3
+ - libgsm1
+ - libharfbuzz0b
+ - libicu60
+ - libmp3lame0
+ - libnorm1
+ - libnuma1
+ - libogg0
+ - libopenal1
+ - libopenjp2-7
+ - libopus0
+ - libpgm-5.2-0
+ - libpixman-1-0
+ - libpng16-16
+ - libpulse0
+ - librubberband2
+ - libsamplerate0
+ - libsdl2-2.0-0
+ - libshine3
+ - libslang2
+ - libsnappy1v5
+ - libsndfile1
+ - libsndio6.1
+ - libsodium23
+ - libsoxr0
+ - libspeex1
+ - libssh-gcrypt-4
+ - libtheora0
+ - libtwolame0
+ - libva-drm2
+ - libva-x11-2
+ - libva2
+ - libvdpau1
+ - libvorbis0a
+ - libvorbisenc2
+ - libvpx5
+ - libwavpack1
+ - libwayland-client0
+ - libwayland-cursor0
+ - libwayland-egl1
+ - libwebp6
+ - libwebpmux3
+ - libx11-6
+ - libx264-152
+ - libx265-146
+ - libxau6
+ - libxcb-render0
+ - libxcb-shape0
+ - libxcb-shm0
+ - libxcb-xfixes0
+ - libxcb1
+ - libglu1-mesa
+ - libxv1
+ - libxvidcore4
+ - libzmq5
+ - libzvbi0
+ - freeglut3
organize:
usr/local: usr/
- # Exclude some junk from the final snap
- prime:
- - -usr/share/doc
- - -usr/share/icons
- - -usr/include
- - -usr/doc
- - -usr/man
+
+ # vapoursynth:
+ # # NOTE: Releases R36 and R37 seem to have errors
+ # source: https://github.com/vapoursynth/vapoursynth.git
+ # source-depth: 1
+ # source-tag: R35
+ # # replace hardcoded vapoursynth plugin directory with snap one
+ # override-build: |
+ # perl -pi -007e 's/\Qstd::string systemPluginDir(tmp ? tmp : VS_PATH_PLUGINDIR);\E/const char *snapPluginDir = getenv("VAPOURSYNTH_PLUGIN_PATH");\nstd::string systemPluginDir(snapPluginDir);\n/gms' src/core/vscore.cpp
+ # snapcraftctl build
+ # plugin: autotools
+ # configflags:
+ # - --disable-ocr
+ # build-packages:
+ # - git
+ # - g++
+ # - make
+ # - autoconf
+ # - libtool
+ # - cmake
+ # - cython3
+ # - automake
+ # - build-essential
+ # - yasm
+ # - libpython3.6
+ # stage-packages:
+ # - libpython3.6
+ # organize:
+ # usr/local/lib: usr/lib
+ # after:
+ # - zimg
+
+ # vapoursynth-mvtools:
+ # source: git://github.com/dubhater/vapoursynth-mvtools.git
+ # source-depth: 1
+ # plugin: meson
+ # override-build: |
+ # snapcraftctl build
+ # mkdir -pv $SNAPCRAFT_PART_INSTALL/lib/vapoursynth/
+ # cp $SNAPCRAFT_PART_INSTALL/usr/local/lib/x86_64-linux-gnu/* $SNAPCRAFT_PART_INSTALL/lib/vapoursynth/
+ # build-packages:
+ # - git
+ # - g++
+ # - make
+ # - autoconf
+ # - libtool
+ # - cmake
+ # - automake
+ # - build-essential
+ # - libfftw3-dev
+ # - nasm
+ # after:
+ # - vapoursynth
+
+ # zimg:
+ # source: https://github.com/sekrit-twc/zimg.git
+ # source-depth: 1
+ # # need by vapoursynth (2020-06-01)
+ # source-branch: v2.9
+ # plugin: autotools
+ # configflags:
+ # - --enable-x86simd
+ # build-packages:
+ # - git
+ # - g++
+ # - make
+ # - autoconf
+ # - libtool
+ # - cmake
+ # - automake
+ # - build-essential
+ # organize:
+ # usr/local: usr/
+
+ # desktop-glib-only:
+ # source: https://github.com/ubuntu/snapcraft-desktop-helpers.git
+ # source-depth: 1
+ # source-subdir: glib-only
+ # plugin: make
+ # build-packages:
+ # - libglib2.0-dev
+ # stage-packages:
+ # - libglib2.0-bin
+
+ # youtube-dl:
+ # source: https://github.com/rg3/youtube-dl.git
+ # source-depth: 1
+ # plugin: python
+ # python-version: python3
+ # after:
+ # - ffmpeg
+