{"id":35738029,"url":"https://github.com/myfreeer/mpv-build-lite","last_synced_at":"2026-05-17T13:17:46.774Z","repository":{"id":60821376,"uuid":"109555667","full_name":"myfreeer/mpv-build-lite","owner":"myfreeer","description":"cloned from https://github.com/shinchiro/mpv-winbuild-cmake with custom patches and smaller binaries","archived":false,"fork":false,"pushed_at":"2026-02-21T01:58:00.000Z","size":5508,"stargazers_count":12,"open_issues_count":2,"forks_count":3,"subscribers_count":2,"default_branch":"main","last_synced_at":"2026-02-21T07:37:46.926Z","etag":null,"topics":["build-script","build-scripts","build-tool","cmake","compile","mingw","mpv","msys2","toolchain","windows"],"latest_commit_sha":null,"homepage":"","language":"CMake","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/myfreeer.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2017-11-05T05:57:04.000Z","updated_at":"2026-02-21T01:31:03.000Z","dependencies_parsed_at":"2023-10-03T16:37:36.898Z","dependency_job_id":"0a34f372-6546-43cd-b016-11dadaad5988","html_url":"https://github.com/myfreeer/mpv-build-lite","commit_stats":null,"previous_names":[],"tags_count":165,"template":false,"template_full_name":null,"purl":"pkg:github/myfreeer/mpv-build-lite","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/myfreeer%2Fmpv-build-lite","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/myfreeer%2Fmpv-build-lite/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/myfreeer%2Fmpv-build-lite/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/myfreeer%2Fmpv-build-lite/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/myfreeer","download_url":"https://codeload.github.com/myfreeer/mpv-build-lite/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/myfreeer%2Fmpv-build-lite/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30003936,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-02T12:19:43.414Z","status":"ssl_error","status_checked_at":"2026-03-02T12:19:02.215Z","response_time":60,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["build-script","build-scripts","build-tool","cmake","compile","mingw","mpv","msys2","toolchain","windows"],"created_at":"2026-01-06T13:17:44.385Z","updated_at":"2026-03-02T13:18:41.056Z","avatar_url":"https://github.com/myfreeer.png","language":"CMake","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CMake-based MinGW-w64 Cross Toolchain\n\nThis thing’s primary use is to build Windows binaries of mpv.\n\nAlternatively, you can download the builds from [here](https://sourceforge.net/projects/mpv-player-windows/files/).\n\n## Prerequisites\n\n -  You should also install Ninja and use CMake’s Ninja build file generator.\n    It’s not only much faster than GNU Make, but also far less error-prone,\n    which is important for this project because CMake’s ExternalProject module\n    tends to generate makefiles which confuse GNU Make’s jobserver thingy.\n\n -  As a build environment, any modern Linux distribution *should* work.\n\n-   Compiling on Cygwin / MSYS2 is supported, but it tends to be slower\n    than compiling on Linux.\n\n## Setup Build Environment\n### Manjaro / Arch Linux\n\nThese packages need to be installed first before compiling mpv:\n\n    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\n    \n    pip3 install rst2pdf mako jsonschema\n\n    pacman -S llvm # needed for building LLVM PGO\n\n### Ubuntu Linux / WSL (Windows 10)\n\n    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\n\n    pip3 install rst2pdf meson mako jsonschema\n\n**Note:**\n\n* Use [apt-fast](https://github.com/ilikenwf/apt-fast) if apt-get is too slow.\n* 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`.\n* On WSL platform, compiling 32bit requires qemu. Refer to [this](https://github.com/Microsoft/WSL/issues/2468#issuecomment-374904520).\n* To update package installed by pip, run `pip3 install \u003cpackage\u003e --upgrade`.\n\n### Cygwin\n\nDownload Cygwin installer and run:\n\n    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\"\n\nAdditionally, some packages, `re2c`, `ninja`, `ragel`, `gyp`, `rst2pdf`, `nasm` need to be [installed manually](https://gist.github.com/shinchiro/705b0afcc7b6c0accffba1bedb067abf).\n\n### MSYS2\n\nInstall MSYS2 and run it via `MSYS2 MSYS` shortcut.\nDon't use `MSYS2 MinGW 32-bit` or `MSYS2 MinGW 64-bit` shortcuts, that's important!\n\nThese packages need to be installed first before compiling mpv:\n\n    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\n\nDon't install anything from the `mingw32` and `mingw64` repositories,\nit's better to completely disable them in `/etc/pacman.conf` just to be safe.\n\nAdditionally, some packages, `re2c`, `ninja`, `ragel`, `libjpeg`, `rst2pdf`, `jinja2` need to be [installed manually](https://gist.github.com/shinchiro/705b0afcc7b6c0accffba1bedb067abf).\n\n\n## Compiling with GCC\n\nExample:\n\n    cmake -DTARGET_ARCH=x86_64-w64-mingw32 \\\n    -DGCC_ARCH=x86-64-v3 \\\n    -DSINGLE_SOURCE_LOCATION=\"/home/user/packages\" \\\n    -G Ninja -B build64 -S mpv-winbuild-cmake\n\nThis cmake command will create `build64` folder for `x86_64-w64-mingw32`. Set `-DTARGET_ARCH=i686-w64-mingw32` for compiling 32-bit.\n\n`-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.\n\nEnter `build64` folder and build toolchain once. By default, it will be installed in `install` folder.\n\n    ninja download # download all packages at once (optional)\n    ninja gcc      # build gcc only once (take around ~20 minutes)\n    ninja mpv      # build mpv and all its dependencies\n\nOn **WSL2**, you might see it stuck with 100% disk usage and never finished. See [below](#wsl-workaround).\n\nThe final `build64` folder's size will be around ~3GB.\n\n## Building Software (Second Time)\n\nTo build mpv for a second time:\n\n    ninja update # perform git pull on all packages that used git\n\nAfter that, build mpv as usual:\n\n    ninja mpv\n\n## Compiling with Clang\n\nSupported target architecture (`TARGET_ARCH`) with clang is: `x86_64-w64-mingw32` , `i686-w64-mingw32` , `aarch64-w64-mingw32`. The `aarch64` are untested.\n\nExample:\n\n    cmake -DTARGET_ARCH=x86_64-w64-mingw32 \\\n    -DCMAKE_INSTALL_PREFIX=\"/home/user/clang_root\" \\\n    -DCOMPILER_TOOLCHAIN=clang \\\n    -DGCC_ARCH=x86-64-v3 \\\n    -DSINGLE_SOURCE_LOCATION=\"/home/user/packages\" \\\n    -DMINGW_INSTALL_PREFIX=\"/home/user/build_x86_64_v3/x86_64_v3-w64-mingw32\" \\\n    -G Ninja -B build_x86_64_v3 -S mpv-winbuild-cmake\n\nThe cmake command will create `clang_root` as clang sysroot where llvm tools installed. `build_x86_64` is build directory to compiling packages.\n\n    cd build_x86_64\n    ninja llvm       # build LLVM (take around ~2 hours)\n    ninja llvm-clang # build clang on specified target\n    ninja mpv        # build mpv and all its dependencies\n\nIf you want add another target (ex. `i686-w64-mingw32`), change `TARGET_ARCH` and build folder.\n\n    cmake -DTARGET_ARCH=i686-w64-mingw32 \\\n    -DCMAKE_INSTALL_PREFIX=\"/home/user/clang_root\" \\\n    -DCOMPILER_TOOLCHAIN=clang \\\n    -DSINGLE_SOURCE_LOCATION=\"/home/user/packages\" \\\n    -DMINGW_INSTALL_PREFIX=\"/home/user/build_i686/i686-w64-mingw32\" \\\n    -G Ninja -B build_i686 -S mpv-winbuild-cmake\n    cd build_i686\n    ninja llvm-clang # same as above\n\nIf you've changed `GCC_ARCH` option, you need to run:\n\n    ninja rebuild_cache\n\nto update flags which will pass on gcc, g++ and etc.\n\n## Available Commands\n\n| Commands                   | Description |\n| -------------------------- | ----------- |\n| ninja package              | compile a package |\n| ninja clean                | remove all stamp files in all packages. |\n| ninja download             | Download all packages' sources at once without compiling. |\n| 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. |\n| ninja package-fullclean    | Remove all stamp files of a package. |\n| 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. |\n| ninja package-removebuild  | Remove 'build' directory of a package. |\n| ninja package-removeprefix | Remove 'prefix' directory. |\n| ninja package-force-update | Update a package. Only git repo will be updated. |\n\n`package` is package's name found in `packages` folder.\n\n## Information about packages\n\n- Git/Hg\n    - ANGLE\n    - FFmpeg\n    - xz\n    - x264\n    - x265 (multilib)\n    - uchardet\n    - rubberband (with libsamplerate)\n    - opus\n    - openal-soft\n    - mpv\n    - luajit\n    - libvpx\n    - libwebp\n    - libpng\n    - libsoxr\n    - libzimg (with graphengine)\n    - libdvdread\n    - libdvdnav\n    - libdvdcss\n    - libudfread\n    - libbluray\n    - libunibreak\n    - libass\n    - libmysofa\n    - lcms2\n    - lame\n    - harfbuzz\n    - game-music-emu\n    - freetype2\n    - flac\n    - opus-tools\n    - mujs\n    - libarchive\n    - libjpeg\n    - shaderc (with spirv-headers, spirv-tools, glslang)\n    - vulkan-header\n    - vulkan\n    - spirv-cross\n    - fribidi\n    - ~~nettle~~\n    - curl\n    - libxml2\n    - amf-headers\n    - avisynth-headers\n    - nvcodec-headers\n    - libvpl\n    - megasdk (with termcap, readline, cryptopp, sqlite, libuv, libsodium)\n    - aom\n    - dav1d\n    - libplacebo (with glad, fast_float, xxhash)\n    - fontconfig\n    - libbs2b\n    - libssh\n    - libsrt\n    - libjxl (with brotli, highway)\n    - libmodplug\n    - uavs3d\n    - davs2\n    - libsixel\n    - libva\n    - libzvbi\n    - svtav1\n    - libaribcaption\n    - zlib (zlib-ng)\n    - zstd\n    - expat\n    - openssl\n    - libsdl2\n    - speex\n    - vorbis\n    - ogg\n    - bzip2\n\n- Zip\n    - xvidcore (1.3.7)\n    - lzo (2.10)\n    - libopenmpt (0.7.12)\n    - libiconv (1.18)\n    - ~~gmp (6.3.0)~~\n    - vapoursynth (R65/R63)\n    - ~~mbedtls (3.5.0)~~\n    - ~~libressl (3.1.5)~~\n\n\n### WSL workaround\n\nPlace the file on specified location to limit ram \u0026 cpu usage to avoid getting stuck while building mpv.\n\n    # /etc/wsl.conf\n    [interop]\n    #enabled=false\n    appendWindowsPath=false\n\n    [automount]\n    enabled = true\n    options = \"metadata\"\n    mountFsTab = false\n\n    [user]\n    default=\u003cuser\u003e\n    ---------------------------------------\n    # C:\\Users\\\u003cUserName\u003e\\.wslconfig\n    [wsl2]\n    memory=4GB\n    swap=0\n    pageReporting=false\n\n## Acknowledgements\n\nThis project was originally created and maintained [lachs0r](https://github.com/lachs0r/mingw-w64-cmake). Since then, it heavily modified to suit my own need.\n\n## Removed\n\n* video encoders:\n    * libvpx\n    * x265\n    * aom\n    * xvidcore\n* vapoursynth\n* libjxl\n* libwebp\n* libsdl2\n* libvorbis\n* openal-soft\n* libmodplug\n* mbedtls\n* libssh\n* libsrt\n* nettle\n* fontconfig\n* uavs3d\n* davs2\n* libopenmpt\n* lame\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmyfreeer%2Fmpv-build-lite","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmyfreeer%2Fmpv-build-lite","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmyfreeer%2Fmpv-build-lite/lists"}