Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use ffmpeg on iOS?

I have to use the following command for ffmpeg

ffmpeg -i "Video.mp4" -map 0:1 "AudioWithVocalfromStreamOne.mp3" -map 0:2 "AudioWithoutVocalfromStreamTwo.mp3"

I have successfully installed ffmpeg on my mac. I tried using FFMPEGWrapper, but it doesn't seem to take any such parameters for using "map".

I need to know how to extract the streams from a video. I already have access to the streams, as server side is providing it to me using ffprobe at their end.

like image 223
AjinkyaSharma Avatar asked Nov 08 '22 21:11

AjinkyaSharma


1 Answers

Best method of using FFMpeg for IOS is the MobileFFMpeg Library.

Here is the source: https://github.com/tanersener/mobile-ffmpeg
superseded by FFmpegKit – https://github.com/tanersener/ffmpeg-kit

Thanks to https://stackoverflow.com/users/236757/user237419

It is available as a pod
iOS
pod 'ffmpeg-kit-ios-full', '~> 4.5.1'
macOS
pod 'ffmpeg-kit-macos-full', '~> 4.5.1'
tvOS
pod 'ffmpeg-kit-tvos-full', '~> 4.5.1'

Make sure to get appropriate FFMpeg license. Different licenses have different libs

License to choose from:
min
min-gpl
https
https-gpl
audio
video
full
full-gpl

like image 198
Shakir Zareen Avatar answered Nov 15 '22 10:11

Shakir Zareen