Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kewlbear/ffmpeg-ios
Swift package of FFmpeg libraries for iOS
https://github.com/kewlbear/ffmpeg-ios
ffmpeg ios swift swiftpm
Last synced: 20 days ago
JSON representation
Swift package of FFmpeg libraries for iOS
- Host: GitHub
- URL: https://github.com/kewlbear/ffmpeg-ios
- Owner: kewlbear
- Created: 2020-11-13T04:50:08.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2023-04-16T12:35:23.000Z (over 1 year ago)
- Last Synced: 2024-10-12T00:34:13.033Z (about 1 month ago)
- Topics: ffmpeg, ios, swift, swiftpm
- Language: Swift
- Homepage:
- Size: 89.9 MB
- Stars: 226
- Watchers: 4
- Forks: 55
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: COPYING.LGPLv2.1
Awesome Lists containing this project
README
# FFmpeg-iOS
This Swift package enables you to use FFmpeg libraries in your iOS, Mac Catalyst and tvOS apps.
## Installation
```
.package(url: "https://github.com/kewlbear/FFmpeg-iOS.git", from: "0.0.6-b")
```## Usage
```
import FFmpegSupportffmpeg(["ffmpeg", "-i", "in.webm", "out.mp4"])
```See https://github.com/kewlbear/YoutubeDL-iOS.
## Building Libraries
You can install build tool
### [Mint](https://github.com/yonaskolb/mint)
```
$ mint install kewlbear/FFmpeg-iOS
```or run from source.
### Swift Package Manager
```
git clone https://github.com/kewlbear/FFmpeg-iOS.git
cd FFmpeg-iOS
```You should omit "swift run" from following commands if you installed build tool.
To download FFmpeg source and build .xcframeworks:
```
$ swift run ffmpeg-ios
```To build fat libraries:
```
$ swift run ffmpeg-ios --disable-xcframework
```To download x264 source and build fat libraries:
```
$ swift run ffmpeg-ios x264 --disable-xcframework
```For other usages:
```
$ swift run ffmpeg-ios -h
OVERVIEW: Build FFmpeg libraries for iOS as xcframeworksUSAGE: ffmpeg-ios
OPTIONS:
-h, --help Show help information.SUBCOMMANDS:
build (default) Build framework module
framework Create .xcframework
module Enable modules to allow import from Swift
fat Create fat library
dep Install build dependency
source Download library source codeSee 'ffmpeg-ios help ' for detailed help.
$ swift run ffmpeg-ios build -h
OVERVIEW: Build framework moduleUSAGE: ffmpeg-ios build
ARGUMENTS:
ffmpeg, fdk-aac, lame or x264 (default: ffmpeg)OPTIONS:
--enable-libfdk-aac enable AAC de/encoding via libfdk-aac
--enable-libx264 enable H.264 encoding via x264
--enable-libmp3lame enable MP3 encoding via libmp3lame
--disable-xcframework Create fat library instead of .xcframework
--disable-module
--source-directory
Library source directory (default: ./)
--build-directory
directory to contain build artifacts (default: ./build)
--arch architectures to include (default: arm64, x86_64)
--library libraries to include (default: avcodec, avdevice, avfilter, avformat, avutil, swresample, swscale)
--deployment-target
(default: 12.0)
--extra-options
additional options for configure script
--release FFmpeg release (default: snapshot)
--url
--frameworks
(default: ./Frameworks)
--output default: -fat
--fdk-aac-source
(default: ./fdk-aac-2.0.1)
--x264-source
(default: ./x264-master)
--lame-source
(default: ./lame-3.100)
-h, --help Show help information.$
```
## LicenseLGPL v2.1+