• Stars
    star
    144
  • Rank 255,590 (Top 6 %)
  • Language
    Swift
  • Created about 4 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Swift package of FFmpeg libraries for iOS

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 FFmpegSupport

ffmpeg(["ffmpeg", "-i", "in.webm", "out.mp4"])

See https://github.com/kewlbear/YoutubeDL-iOS.

Building Libraries

You can install build tool

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 xcframeworks

USAGE: ffmpeg-ios <subcommand>

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 code

 See 'ffmpeg-ios help <subcommand>' for detailed help.
 $ swift run ffmpeg-ios build -h
 OVERVIEW: Build framework module

 USAGE: ffmpeg-ios build <options>

 ARGUMENTS:
   <lib>                   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 <source-directory>
                           Library source directory (default: ./<lib>) 
   --build-directory <build-directory>
                           directory to contain build artifacts (default: ./build)
   --arch <arch>           architectures to include (default: arm64, x86_64)
   --library <library>     libraries to include (default: avcodec, avdevice, avfilter, avformat, avutil, swresample, swscale)
   --deployment-target <deployment-target>
                           (default: 12.0)
   --extra-options <extra-options>
                           additional options for configure script 
   --release <release>     FFmpeg release (default: snapshot)
   --url <url>
   --frameworks <frameworks>
                           (default: ./Frameworks)
   --output <output>       default: <lib>-fat 
   --fdk-aac-source <fdk-aac-source>
                           (default: ./fdk-aac-2.0.1)
   --x264-source <x264-source>
                           (default: ./x264-master)
   --lame-source <lame-source>
                           (default: ./lame-3.100)
   -h, --help              Show help information.

$

License

LGPL v2.1+

More Repositories

1

FFmpeg-iOS-build-script

Shell scripts to build FFmpeg for iOS and tvOS
Shell
2,965
star
2

lame-ios-build

script to build lame for iOS
Shell
267
star
3

x264-ios

Script to build x264 for iOS apps
Shell
207
star
4

YoutubeDL

An iOS app using youtube-dl Python module with PythonKit Swift package
Swift
134
star
5

fdk-aac-build-script-for-iOS

Shell script to build fdk-aac for use in iOS apps.
Shell
94
star
6

YoutubeDL-iOS

Swift package of youtube_dl python module for iOS
Swift
71
star
7

Python-iOS

Swift package to use python modules in iOS apps
Makefile
69
star
8

Open3D-iOS

Swift package for using Open3D in iOS apps
Python
47
star
9

OpenClien

클리앙 (http://clien.net) 비공식 iOS 라이브러리
Objective-C
29
star
10

NumPy-iOS

Swift package for using NumPy in iOS apps
Python
22
star
11

PythonPlayground

iOS app demonstrating Swift packages Python-iOS and PythonKit
Python
15
star
12

nodejs-ios

Swift package to enable use of Node.js on iOS apps
C
13
star
13

DSMKit

Swift library for Synology DSM APIs
Swift
6
star
14

TensorFlowLiteSwift

Swift
5
star
15

FFmpeg-iOS-Lame

Swift
5
star
16

PythonSupport

Swift package supporting Python in iOS apps
Python
5
star
17

TensorFlowLiteC

Swift
4
star
18

NodeBridge

Swift package of a simple bridge between Node.js and Swift.
Swift
3
star
19

clang-on-ios

Scripts to build clang for iOS host
Shell
3
star
20

XMLDocument

An implementation of XML Document from Foundation for iOS
Swift
2
star
21

Inssagram

Instagram-like iOS app.
Swift
2
star
22

opencv

Swift
1
star
23

NodeDecoder

Swift package of a decoder for Node.js values.
Swift
1
star
24

kewlbear

1
star
25

Open3D-ObjC--Example

Objective-C
1
star