Giter Club home page Giter Club logo

mpv-winbuild-cmake's Introduction

CMake-based MinGW-w64 Cross Toolchain

This thing’s primary use is to build Windows binaries of mpv.

Alternatively, you can download the builds from here.

Prerequisites

  • You should also install Ninja and use CMake’s Ninja build file generator. It’s not only much faster than GNU Make, but also far less error-prone, which is important for this project because CMake’s ExternalProject module tends to generate makefiles which confuse GNU Make’s jobserver thingy.

  • As a build environment, any modern Linux distribution should work.

  • Compiling on Cygwin / MSYS2 is supported, but it tends to be slower than compiling on Linux.

Setup Build Environment

Manjaro / Arch Linux

These packages need to be installed first before compiling mpv:

pacman -S git gyp mercurial subversion ninja cmake meson ragel yasm nasm asciidoc enca gperf unzip p7zip gcc-multilib clang lld libc++ libc++abi python-pip curl lib32-gcc-libs lib32-glib2 mimalloc ccache

pip3 install rst2pdf mako jsonschema

pacman -S llvm # needed for building LLVM PGO

Ubuntu Linux / WSL (Windows 10)

apt-get install build-essential checkinstall bison flex gettext git mercurial subversion ninja-build gyp cmake yasm nasm automake pkgconf libtool libtool-bin gcc-multilib g++-multilib clang lld libc++1 libc++abi1 libgmp-dev libmpfr-dev libmpc-dev libgcrypt-dev gperf ragel texinfo autopoint re2c asciidoc python3-pip docbook2x unzip p7zip-full curl mimalloc ccache

pip3 install rst2pdf meson mako jsonschema

Note:

  • Use apt-fast if apt-get is too slow.
  • It is advised to use bash over dash. Set sudo ln -sf /bin/bash /bin/sh. Revert back by sudo ln -sf /bin/dash /bin/sh.
  • On WSL platform, compiling 32bit requires qemu. Refer to this.
  • To update package installed by pip, run pip3 install <package> --upgrade.

Cygwin

Download Cygwin installer and run:

setup-x86_64.exe -R "C:\cygwin64" -q --packages="bash,binutils,bzip2,cygwin,gcc-core,gcc-g++,cygwin32-gcc-core,cygwin32-gcc-g++,gzip,m4,pkgconf,make,unzip,zip,diffutils,wget,git,patch,cmake,gperf,yasm,enca,asciidoc,bison,flex,gettext-devel,mercurial,python-devel,python-docutils,docbook2X,texinfo,libmpfr-devel,libgmp-devel,libmpc-devel,libtool,autoconf2.5,automake,automake1.9,libxml2-devel,libxslt-devel,meson,libunistring5"

Additionally, some packages, re2c, ninja, ragel, gyp, rst2pdf, nasm need to be installed manually.

MSYS2

Install MSYS2 and run it via MSYS2 MSYS shortcut. Don't use MSYS2 MinGW 32-bit or MSYS2 MinGW 64-bit shortcuts, that's important!

These packages need to be installed first before compiling mpv:

pacman -S base-devel cmake gcc yasm nasm git mercurial subversion gyp tar gmp-devel mpc-devel mpfr-devel python zlib-devel unzip zip p7zip meson libunistring5

Don't install anything from the mingw32 and mingw64 repositories, it's better to completely disable them in /etc/pacman.conf just to be safe.

Additionally, some packages, re2c, ninja, ragel, libjpeg, rst2pdf, jinja2 need to be installed manually.

Compiling with GCC

Example:

cmake -DTARGET_ARCH=x86_64-w64-mingw32 \
-DGCC_ARCH=x86-64-v3 \
-DSINGLE_SOURCE_LOCATION="/home/user/packages" \
-DRUSTUP_LOCATION="/home/user/install_rustup" \
-G Ninja -B build64 -S mpv-winbuild-cmake

This cmake command will create build64 folder for x86_64-w64-mingw32. Set -DTARGET_ARCH=i686-w64-mingw32 for compiling 32-bit.

-DGCC_ARCH=x86-64-v3 will set -march option when compiling gcc with x86-64-v3 instructions. Other value like native, znver3 should work too.

Enter build64 folder and build toolchain once. By default, it will be installed in install folder.

ninja download # download all packages at once (optional)
ninja gcc      # build gcc only once (take around ~20 minutes)
ninja mpv      # build mpv and all its dependencies

On WSL2, you might see it stuck with 100% disk usage and never finished. See below.

The final build64 folder's size will be around ~3GB.

Building Software (Second Time)

To build mpv for a second time:

ninja update # perform git pull on all packages that used git

After that, build mpv as usual:

ninja mpv

Compiling with Clang

Supported target architecture (TARGET_ARCH) with clang is: x86_64-w64-mingw32 , i686-w64-mingw32 , aarch64-w64-mingw32. The aarch64 are untested.

Example:

