How to integrate and use FFmpeg library in iOS with Xcode?

Viewed 9591
1 Answers

I've tried mobile-ffmpeg, and it works (swift 4.2 - Xcode 10.1)
installation is very easy by cocoapods pod 'mobile-ffmpeg-full-gpl', '~> 4.2'
you can use different binaries if you don't need all features, for example: pod 'mobile-ffmpeg-min', '~> 4.2' link

for using in swift you should add ProjectName-Bridging-Header.h to your project and then import the library in that: #import <mobileffmpeg/MobileFFmpeg.h>

you can run a command like this in swift (converting mkv to mp4):

MobileFFmpeg.execute("-i video.mkv -codec copy video.mp4")
Related