A Swift wrapper for the FFmpeg API.
Note: SwiftFFmpeg is still in development, and the API is not guaranteed to be stable. It's subject to change without warning.
This fork relies on a multiplatform (iOS, macOS, & tvOS) prebuilt FFmpeg xcframework binary from the FFmpegKit SPM repo. The linked binaries do not include any GPL sources and are LGPL compatible.
If you'd like to use your own FFmpeg binaries, check out the upstream repository for instructions.
SwiftFFmpeg primarily uses SwiftPM as its build tool, so we recommend using that as well. If you want to depend on SwiftFFmpeg in your own project, it's as simple as adding a dependencies
clause to your Package.swift
:
dependencies: [
.package(url: "https://github.com/tylerjonesio/SwiftFFmpeg.git", from: "5.1.2")
]
For specific examples such as decoding, encoding, scaling, etc, check out the SwiftFFmpegExamples project in this package.