{"id":28398997,"url":"https://github.com/media-kit/libmpv-darwin-build","last_synced_at":"2025-10-13T18:14:29.379Z","repository":{"id":143500639,"uuid":"608699544","full_name":"media-kit/libmpv-darwin-build","owner":"media-kit","description":"libmpv for macOS \u0026 iOS.","archived":false,"fork":false,"pushed_at":"2024-12-12T21:34:50.000Z","size":232,"stargazers_count":44,"open_issues_count":5,"forks_count":24,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-06-28T18:43:01.739Z","etag":null,"topics":["build","ffmpeg","freetype","fribidi","harfbuzz","ios","libass","libmpv","libressl","macos","mpv","uchardet"],"latest_commit_sha":null,"homepage":"","language":"Nix","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/media-kit.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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}},"created_at":"2023-03-02T15:01:41.000Z","updated_at":"2025-05-16T11:42:22.000Z","dependencies_parsed_at":"2024-12-12T22:27:38.615Z","dependency_job_id":"5a16db4c-1efa-43c5-98a1-b6d7a6831f4c","html_url":"https://github.com/media-kit/libmpv-darwin-build","commit_stats":{"total_commits":170,"total_committers":4,"mean_commits":42.5,"dds":0.06470588235294117,"last_synced_commit":"ca4e7f93579e65b99fba67e93dc7d9bb6bef4180"},"previous_names":["birros/libmpv-build"],"tags_count":22,"template":false,"template_full_name":null,"purl":"pkg:github/media-kit/libmpv-darwin-build","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/media-kit%2Flibmpv-darwin-build","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/media-kit%2Flibmpv-darwin-build/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/media-kit%2Flibmpv-darwin-build/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/media-kit%2Flibmpv-darwin-build/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/media-kit","download_url":"https://codeload.github.com/media-kit/libmpv-darwin-build/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/media-kit%2Flibmpv-darwin-build/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279016571,"owners_count":26085850,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-13T02:00:06.723Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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","ffmpeg","freetype","fribidi","harfbuzz","ios","libass","libmpv","libressl","macos","mpv","uchardet"],"created_at":"2025-06-01T06:38:44.036Z","updated_at":"2025-10-13T18:14:29.370Z","avatar_url":"https://github.com/media-kit.png","language":"Nix","funding_links":[],"categories":[],"sub_categories":[],"readme":"# libmpv build\n\nProvides builds of [libmpv](https://github.com/mpv-player/mpv) for macOS \u0026 iOS,\nused by [media_kit](https://github.com/alexmercerind/media_kit), compatible\nwith commercial use for playback, and GPL use for encoding.\n\nHeavily inspired by [Homebrew](https://github.com/Homebrew/brew) and\n[IINA](https://github.com/iina/iina).\n\n## Setup\n\n- Nix: [nixos.org/download/#nix-install-macos](https://nixos.org/download/#nix-install-macos)\n- Xcode: [./nix/overlays/xcode.md#how-to-store-xcode-and-prevent-to-be-garbage-collected](./nix/overlays/xcode.md#how-to-store-xcode-and-prevent-to-be-garbage-collected)\n\n## Build\n\n```shell\n$ echo \\\"v0.0.1\\\" \u003e nix/utils/default/version.nix\n$ nix build -v\n$ tree result\n```\n\n\u003cdetails\u003e\n\u003csummary\u003eresult\u003c/summary\u003e\n\n```shell\n├── libmpv-libs_v0.0.1_ios-arm64-audio-default.tar.gz\n├── libmpv-libs_v0.0.1_ios-arm64-audio-encodersgpl.tar.gz\n├── libmpv-libs_v0.0.1_ios-arm64-audio-full.tar.gz\n├── libmpv-libs_v0.0.1_ios-arm64-video-default.tar.gz\n├── libmpv-libs_v0.0.1_ios-arm64-video-encodersgpl.tar.gz\n├── libmpv-libs_v0.0.1_ios-arm64-video-full.tar.gz\n├── libmpv-libs_v0.0.1_iossimulator-amd64-audio-default.tar.gz\n├── libmpv-libs_v0.0.1_iossimulator-amd64-audio-encodersgpl.tar.gz\n├── libmpv-libs_v0.0.1_iossimulator-amd64-audio-full.tar.gz\n├── libmpv-libs_v0.0.1_iossimulator-amd64-video-default.tar.gz\n├── libmpv-libs_v0.0.1_iossimulator-amd64-video-encodersgpl.tar.gz\n├── libmpv-libs_v0.0.1_iossimulator-amd64-video-full.tar.gz\n├── libmpv-libs_v0.0.1_iossimulator-arm64-audio-default.tar.gz\n├── libmpv-libs_v0.0.1_iossimulator-arm64-audio-encodersgpl.tar.gz\n├── libmpv-libs_v0.0.1_iossimulator-arm64-audio-full.tar.gz\n├── libmpv-libs_v0.0.1_iossimulator-arm64-video-default.tar.gz\n├── libmpv-libs_v0.0.1_iossimulator-arm64-video-encodersgpl.tar.gz\n├── libmpv-libs_v0.0.1_iossimulator-arm64-video-full.tar.gz\n├── libmpv-libs_v0.0.1_iossimulator-universal-audio-default.tar.gz\n├── libmpv-libs_v0.0.1_iossimulator-universal-audio-encodersgpl.tar.gz\n├── libmpv-libs_v0.0.1_iossimulator-universal-audio-full.tar.gz\n├── libmpv-libs_v0.0.1_iossimulator-universal-video-default.tar.gz\n├── libmpv-libs_v0.0.1_iossimulator-universal-video-encodersgpl.tar.gz\n├── libmpv-libs_v0.0.1_iossimulator-universal-video-full.tar.gz\n├── libmpv-libs_v0.0.1_macos-amd64-audio-default.tar.gz\n├── libmpv-libs_v0.0.1_macos-amd64-audio-encodersgpl.tar.gz\n├── libmpv-libs_v0.0.1_macos-amd64-audio-full.tar.gz\n├── libmpv-libs_v0.0.1_macos-amd64-video-default.tar.gz\n├── libmpv-libs_v0.0.1_macos-amd64-video-encodersgpl.tar.gz\n├── libmpv-libs_v0.0.1_macos-amd64-video-full.tar.gz\n├── libmpv-libs_v0.0.1_macos-arm64-audio-default.tar.gz\n├── libmpv-libs_v0.0.1_macos-arm64-audio-encodersgpl.tar.gz\n├── libmpv-libs_v0.0.1_macos-arm64-audio-full.tar.gz\n├── libmpv-libs_v0.0.1_macos-arm64-video-default.tar.gz\n├── libmpv-libs_v0.0.1_macos-arm64-video-encodersgpl.tar.gz\n├── libmpv-libs_v0.0.1_macos-arm64-video-full.tar.gz\n├── libmpv-libs_v0.0.1_macos-universal-audio-default.tar.gz\n├── libmpv-libs_v0.0.1_macos-universal-audio-encodersgpl.tar.gz\n├── libmpv-libs_v0.0.1_macos-universal-audio-full.tar.gz\n├── libmpv-libs_v0.0.1_macos-universal-video-default.tar.gz\n├── libmpv-libs_v0.0.1_macos-universal-video-encodersgpl.tar.gz\n├── libmpv-libs_v0.0.1_macos-universal-video-full.tar.gz\n├── libmpv-xcframeworks_v0.0.1_ios-universal-audio-default.tar.gz\n├── libmpv-xcframeworks_v0.0.1_ios-universal-audio-encodersgpl.tar.gz\n├── libmpv-xcframeworks_v0.0.1_ios-universal-audio-full.tar.gz\n├── libmpv-xcframeworks_v0.0.1_ios-universal-video-default.tar.gz\n├── libmpv-xcframeworks_v0.0.1_ios-universal-video-encodersgpl.tar.gz\n├── libmpv-xcframeworks_v0.0.1_ios-universal-video-full.tar.gz\n├── libmpv-xcframeworks_v0.0.1_macos-universal-audio-default.tar.gz\n├── libmpv-xcframeworks_v0.0.1_macos-universal-audio-encodersgpl.tar.gz\n├── libmpv-xcframeworks_v0.0.1_macos-universal-audio-full.tar.gz\n├── libmpv-xcframeworks_v0.0.1_macos-universal-video-default.tar.gz\n├── libmpv-xcframeworks_v0.0.1_macos-universal-video-encodersgpl.tar.gz\n└── libmpv-xcframeworks_v0.0.1_macos-universal-video-full.tar.gz\n```\n\u003c/details\u003e\n\n## Build a specific target\n\n```shell\n$ nix flake show\n$ nix build -v .#mk-out-archive-libs-macos-universal-video-default\n$ open result\n```\n\n## Naming convention\n\n```\nlibmpv-\u003cformat\u003e_\u003cversion\u003e_\u003cos\u003e-\u003carch\u003e-\u003cvariant\u003e-\u003cflavor\u003e.tar.gz\n```\n\n| Component   | Notes                           | Value                      |\n| ----------- | ------------------------------- | -------------------------- |\n| **format**  | Output format of built files    | libs, xcframeworks         |\n| **version** | Semantic version                | v0.0.1, …                  |\n| **os**      | Operating system                | ios, iossimulator, macos   |\n| **arch**    | Architecture                    | arm64, amd64, universal    |\n| **variant** | Usage context                   | audio, video               |\n| **flavor**  | Available decoders and encoders | default, full, encodersgpl |\n\nInclusion:\n\n- Variants: $audio \\subset video$\n- Flavors: $audio \\subset full \\subset encodersgpl$\n\n## Minimum versions\n\n\u003ctable\u003e\n  \u003cthead\u003e\n    \u003ctr\u003e\n      \u003cth\u003ePlatform\u003c/th\u003e\n      \u003cth\u003eArch\u003c/th\u003e\n      \u003cth\u003eMin Version\u003c/th\u003e\n      \u003cth\u003eNotes\u003c/th\u003e\n    \u003c/tr\u003e\n  \u003c/thead\u003e\n  \u003ctbody\u003e\n    \u003ctr\u003e\n      \u003ctd rowspan=\"2\"\u003e\u003cstrong\u003emacOS\u003c/strong\u003e\u003c/td\u003e\n      \u003ctd\u003eamd64\u003c/td\u003e\n      \u003ctd rowspan=\"2\"\u003e\u003ccode\u003e10.9\u003c/code\u003e\u003c/td\u003e\n      \u003ctd rowspan=\"2\"\u003eRequired by \u003ccode\u003euchardet\u003c/code\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003earm64\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003cstrong\u003eiOS\u003c/strong\u003e\u003c/td\u003e\n      \u003ctd\u003earm64\u003c/td\u003e\n      \u003ctd\u003e\u003ccode\u003e9.0\u003c/code\u003e\u003c/td\u003e\n      \u003ctd\u003eRequired by \u003ccode\u003effmpeg\u003c/code\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd rowspan=\"2\"\u003e\u003cstrong\u003eiOS Simulator\u003c/strong\u003e\u003c/td\u003e\n      \u003ctd\u003eamd64\u003c/td\u003e\n      \u003ctd\u003e\u003ccode\u003e9.0\u003c/code\u003e\u003c/td\u003e\n      \u003ctd\u003eRequired by \u003ccode\u003effmpeg\u003c/code\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003earm64\u003c/td\u003e\n      \u003ctd\u003e\u003ccode\u003e12.0\u003c/code\u003e\u003c/td\u003e\n      \u003ctd\u003eRequired by \u003ccode\u003excodebuild -create-xcframework\u003c/code\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/tbody\u003e\n\u003c/table\u003e\n\n## Dependencies\n\n```mermaid\nflowchart LR\n    subgraph legend[Legend]\n        direction TB\n        subgraph links\n            Q(node):::decoders -- \"required\" --\u003e R(node):::decoders\n            S(node):::decoders -. \"optional\" .-\u003e T(node):::decoders\n        end\n\n        subgraph variants\n            U(audio \u0026 video):::decoders\n            V{{video only}}:::decoders\n        end\n\n        subgraph flavors\n            W(default, full):::decoders\n            X(encodersgpl):::encoders\n        end\n    end\n\n    subgraph content[ ]\n        direction LR\n        A(mpv):::decoders -.-\u003e B{{uchardet}}:::decoders\n        A                 -.-\u003e C{{libass}}:::decoders\n        A                 --\u003e  D(ffmpeg):::decoders\n\n        E(fftools-ffi):::encoders --\u003e D\n\n        %% libass\n        G -.-\u003e F{{libpng}}:::decoders\n        C --\u003e  G{{freetype}}:::decoders\n        C --\u003e  H{{fribidi}}:::decoders\n        C --\u003e  I{{harfbuzz}}:::decoders\n        G -.-\u003e I\n\n        %% ffmpeg\n        D -.-\u003e J(mbedtls):::decoders\n        D -.-\u003e K{{dav1d}}:::decoders\n        D -.-\u003e L{{libxml2}}:::decoders\n        D -.-\u003e M(libvorbis):::encoders\n        D -.-\u003e N{{libvpx}}:::encoders\n        D -.-\u003e O{{libx264}}:::encoders\n        M --\u003e  P(libogg):::encoders\n    end\n\n    classDef decoders stroke:#888\n    classDef encoders stroke:#14a,stroke-width:3px\n    classDef legend fill:transparent,stroke:#8882\n    classDef content fill:transparent,stroke:transparent\n    classDef card fill:transparent,stroke:#888a\n\n    legend:::legend\n    content:::content\n    links:::card\n    variants:::card\n    flavors:::card\n```\n\n- [**mpv**](https://github.com/mpv-player/mpv): A free (as in freedom) media\n  player for the command line. It supports a wide variety of media file formats,\n  audio and video codecs, and subtitle types\n\n- [**ffmpeg**](https://ffmpeg.org): A cross-platform solution for converting,\n  streaming, and recording audio and video, with support for a wide range of\n  codecs and formats\n\n- [**fftools-ffi**](https://github.com/moffatman/fftools-ffi): FFmpeg's\n  command-line interface exposed as a shared library for FFI usage\n\n- [**libass**](https://github.com/libass/libass): A library for rendering\n  subtitles in videos, with support for advanced text formatting and positioning\n  features (made optional with a patch)\n\n- [**fribidi**](https://github.com/fribidi/fribidi): A library for handling\n  bidirectional text (such as Arabic or Hebrew) in Unicode strings, with support\n  for complex shaping and layout\n\n- [**freetype**](https://sourceforge.net/projects/freetype/): A library for\n  rendering high-quality text in graphics applications, with support for a wide\n  range of font formats and glyph rendering techniques\n\n- [**harfbuzz**](https://github.com/harfbuzz/harfbuzz): A library for shaping\n  and laying out text in multiple languages and scripts, with support for\n  advanced typography features such as ligatures and kerning\n\n- [**libpng**](https://github.com/pnggroup/libpng): A library for reading and\n  writing PNG (Portable Network Graphics) images, providing efficient image\n  compression and lossless data handling\n\n- [**dav1d**](https://code.videolan.org/videolan/dav1d): A library for\n  cross-platform AV1 decoding\n\n- [**libogg**](https://github.com/xiph/ogg): Reference implementation of the Ogg\n  media container\n\n- [**libvorbis**](https://github.com/xiph/vorbis): Reference implementation of\n  the Ogg Vorbis audio format\n\n- [**libvpx**](https://gitlab.freedesktop.org/gstreamer/meson-ports/libvpx):\n  Reference implementation of the VP8 and VP9 video formats\n\n- [**libx264**](https://www.videolan.org/developers/x264.html): Free software\n  library for encoding video streams into the H.264/MPEG-4 AVC compression\n  format\n\n- [**mbedtls**](https://www.libressl.org/): An open source, portable, easy to\n  use, readable and flexible TLS library\n\n- [**libxml2**](http://xmlsoft.org/): A library for processing XML data, used by\n  ffmpeg to support the Dash protocol\n\n- [**uchardet**](https://www.freedesktop.org/wiki/Software/uchardet/): A C++\n  port of the Universal Character Encoding Detector (used by Mozilla Firefox\n  and Thunderbird) for detecting the encoding of input text\n\n## Commercial use\n\n### Default, Full flavors\n\n| Dependency | Licence                                                | Commercial use |\n| ---------- | ------------------------------------------------------ | :------------: |\n| mpv        | LGPL-2.1 (`-Dgpl=false`)                               |       ✅       |\n| ffmpeg     | LGPL-2.1 (`--enable-gpl` \u0026 `--enable-nonfree` omitted) |       ✅       |\n| libass     | ISC                                                    |       ✅       |\n| freetype   | FreeType                                               |       ✅       |\n| harfbuzz   | MIT                                                    |       ✅       |\n| fribidi    | LGPL-2.1                                               |       ✅       |\n| libpng     | zlib/libpng                                            |       ✅       |\n| mbedtls    | Apache 2.0                                             |       ✅       |\n| uchardet   | MPL-1.1, GPL-2, LGPL-2.1                               |       ✅       |\n| libxml2    | MIT                                                    |       ✅       |\n| dav1d      | BSD-2-clause                                           |       ✅       |\n\n### Encoders-GPL flavor\n\n| Dependency  | Licence                              | Commercial use |\n| ----------- | ------------------------------------ | :------------: |\n| mpv         | LGPL-2.1 (`-Dgpl=false`)             |       ✅       |\n| ffmpeg      | GPL-2.1 (`--enable-nonfree` omitted) |       ❌       |\n| libass      | ISC                                  |       ✅       |\n| freetype    | FreeType                             |       ✅       |\n| harfbuzz    | MIT                                  |       ✅       |\n| fribidi     | LGPL-2.1                             |       ✅       |\n| libpng     | zlib/libpng                           |       ✅       |\n| mbedtls     | Apache 2.0                           |       ✅       |\n| uchardet    | MPL-1.1, GPL-2, LGPL-2.1             |       ✅       |\n| libxml2     | MIT                                  |       ✅       |\n| dav1d       | BSD-2-clause                         |       ✅       |\n| fftools-ffi | LGPL-2.1                             |       ✅       |\n| libx264     | GPL-2.0+                             |       ❌       |\n| libvpx      | BSD-3-clause                         |       ✅       |\n| libvorbis   | BSD-3-clause                         |       ✅       |\n| libogg      | BSD-3-clause                         |       ✅       |\n\n## Notes\n\n- Some dependencies, which are not needed at the moment, may be added in the\n  future:\n\n  - [**libbluray**](https://code.videolan.org/videolan/libbluray): A library for\n    reading and parsing Blu-ray discs, with support for advanced features such\n    as BD-J menus and seamless branching\n\n  - [**libarchive**](https://github.com/libarchive/libarchive): A library for\n    reading various archive formats, including tar and zip, with support for\n    compression and metadata, and a flexible API for reading and extracting\n    archive contents\n\n- We use `meson` as much as possible in order to simplify cross-compilation, at\n  the cost of some heaviness regarding legacy packages\n\n## How the libass optional patch was created\n\nAs the dependency of mpv on libass is deeply embedded in the code, the simplest\nsolution was to:\n\n1. Remove the dynamic linking in `meson.build`.\n2. Include the `ass/ass.h` and `ass/ass_types.h` headers directly in the code\n3. Remove the call to `ass_library_version` in `player/command.c`\n4. Remove the calls to `ass_library_init`, called by `mp_ass_init`, in\n   `sub/osd_libass.c` and `sub/sd_ass.c`\n\n## Resources\n\n- https://github.com/stps/mpv-ios-scripts\n- https://github.com/iina/homebrew-mpv-iina\n- https://github.com/mpv-android/mpv-android\n- https://github.com/jnozsc/mpv-nightly-build\n- https://github.com/smplayer-dev/mpv\n- https://github.com/smplayer-dev/smplayer\n- https://github.com/ldwardx/mpv-build-mac-iOS\n- https://github.com/birros/godot_tl/tree/ca2fc4151bd8141241151dd6e29768608600473a/toolchains\n- https://github.com/Vargol/ffmpeg-apple-arm64-build\n- https://github.com/arthenica/ffmpeg-kit\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmedia-kit%2Flibmpv-darwin-build","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmedia-kit%2Flibmpv-darwin-build","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmedia-kit%2Flibmpv-darwin-build/lists"}