5

I wanted to use FFMpeg library for video processing activities, from 2 days I m working on compiling and integrating this library with Xcode 8 and Swift. I tried following links but with no success. Can anyone please help me how to achieve this?

FFMPEG integration on iphone/ ipad project

https://github.com/chrisballinger/FFmpeg-iOS

http://witcheryne.iteye.com/blog/1734706

How to Build FFMpeg as iOS Framework

https://github.com/ElfSundae/FFmpeg-iOS-build

https://github.com/kolyvan/kxmovie

Community
  • 1
  • 1
Akshaykumar Maldhure
  • 1,239
  • 1
  • 18
  • 32

1 Answers1

16

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")
Amir Khorsandi
  • 3,542
  • 1
  • 34
  • 38