Skip to content

streamyfin/MPVKit

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MPVKit (AVFoundation Fork)

mpv ffmpeg license

This is a fork of MPVKit with AVFoundation video output (vo_avfoundation) support for iOS.

Acknowledgments

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.

What's Different in This Fork?

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

⭐ Support This Project

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! 🙏

License

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.


Installation

Swift Package Manager

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.

CocoaPods

Add to your Podfile:

pod 'MPVKit-GPL', :git => 'https://github.com/Alexk2309/MPVKit.git', :tag => '0.40.0-av'

Then run:

pod install

Usage

import Libmpv

How to Build

make 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 help

Make Demo App Using the Local Build Version

If 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"
),

Run Default mpv Player

./mpv.sh --input-commands='script-message display-stats-toggle' [url]
./mpv.sh --list-options

Use Shift+i to show stats overlay

Related Projects

About

mpv library for iOS, macOS, tvOS applications

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Swift 76.5%
  • Shell 21.0%
  • Ruby 1.8%
  • Makefile 0.7%