cmake -DTARGET_ARCH=x86_64-w64-mingw32 \
-DCMAKE_INSTALL_PREFIX="/home/user/clang_root" \
-DCOMPILER_TOOLCHAIN=clang \
-DGCC_ARCH=x86-64-v3 \
-DSINGLE_SOURCE_LOCATION="/home/user/packages" \
-DRUSTUP_LOCATION="/home/user/install_rustup" \
-DMINGW_INSTALL_PREFIX="/home/user/build_x86_64_v3/x86_64_v3-w64-mingw32" \
-G Ninja -B build_x86_64_v3 -S mpv-winbuild-cmake

The cmake command will create clang_root as clang sysroot where llvm tools installed. build_x86_64 is build directory to compiling packages.

cd build_x86_64
ninja llvm       # build LLVM (take around ~2 hours)
ninja rustup     # build rust toolchain
ninja llvm-clang # build clang on specified target
ninja mpv        # build mpv and all its dependencies

If you want add another target (ex. i686-w64-mingw32), change TARGET_ARCH and build folder.

cmake -DTARGET_ARCH=i686-w64-mingw32 \
-DCMAKE_INSTALL_PREFIX="/home/user/clang_root" \
-DCOMPILER_TOOLCHAIN=clang \
-DSINGLE_SOURCE_LOCATION="/home/user/packages" \
-DRUSTUP_LOCATION="/home/user/install_rustup" \
-DMINGW_INSTALL_PREFIX="/home/user/build_i686/i686-w64-mingw32" \
-G Ninja -B build_i686 -S mpv-winbuild-cmake
cd build_i686
ninja llvm-clang # same as above

If you've changed GCC_ARCH option, you need to run:

ninja rebuild_cache

to update flags which will pass on gcc, g++ and etc.

Available Commands

Commands Description
ninja package compile a package
ninja clean remove all stamp files in all packages.
ninja download Download all packages' sources at once without compiling.
ninja update Update all git repos. When a package pulls new changes, all of its stamp files will be deleted and will be forced rebuild. If there is no change, it will not remove the stamp files and no rebuild occur. Use this instead of ninja clean if you don't want to rebuild everything in the next run.
ninja package-fullclean Remove all stamp files of a package.
ninja package-liteclean Remove build, clean stamp files only. This will skip re-configure in the next running ninja package (after the first compile). Updating repo or patching need to do manually. Ideally, all DEPENDS targets in package.cmake should be temporarily commented or deleted. Might be useful in some cases.
ninja package-removebuild Remove 'build' directory of a package.
ninja package-removeprefix Remove 'prefix' directory.
ninja package-force-update Update a package. Only git repo will be updated.

package is package's name found in packages folder.

Information about packages

  • Git/Hg

    • ANGLE
    • FFmpeg
    • xz
    • x264
    • x265 (multilib)
    • uchardet
    • rubberband (with libsamplerate)
    • opus
    • openal-soft
    • mpv
    • luajit
    • libvpx
    • libwebp
    • libpng
    • libsoxr
    • libzimg (with graphengine)
    • libdvdread
    • libdvdnav
    • libdvdcss
    • libudfread
    • libbluray
    • libunibreak
    • libass
    • libmysofa
    • lcms2
    • lame
    • harfbuzz
    • game-music-emu
    • freetype2
    • flac
    • opus-tools
    • mujs
    • libarchive
    • libjpeg
    • shaderc (with spirv-headers, spirv-tools, glslang)
    • vulkan-header
    • vulkan
    • spirv-cross
    • fribidi
    • nettle
    • curl
    • libxml2
    • amf-headers
    • avisynth-headers
    • nvcodec-headers
    • libvpl
    • megasdk (with termcap, readline, cryptopp, sqlite, libuv, libsodium)
    • aom
    • dav1d
    • libplacebo (with glad, fast_float, xxhash)
    • fontconfig
    • libbs2b
    • libssh
    • libsrt
    • libjxl (with brotli, highway)
    • libmodplug
    • uavs3d
    • davs2
    • libsixel
    • libdovi
    • libva
    • libzvbi
    • svtav1
    • libaribcaption
    • zlib (zlib-ng)
    • zstd
    • expat
    • openssl
    • libsdl2
    • speex
    • vorbis
    • ogg
    • bzip2
  • Zip

    • xvidcore (1.3.7)
    • lzo (2.10)
    • libopenmpt (0.7.8)
    • libiconv (1.17)
    • gmp (6.3.0)
    • vapoursynth (R65/R63)
    • mbedtls (3.5.0)
    • libressl (3.1.5)

WSL workaround

Place the file on specified location to limit ram & cpu usage to avoid getting stuck while building mpv.

# /etc/wsl.conf
[interop]
#enabled=false
appendWindowsPath=false

[automount]
enabled = true
options = "metadata"
mountFsTab = false

[user]
default=<user>
---------------------------------------
# C:\Users\<UserName>\.wslconfig
[wsl2]
memory=4GB
swap=0
pageReporting=false

Acknowledgements

This project was originally created and maintained lachs0r. Since then, it heavily modified to suit my own need.

mpv-winbuild-cmake's People

Contributors

