Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

FFMPEG Commands is not working on Android 10

I am working on an android app applying video effects like slow and fast motions. My app is working fine below android 10, but not on android 10 and FFMPEG is not showing any error just blank error message on the onFailure callback method.

I did some research and find out that android has introduced scoped permissions and you can temporarily bypass this by adding this line on manifest android:requestLegacyExternalStorage="true" and you get the storage permission. After adding this line rest portation of app is just working fine fetching user videos and etc but FFMPEG is not working.

If anyone has an idea or clue about this issue please help me out.

like image 631
Zain Avatar asked Oct 15 '22 07:10

Zain


1 Answers

here is a working version for compatible devices min API 16 onwards. Support android API 29 (Q)

dependencies {
    implementation 'com.arthenica:mobile-ffmpeg-full:4.4.LTS'
}

Long Term Support packages for MobileFFmpeg v4.4

Supports the following device specifications

Android

Android 4.1 (API level 16) or later

x86 and x86-64 architecturesarm-v7a, arm-v7a-neon, arm64-v8a,

You can find more information on the official repo on github

Update: 20 June 2021

Not maintained anymore as explained in What’s next for MobileFFmpeg?

Now is Superseded by FFmpegKit

Here you can find FFmpegKit For Android

Features

  • Supports API Level 24+ on Main releases and API Level 16+ on LTS releases
  • Includes arm-v7a, arm-v7a-neon, arm64-v8a, x86 and x86_64 architectures
  • Can handle Storage Access Framework (SAF) Uris
  • Camera access on supported devices
  • Builds shared native libraries (.so)
  • Creates Android archive with .aar extension
like image 165
Quimbo Avatar answered Oct 19 '22 00:10

Quimbo