0

Assume I have an app for Android and the same app for iOS. In both cases, my app needs to use FFmpeg features. I decided to avoid calling libavcodec and libavformat directly. Instead, I'm going to implement this suggestion:

IMHO running ffmpeg in a separate process is a better idea, so your application won't be stuck while the lengthy process of video encoding goes.

What's the standard approach to run ffmpeg in a separate process on each platform? What's the standard way to communicate with it?

Megidd
  • 7,089
  • 6
  • 65
  • 142
  • 1
    I think for Android, the best approach now are Coroutines. – Eduardo Fernandes Apr 04 '21 at 16:00
  • 1
    10 years later, it's a bad idea to run **ffmpeg** as separate process on Android, and it has never been a viable option on iOS. I suggest that you look at the [ffmpeg-kit](https://github.com/tanersener/ffmpeg-kit) library that wraps the ffmpeg in a library that can be used similar to the ffmpeg CLI for Android and iOS apps. – Alex Cohn Apr 04 '21 at 19:15
  • @AlexCohn Looks good =) the only drawback is that its API is in Objective-C, not Swift! – Megidd Apr 05 '21 at 01:57
  • 1
    I never heard of problems in calling Obj-C from Swift, but if you have, you can open an issue on GitHub. – Alex Cohn Apr 05 '21 at 07:33
  • are you looking for something like `service`? – Vivek Thummar Apr 16 '21 at 13:48

0 Answers0