Mobile-ffmpeg: No method to observe command progress,success or failure

Created on 8 Jul 2020  路  5Comments  路  Source: tanersener/mobile-ffmpeg

Description
No method to set interface for getting callbacks of progress,success,failure when we execute a command.

Expected behavior
There should be some support for observing the command processing.

Environment

  • Platform: Android
  • Architecture: [arm-v7a, arm-v7a-neon, arm64-v8a, x86, x86_64, armv7, armv7s, arm64, i386, x86_64]
  • Version (if applicable) [e.g. v4.3.2]
question

Most helpful comment

execute API method in those projects is asynchronous. They're using async tasks inside. That's why they have a callback/handler.

MobileFFmpeg Android library has similar async task classes under the util package. They are not part of the API but you can use them if you want to run commands asynchronously. In the next MobileFFmpeg release, they will be included in the API as part of new async API methods.

To answer your question about API levels, MobileFFmpeg has two release variants. Main releases depends on API Level 24. However the LTS releases depend on API Level 16. So, if you want to use minSdkVersion 21, then install an LTS version.

All 5 comments

You can follow the progress using StatisticsCallback.

All MobileFFmpeg API calls are synchronous at the moment. This means that your thread is blocked until the execution is completed. Adding a callback there doesn't make sense. Can you show me an example from a library or framework where you can set a callback for a synchronous API call? Callback needs to include the same data that synchronous API call returns.

The syntax was almost similar to other FFmpeg libs that were having the callbacks. So, this question popped up in mind.
Thanks for clarity.

I guess those API methods are asynchronous. I can take a look if you share the names of those libraries.

https://github.com/bravobit/FFmpeg-Android
https://github.com/WritingMinds/ffmpeg-android-java

1st is fork of the 2nd one. So, we can consider them same.

These work with minSdkVersion 21 as well but mobile-ffmpeg required minSdkVersion 24. This is confusing me to either migrate to this lib or not. Because there is difference of 3 api levels. Can it made compatible with 21 somehow?

execute API method in those projects is asynchronous. They're using async tasks inside. That's why they have a callback/handler.

MobileFFmpeg Android library has similar async task classes under the util package. They are not part of the API but you can use them if you want to run commands asynchronously. In the next MobileFFmpeg release, they will be included in the API as part of new async API methods.

To answer your question about API levels, MobileFFmpeg has two release variants. Main releases depends on API Level 24. However the LTS releases depend on API Level 16. So, if you want to use minSdkVersion 21, then install an LTS version.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

vlazdra picture vlazdra  路  6Comments

jigneshvashundhara picture jigneshvashundhara  路  9Comments

longkeng picture longkeng  路  4Comments

dnhyde picture dnhyde  路  5Comments

ZedZeal picture ZedZeal  路  6Comments