This is a fork of MPVKit with AVFoundation video output (vo_avfoundation) support for iOS.
Special thanks to the MPVKit team for creating and maintaining the original project that makes it possible to use libmpv on Apple platforms. This fork builds upon their excellent work.
Original project forked from kingslay/FFmpegKit.
This fork includes the vo_avfoundation video output driver, which:
- Renders video directly to
AVSampleBufferDisplayLayer - Enables Picture-in-Picture (PiP) support on iOS
- Uses hardware-accelerated VideoToolbox decoding
- Supports composite OSD for subtitle rendering in PiP
I'm doing this out of the goodness of my heart! If you find this project useful, please consider:
- ⭐ Starring this repository
- 👤 Following me on GitHub (@Alexk2309)
Your support helps me continue maintaining and improving this project. Thank you! 🙏
This fork is licensed under GPL v3.0.
This build uses the GPL-licensed components including samba protocol support and other GPL libraries. By using this fork, you agree to the terms of the GPL v3.0 license.
See LICENSE for full details.
Add to your Package.swift:
dependencies: [
.package(url: "https://github.com/Alexk2309/MPVKit.git", from: "0.40.0-av")
]Or use Xcode: File → Add Package Dependencies → Enter https://github.com/Alexk2309/MPVKit.git → Select version 0.40.0-av or later.
Add to your Podfile:
pod 'MPVKit-GPL', :git => 'https://github.com/Alexk2309/MPVKit.git', :tag => '0.40.0-av'Then run:
pod installimport Libmpvmake build
# specified platforms (ios,tvos,tvsimulator,isimulator)
make build platform=ios,tvos
# build GPL version
make build enable-gpl
# clean all build temp files and cache
make clean
# see help
make helpIf you want the demo app to use the local build version, you need to modify Package.swift to reference the local build xcframework file.
Click here for more information.
.binaryTarget(
name: "Libmpv-GPL",
path: "dist/release/Libmpv.xcframework.zip"
),
.binaryTarget(
name: "Libavcodec-GPL",
path: "dist/release/Libavcodec.xcframework.zip"
),
.binaryTarget(
name: "Libavdevice-GPL",
path: "dist/release/Libavdevice.xcframework.zip"
),
.binaryTarget(
name: "Libavformat-GPL",
path: "dist/release/Libavformat.xcframework.zip"
),
.binaryTarget(
name: "Libavfilter-GPL",
path: "dist/release/Libavfilter.xcframework.zip"
),
.binaryTarget(
name: "Libavutil-GPL",
path: "dist/release/Libavutil.xcframework.zip"
),
.binaryTarget(
name: "Libswresample-GPL",
path: "dist/release/Libswresample.xcframework.zip"
),
.binaryTarget(
name: "Libswscale-GPL",
path: "dist/release/Libswscale.xcframework.zip"
),
./mpv.sh --input-commands='script-message display-stats-toggle' [url]
./mpv.sh --list-optionsUse Shift+i to show stats overlay