/SwiftFFmpeg

A Swift wrapper for the FFmpeg API

Primary LanguageSwiftApache License 2.0Apache-2.0

SwiftFFmpeg

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.

FFmpeg Sources

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.

Swift Package Manager

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")
]

Documentation

Examples

For specific examples such as decoding, encoding, scaling, etc, check out the SwiftFFmpegExamples project in this package.