adlerzei avatar andarwinux avatar charlesmengca avatar chhe avatar deadsix27 avatar dyphire avatar garoto avatar hill-98 avatar hiltjo avatar hooke007 avatar kasper93 avatar kosm8 avatar mathstuf avatar myfreeer avatar myrup avatar nkh0472 avatar nottsunami avatar nshtg avatar pavelxdd avatar rossy avatar shinchiro avatar theamm avatar trclst avatar wiiaboo avatar zhongfly avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mpv-winbuild-cmake's Issues

ERROR: downloading bzip2-1.0.6.tar.gz

There is a new version since 13.7.2019. No access to old version!!
Please correct
bzip2.cmake
URL https://fossies.org/linux/misc/bzip2-1.0.8.tar.gz
URL_MD5 67e051268d0c475ea773822f7500d0e5
and
bzip2-1-fixes.patch, README.md to new version.
You can delete the first diff in bzip2-1-fixes.patch.

Setup Vapoursynth

Here's quick steps:

  1. Download latest Vapoursynth with same type (32/64-bit) as mpv. If you've download portable version, extract it in same folder as mpv.exe
  2. Download Python 3.6.x. If you want portable one, download the embed one and extract in same folder as mpv.exe
  3. Download additional vapoursynth plugin like mvtools. Extract the library and copy into vapoursynth64\plugins folder
  4. You may need additional plugins, depends on what the vapoursynth script do

libEGL.dll & libGLESv2.dll from firefox don't work

When using libEGL.dll & libGLESv2.dll from firefox latest stable 67.0.2 64bit installation I get this error in the log

[11069520] vo/gpu/opengl: Initializing GPU context 'angle'
[11075684]     vo/gpu: Failed to load LIBEGL.DLL
[11079683]     vo/gpu: Failed initializing any suitable GPU context!
[11084104]    cplayer: Error opening/initializing the selected video_out (--vo) device.

and then mpv exits.

trying with -v --no-config --gpu-context=angle it falls back to direct3d

[vo/gpu/opengl] Initializing GPU context 'angle'
[vo/gpu] Failed to load LIBEGL.DLL
[vo/direct3d] Setting backbuffer dimensions to (1920x1080).

Chrome dll files work fine

Compilation failing

When building ffmpeg, i'm getting this error:

(...)/mingw/lib/libaom.a(av1_cx_iface.c.obj):av1_cx_iface.c:(.text+0xabd): undefined reference to `warn'

megasdk-build-err

Build of megasdk doesn't work anymore.

FAILED: packages/megasdk-prefix/src/megasdk-stamp/megasdk-build
cd /root/build64/packages/megasdk-prefix/src/megasdk && /usr/local/lib/python3.6/dist-packages/cmake/data/bin/cmake -P /root/build64/packages/megasdk-prefix/src/megasdk-stamp/megasdk-build-.cmake && /usr/local/lib/python3.6/dist-packages/cmake/data/bin/cmake -E touch /root/build64/packages/megasdk-prefix/src/megasdk-stamp/megasdk-build
CMake Error at /root/build64/packages/megasdk-prefix/src/megasdk-stamp/megasdk-build-.cmake:16 (message):
  Command failed: 2

   '/root/build64/exec' 'make' '-j8'

  See also

    /root/build64/packages/megasdk-prefix/src/megasdk-stamp/megasdk-build-*.log

megasdk-build-err.log:

libtool: warning: undefined symbols not allowed in x86_64-w64-mingw32 shared libraries; building static only
examples/megacli.cpp: In function 'mega::autocomplete::ACN autocompleteSyntax()':
examples/megacli.cpp:2497:19: note: variable tracking size limit exceeded with -fvar-tracking-assignments, retrying without
 autocomplete::ACN autocompleteSyntax()
                   ^~~~~~~~~~~~~~~~~~
/root/build64/install/lib/gcc/x86_64-w64-mingw32/8.3.1/../../../../x86_64-w64-mingw32/bin/ld: examples/examples_megacli-megacli.o:megacli.cpp:(.rdata$.refptr._Z8exec_logRN4mega12autocomplete7ACStateE[.refptr._Z8exec_logRN4mega12autocomplete7ACStateE]+0x0): undefined reference to `exec_log(mega::autocomplete::ACState&)'
/root/build64/install/lib/gcc/x86_64-w64-mingw32/8.3.1/../../../../x86_64-w64-mingw32/bin/ld: examples/examples_megacli-megacli.o:megacli.cpp:(.rdata$.refptr._Z13exec_codepageRN4mega12autocomplete7ACStateE[.refptr._Z13exec_codepageRN4mega12autocomplete7ACStateE]+0x0): undefined reference to `exec_codepage(mega::autocomplete::ACState&)'
/root/build64/install/lib/gcc/x86_64-w64-mingw32/8.3.1/../../../../x86_64-w64-mingw32/bin/ld: examples/examples_megacli-megacli.o:megacli.cpp:(.rdata$.refptr._Z10exec_clearRN4mega12autocomplete7ACStateE[.refptr._Z10exec_clearRN4mega12autocomplete7ACStateE]+0x0): undefined reference to `exec_clear(mega::autocomplete::ACState&)'
collect2: error: ld returned 1 exit status
make[2]: *** [examples/megacli.exe] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

DEPENDEE force-update of crossc prevents -DENABLE_VCS_UPDATES=false

Environment: Ubuntu 18.10

Steps to reproduce:

  • mkdir build64
  • cd build64
  • cmake -DTARGET_ARCH=x86_64-w64-mingw32 -DENABLE_VCS_UPDATES=false -G Ninja ..
  • ninja gcc
  • ninja mpv

These steps are the same as what is in the readme, except for the addition of -DENABLE_VCS_UPDATES=false

Result:
ninja: error: 'packages/crossc-prefix/src/crossc-stamp/cros-DENABLE_VCS_UPDATES=false sc-force-update', needed by 'packages/crossc-prefix/src/crossc-stamp/crossc-update-submodule', missing and no known rule to make it

If i undo the change made in 321720b then ninja mpv completes without any errors but I don't know how safe this change is or if it will always work.

Latest build: back and forward problem.

Using the last mpv-x86_64-20190622-git-c9e7473.7z, i've had a problem to move throught any kind of video, it freezes and stop the video.

Solved going back to the previous 20190616 version.

Stable releases don't include install scripts

Hopefully this is the place to ask.

The stable release archives on sourceforge do not include the installer scripts. scoop references these scripts in the installation notes. I'm wondering if this is deliberate (don't know much about the release workflow) and scoop should be updated or if the scripts can be added to stable?

Thanks

ScoopInstaller/Extras#3587

Failing to build gcc

I'm getting this error when building the gcc package from the toolchain...

.../build/toolchain/gcc-prefix/src/gcc/gcc/doc/invoke.texi:1580: unknown command `2'
.../build/toolchain/gcc-prefix/src/gcc/gcc/doc/invoke.texi:1580: @include: could not find .../toolchain/gcc-prefix/src/gcc/gcc/../libiberty/at-file.texi
make[1]: *** [doc/gcc.info] Error 1
make[1]: *** Waiting for unfinished jobs....
make: *** [all-gcc] Error 2

Any ideas? Thanks!

update.bat not working!

Mpv version output:

mpv 0.32.0-288-gee70e8ce50 Copyright © 2000-2020 mpv/MPlayer/mplayer2 projects
built on Sun Mar 22 12:56:50 +08 2020
FFmpeg library versions:
libavutil 56.42.101
libavcodec 58.76.100
libavformat 58.42.100
libswscale 5.6.101
libavfilter 7.77.100
libswresample 3.6.100
FFmpeg version: git-2020-03-21-ea46b45e9

Output of update.bat

Running script without administrator privileges
Checking Windows PowerShell version -- 5
Fetching RSS feed for mpv
Unable to connect to the remote server
Press any key to continue . . .

Subtitle Effect Issue

Expected Behavior

A transparent outline of the text should overlay itself on top of the already displayed words.

Current Behavior

The transparency effect doesn't display correctly and instead the shadow alpha within the text outline is bleeding inwards.

Possible Solution

A pseudo workaround is to remove the \4a shadow alpha effect using a subtitle editing program by also setting it to transparent.

The subtitles display correctly in the video player MPC-HC.

Steps to Reproduce

The specific issue is found at timestamps 0:17:57.43 > 0:18:03.06 within the subtitles linked below. Playing the subtitles through the MPV video player and at the timestamps mentioned previously will reproduce the issue.

Detailed Description

Inspecting the subtitles using the subtitle editing program Aegisub, the effect in question found at timestamps 0:17:57.43 > 0:18:03.06, it appears to be the effect called "1a&HFF&" which is responsible for setting the alpha (transparency) of the text.

According to Aegisub's own documentation (http://docs.aegisub.org/3.2/ASS_Tags/), when used, it effectively leaves only the border and shadow. However for some unknown reason when displaying them in MPV, the \4a or "shadow alpha" is bleeding inwards into the text.

Comparison;

Working as intended;
https://jazmac.prodibi.com/a/q4mjl2xzj07vvm/i/06de2yy1edqy6g?s=FOpTYi6jm3BiocR3V8rWbczAv%2FIV6pbVDjvEvWMwlaQ%3D

Bugged;
https://jazmac.prodibi.com/a/q4mjl2xzj07vvm/i/z9lgz4jyd0ze5l?s=kiY5CbeoTURsEzZ3Zw2k5xsj09axjaOXrpmVe%2F4xZ3c%3D

The text displayed in Aegisub;
https://jazmac.prodibi.com/a/q4mjl2xzj07vvm/i/78rw64dy0v2xvy?s=UymCkapN1L1tV6S40EG668ePbNABQ17iI7TC9OByzZE%3D

download link to the subtitles;
https://mega.nz/#!nbID3IRS!qQJ2y02Bu1E319NkPpeZcG3Q5iFv7c_OZDPl7vb2Ct8

shaderc not found

build64/packages/mpv-prefix/src/mpv/build/config.log shows:

Checking for libshaderc SPIR-V compiler (shared library)
...
err: In file included from ../test.c:1:
build64/install/x86_64-w64-mingw32/include/shaderc/shaderc.h:26:10: fatal error: libshaderc_util/common.h: No such file or directory
  #include "libshaderc_util/common.h"
           ^~~~~~~~~~~~~~~~~~~~~~~~~~
 compilation terminated.

Drag and Drop fail

I am a novice. Installed via bootstrapper.zip. Ran the bat files as admin. Can open MPV via exe file, but "no file" window. Drag and drop a properly iconned file to the window and it closes!

support for --demuxer-lavf-format=vapoursynth

I use your builds in mpv.net and consider using it for StaxRip as well. For both apps it's very important to open vpy files which currently don't seem to work.

Desktop> mpv --demuxer-lavf-format=vapoursynth D:\Samples\test.vpy
[lavf] Unknown lavf format vapoursynth

mpv-player/mpv#7213

App freezes when video filter applied

First of all, apologies if this bug shouldn't be reported here :)

I'm building mpv using mpv-winbuild-cmake. Once I have got the executable, If I start the app with the command:

mpv.exe --vf=lavfi=[movie=C\:/logo.png[watermark],[in][watermark]overlay=1:1] C:\movie.mp4

a logo is shown on top of the video using a ffmpeg video filter.

So far so good, but if i start seeking quickly, the app hangs after a few seeks.

I'm pretty sure that the app behaved well under the same conditions a couple of months ago, and some update of a third-party library is causing now the issue.

I'm trying to detect which library is causing the issue, but I'm a bit lost.

Any help will be appreciated.

Not compiling using Ubuntu

I've followed the directions and almost have success. I am using Ubuntu to compile the 64-bit version.

It successfully compiled all the way to "mpv" itself. However, I am now getting a bunch of linker errors.

../osdep/win32-console-wrapper.c:22:6: warning: no previous prototype for 'cr_perror' [-Wmissing-prototypes]
 void cr_perror(const wchar_t *prefix)
      ^~~~~~~~~
../osdep/win32-console-wrapper.c:37:5: warning: no previous prototype for 'cr_runproc' [-Wmissing-prototypes]
 int cr_runproc(wchar_t *name, wchar_t *cmdline)
     ^~~~~~~~~~
../osdep/win32-console-wrapper.c:73:5: warning: no previous prototype for 'wmain' [-Wmissing-prototypes]
 int wmain(int argc, wchar_t **argv, wchar_t **envp)
     ^~~~~

/home/chowey/mpv-winbuild-cmake/build64/install/lib/gcc/x86_64-w64-mingw32/8.2.1/../../../../x86_64-w64-mingw32/bin/ld: /home/chowey/mpv-winbuild-cmake/build64/install/mingw/lib/libOpenAL32.a(alc.cpp.obj):/home/chowey/mpv-winbuild-cmake/build64/install/x86_64-w64-mingw32/include/c++/8.2.1/mutex:679: undefined reference to `std::__get_once_mutex()'
/home/chowey/mpv-winbuild-cmake/build64/install/lib/gcc/x86_64-w64-mingw32/8.2.1/../../../../x86_64-w64-mingw32/bin/ld: /home/chowey/mpv-winbuild-cmake/build64/install/mingw/lib/libOpenAL32.a(alc.cpp.obj):/home/chowey/mpv-winbuild-cmake/build64/install/x86_64-w64-mingw32/include/c++/8.2.1/mutex:681: undefined reference to `std::__set_once_functor_lock_ptr(std::unique_lock<std::mutex>*)'
/home/chowey/mpv-winbuild-cmake/build64/install/lib/gcc/x86_64-w64-mingw32/8.2.1/../../../../x86_64-w64-mingw32/bin/ld: /home/chowey/mpv-winbuild-cmake/build64/install/mingw/lib/libOpenAL32.a(alc.cpp.obj): in function `__gthread_once':
/home/chowey/mpv-winbuild-cmake/build64/install/x86_64-w64-mingw32/include/c++/8.2.1/x86_64-w64-mingw32/bits/gthr-default.h:699: undefined reference to `__once_proxy'
...

(The full error log can be found here).

It seems like the linker is missing some mutex objects for the libOpenAL32 library. Any clues?

Compile failed

I'm trying to compile mpv on Windows7, and I got Error as follows:

console log

FAILED: packages/crossc-prefix/src/crossc-stamp/crossc-build
cd /home/Year/mpv-winbuild-cmake/build64/packages/crossc-prefix/src/crossc && /usr/bin/cmake.exe -P /home/Year/mpv-winbuild-cmake/build64/packages/crossc-prefix/src/crossc-stamp/crossc-build-.cmake && /usr/bin/cmake.exe -E touch /home/Year/mpv-winbuild-cmake/build64/packages/crossc-prefix/src/crossc-stamp/crossc-build
CMake Error at /home/Year/mpv-winbuild-cmake/build64/packages/crossc-prefix/src/crossc-stamp/crossc-build-.cmake:16 (message):
  Command failed: 2

   '/home/Year/mpv-winbuild-cmake/build64/exec' 'make' '-j8' 'CXX=x86_64-w64-mingw32-g++' 'AR=x86_64-w64-mingw32-ar'

  See also

    /home/Year/mpv-winbuild-cmake/build64/packages/crossc-prefix/src/crossc-stamp/crossc-build-*.log

crossc-build-out.log

x86_64-w64-mingw32-g++ -c  -g -O2 -Wall -std=c++14 -MMD -MP SPIRV-Cross/spirv_glsl.cpp -o spirv_glsl.o

crossc-build-err.log

during RTL pass: combine
SPIRV-Cross/spirv_glsl.cpp: In member function 'virtual void spirv_cross::CompilerGLSL::emit_instruction(const spirv_cross::Instruction&)':
SPIRV-Cross/spirv_glsl.cpp:8054:1: internal compiler error: in create_log_links, at combine.c:1072
 }
 ^
Please submit a full bug report,
with preprocessed source if appropriate.
See  for instructions.
make: *** [Makefile:83:spirv_glsl.o] Error 1

Does anybody have any idea how to fix this error?

Font file fopen failed

I have put several fonts under %APPDATA%/mpv/fonts(as the manual guided), but now the player would raise an error for each font file: [osd/libass] ass_read_file(C:\Users\Mark\AppData\Roaming/mpv/fonts/`%?�): fopen failed(I don't know what the strange unicode character is).
This issue occered on newer bulids of mpv built by shinchiro(all of July's builds will produce this error), but the versions built in May or before are OK. I also tried lachs0r's builds(both 0.28.2 and 0.29.0) and they are OK.
I'm not sure what caused this issue, so just report here.
Environment:

OS Version: Windows 10 Home 1803
System Language: Simplified Chinese
mpv Version:  mpv 0.28.0-638-g08a6827b3d built by shinchiro

gdigrab captures a single frame, then closes

I'm currently attempting to capture desktop footage in order to post-process it with mpv via vapoursynth and display it back to the screen. In order to do so, I'm using gdigrab (via ffmpeg) to capture a specific window, with the command mpv av://gdigrab:title="Title of the window". However, whenever I attempt it, the window shows a single frame of footage, then closes shortly after. Running the script by testing a full-desktop capture, with my standard configuration file outputs the following:

mpv_error.log.txt

Some particular lines that were of my interest:

[vd] Codec list:
[vd]     bmp - BMP (Windows and OS/2 bitmap)
[vd] Opening decoder bmp
[vd] No hardware decoding requested.
[vd] Using software decoding.
[vd] Detected 4 logical cores.
[vd] Requesting 5 threads for decoding.
[vd] Selected codec: bmp (BMP (Windows and OS/2 bitmap))
[vf] User filter list:
[vf]   (empty)
[cplayer] Starting playback...
[vd] DR failed - disabling.
[ffmpeg/demuxer] gdigrab: Failed to capture image (error 6)
[lavf] error reading packet: I/O error.
[lavf] EOF reached.
[vd] Decoder format: 1920x1080 [0:1] bgra auto/auto/auto/auto/auto CL=unknown
[vf] [in] 1920x1080 bgra rgb/bt.709/srgb/full/display SP=1.000000 CL=mpeg1/jpeg
[vf] [userdeint] 1920x1080 bgra rgb/bt.709/srgb/full/display SP=1.000000 CL=mpeg1/jpeg
[vf] [userdeint] (disabled)
[vf] [autorotate] 1920x1080 bgra rgb/bt.709/srgb/full/display SP=1.000000 CL=mpeg1/jpeg
[vf] [autorotate] (disabled)
[vf] [convert] 1920x1080 bgra rgb/bt.709/srgb/full/display SP=1.000000 CL=mpeg1/jpeg
[vf] [convert] (disabled)
[vf] [out] 1920x1080 bgra rgb/bt.709/srgb/full/display SP=1.000000 CL=mpeg1/jpeg
[vf] filter input EOF
[ffmpeg/demuxer] gdigrab: Failed to capture image (error 6)
[vf] filter output EOF
[lavf] error reading packet: I/O error.

At first I thought the issue was with my configuration file, so I also attempted to run it with the --no-config option, with similar results:

mpv_error_2.log.txt

More lines of interest:

[ffmpeg/demuxer] gdigrab: Capturing whole desktop as 1920x1080x32 at (0,0)
[lavf] Could not set AVOption user_agent='libmpv'
[lavf] Could not set AVOption tls_verify='0'
[lavf] Could not set AVOption icy='1'
[lavf] Could not set AVOption timeout='60000000'
[cplayer] Set property: shared-script-properties -> 1
[ffmpeg/demuxer] gdigrab: Stream #0: not enough frames to estimate rate; consider increasing probesize
[lavf] avformat_find_stream_info() finished after 0 bytes.

I have already tried using a large value --demuxer-lavf-probesize (in order to increase the amount of bytes probed (around 1920x1080x32x2 = 132710400 to be absolutely safe), as it might be sampling a single frame and declaring it a standalone bitmap file, but the change didn't seem to fix the issue.

MPV stopped working

All of a sudden, MPV stopped working today, I tried uninstalling, reinstalling, updating to newest version (mpv 0.30.0-195-gb31f2f6cb9) but still no help.

Whenever I click a video or drag it into the mpv window when I launch mpv, it just closes. Nothing shows up or anything. Not sure what happened as it was working fine just yesterday and I haven't done anything since

libtls not found using pkg-config

On a fresh unaltered git clone of mpv-winbuild-cmake, FFMPEG fails on the configure step with this error message:
ERROR: libtls not found using pkg-config

This is on a Manjaro system, building for 64 bit.

Error at mpv-configure

Compilation with Ubuntu 18.04 LTS in W10 .

[7/13] Performing configure step for 'mpv'
FAILED: packages/mpv-prefix/src/mpv-stamp/mpv-configure
cd /root/build64/packages/mpv-prefix/src/mpv && /usr/bin/cmake -P /root/build64/packages/mpv-prefix/src/mpv-stamp/mpv-configure-.cmake && /usr/bin/cmake -E touch /root/build64/packages/mpv-prefix/src/mpv-stamp/mpv-configure
CMake Error at /root/build64/packages/mpv-prefix/src/mpv-stamp/mpv-configure-.cmake:49 (message):
  Command failed: 2

'/root/build64/exec' 'PKG_CONFIG=pkg-config' 'TARGET=x86_64-w64-mingw32' 'DEST_OS=win32' '/root/build64/packages/mpv-prefix/src/mpv/waf' 'configure' '--enable-static-build' '--disable-manpage-build' '--enable-libmpv-shared' '--enable-lua' '--enable-javascript' '--enable-sdl2' '--enable-libarchive' '--enable-libass' '--enable-libbluray' '--enable-dvdnav' '--enable-uchardet' '--enable-rubberband' '--enable-lcms2' '--enable-openal' '--enable-spirv-cross' '--enable-vulkan' '--enable-vapoursynth' '--prefix=/root/build64/install/mingw'

  See also
    /root/build64/packages/mpv-prefix/src/mpv-stamp/mpv-configure-*.log

The log says:
waf: error: no such option: --enable-libass
If you delete the option --enable-libass then the configuration works.
But there are other options that waf does not understand, and no error occurs.

Windows Dark Theme Support

Hi, this is when window is active:
explorer_efLg4QZFl3

This is when it's inactive:
explorer_sUHSx6oipy

Top bar of the File Explorer is dark when window is inactive.

But with MPV, it's white when window is inactive(not focused).
mpv_Urt1y7ZG5G

Could you please add support for this.

Unable to drop (URL)links if player is pinned to taskbar

@shinchiro as the title says and i'm not sure that the problem is coming from your build or it's the player itself. If it's the player,let me know and i'll open a issue there.Basically if i pin the player to the taskbar and try to drag and drop some link it wouldn't accept it,if i place a shortcut to the desktop it's all good,works fine.Let me know what you think and what to do next.Thank you. 👍
Using your latest build
Windows 10 x64 Enterprise LTSB 1607

Compiling for LGPL

I was trying to follow mpv's instructions to make a Windows build of libmpv which is LGPL compliant. The version of FFmpeg that those steps use is not LGPL. While looking around at other options I came across this repo.

Do you have any thoughts or advice for compiling libmpv as LGPL? I know I will need to remove the --enable-gpl option from the FFmpeg build and add --enable-lgpl in the mpv build.

Preload into ram

Is there anyway to pre-load more of a video into ram?
I get a lot of stuttering when HDD is busy. Other players seem to automatically cache/buffer ahead.

ERROR vulkan rebase patch - Ubuntu 18.04LTS W10Pro

Sorry, the patch doesn't work.

~/build64# ninja vulkan
[2/9] Performing download step (git clone) for 'vulkan'
-- vulkan download command succeeded.  See also /root/build64/packages/vulkan-prefix/src/vulkan-stamp/vulkan-download-*.log
[4/9] Performing force-update step for 'vulkan'
-- vulkan force-update command succeeded.  See also /root/build64/packages/vulkan-prefix/src/vulkan-stamp/vulkan-force-update-*.log
[5/9] Performing patch step for 'vulkan'
FAILED: packages/vulkan-prefix/src/vulkan-stamp/vulkan-patch
cd /root/build64/packages/vulkan-prefix/src/vulkan && /root/build64/exec git am "/root/build64/packages/vulkan-*.patch" && /usr/local/lib/python3.6/dist-packages/cmake/data/bin/cmake -E touch /root/build64/packages/vulkan-prefix/src/vulkan-stamp/vulkan-patch
**fatal: previous rebase directory .git/rebase-apply still exists but mbox given.**
ninja: build stopped: subcommand failed.

vulkan compilation fails with cmake 3.13.3

Hey,

vulkan compilation fails in the configure step with this error:
vulkan-configure-err.log: CMake Error: No source or binary directory provided

That is with cmake 3.13.3. It works with cmake 3.13.2.

ERROR: opus not found using pkg-config

Got this error in build64/packages/ffmpeg-prefix/src/ffmpeg-stamp/ffmpeg-configure-out.log when trying to compile on three separate Ubuntu 19.04 computers

About the "forward seeking" freeze issue.

Can you try running mpv with any video/audio filter? like this :
mpv.exe video.mkv --af=lavfi=[extrastereo]

I'm 100% sure that you will be able to reproduce the problem now. (it doesn't always happen at the first "jump", but two o three times it's enough)

These freezes occur using the two latest 20190622 and 20190630 version.

ubuntu build mujs error

use ubuntu build error
detail is:
CMake Error at /home/mpvbuild/mpv-winbuild-cmake/build64/packages/mujs-prefix/src/mujs-stamp/mujs-install-.cmake:16 (message):
Command failed: 1

'/usr/local/bin/cmake' '-Dmake=' '-Dconfig=' '-P' '/home/mpvbuild/mpv-winbuild-cmake/build64/packages/mujs-prefix/src/mujs-stamp/mujs-install--impl.cmake'

See also

/home/mpvbuild/mpv-winbuild-cmake/build64/packages/mujs-prefix/src/mujs-stamp/mujs-install-*.log

the log:
install: cannot stat 'build/release/mujs.pc': No such file or directory
CMake Error at /home/mpvbuild/mpv-winbuild-cmake/build64/packages/mujs-prefix/src/mujs-stamp/mujs-install--impl.cmake:59 (message):
Command failed (1):

'install' '-m644' 'build/release/mujs.pc' '/home/mpvbuild/mpv-winbuild-cmake/build64/install/mingw/lib/pkgconfig'

i saw the dir ls mujs-prefix/src/mujs/build/release/
result:
libmujs.a libmujs.o main.o mujs-pp.exe mujs.exe pp.o

no the mujs.pc file ,

what is wrong ?

ninja mpv: Performing build step for 'dav1d' fails

When running ninja mpv the dav1d component causes a failure.

Output:

Performing build step for 'dav1d'
FAILED: packages/dav1d-prefix/src/dav1d-stamp/dav1d-build
cd /mnt/d/buildingMPV/mpv-winbuild-cmake/build64/packages/dav1d-prefix/src/dav1d-build && /home/user/.local/lib/python2.7/site-packages/cmake/data/bin/cmake -P /mnt/d/buildingMPV/mpv-winbuild-cmake/build64/packages/dav1d-prefix/src/dav1d-stamp/dav1d-build-.cmake && /home/user/.local/lib/python2.7/site-packages/cmake/data/bin/cmake -E touch /mnt/d/buildingMPV/mpv-winbuild-cmake/build64/packages/dav1d-prefix/src/dav1d-stamp/dav1d-build
CMake Error at /mnt/d/buildingMPV/mpv-winbuild-cmake/build64/packages/dav1d-prefix/src/dav1d-stamp/dav1d-build-.cmake:18 (message):
  Command failed: 1

   '/mnt/d/buildingMPV/mpv-winbuild-cmake/build64/exec' 'ninja' '-C' '/mnt/d/buildingMPV/mpv-winbuild-cmake/build64/packages/dav1d-prefix/src/dav1d-build'

  See also

    /mnt/d/buildingMPV/mpv-winbuild-cmake/build64/packages/dav1d-prefix/src/dav1d-stamp/dav1d-build-*.log

In dav1d-build-out.log is:

ninja: Entering directory `/mnt/d/buildingMPV/mpv-winbuild-cmake/build64/packages/dav1d-prefix/src/dav1d-build'
[1/10] Generating vcs_version.h with a custom command.
[2/3] Compiling C object 'tools/f9d35d4@@dav1dplay@exe/dav1dplay.c.obj'.
FAILED: tools/f9d35d4@@dav1dplay@exe/dav1dplay.c.obj 
/mnt/d/buildingMPV/mpv-winbuild-cmake/build64/install/bin/x86_64-w64-mingw32-gcc -Itools/f9d35d4@@dav1dplay@exe -Itools -I../dav1d/tools -I. -I../dav1d/ -Iinclude/dav1d -I../dav1d/include/dav1d -Iinclude -I../dav1d/include -I/mingw64/include/SDL2 -fdiagnostics-color=always -DNDEBUG -pipe -Wall -Winvalid-pch -Wextra -std=c99 -O3 -D_POSIX_C_SOURCE=200112L -fvisibility=hidden -mcmodel=small -Wundef -Werror=vla -Wno-maybe-uninitialized -Wno-missing-field-initializers -Wno-unused-parameter -Werror=missing-prototypes -fomit-frame-pointer -ffast-math -Dmain=SDL_main -MD -MQ 'tools/f9d35d4@@dav1dplay@exe/dav1dplay.c.obj' -MF 'tools/f9d35d4@@dav1dplay@exe/dav1dplay.c.obj.d' -o 'tools/f9d35d4@@dav1dplay@exe/dav1dplay.c.obj' -c ../dav1d/tools/dav1dplay.c
../dav1d/tools/dav1dplay.c:36:10: fatal error: SDL.h: No such file or directory
 #include <SDL.h>
          ^~~~~~~
compilation terminated.
ninja: build stopped: subcommand failed.

Done on Ubuntu 18.04 in WSL Windows 10.

Command Line Options Don't Work

I would like to be able to verify mpv availability on a system by invoking mpv --version but it doesn't seem like that's available in the windows version. Am I wrong or is that something that can be easily implemented?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.