cropsly / ffmpeg-android-java

Android java library for FFmpeg binary compiled using https://github.com/writingminds/ffmpeg-android
http://writingminds.github.io/ffmpeg-android-java
GNU General Public License v3.0
3.33k stars 828 forks source link

Support for 64-bit ?? #337

Open ashirmehmood1996 opened 5 years ago

ashirmehmood1996 commented 5 years ago

is any one there from the original developers of this library to provide the support for 64 bit architecture??? at least guide us to a genuine solution...

semihozkoroglu commented 5 years ago

@ashirmehmood1996 did you any solutions? I am getting error when published app on google play

softwrengr commented 5 years ago

I'm also getting error while using this library the library does not support 64 bit. please anyone can guid ?

ashirmehmood1996 commented 5 years ago

Thanks to yadavkohi https://github.com/yadavkohi/FFmpegAndroid.git

1) he has developed 64 bit lbinaries for this project all you need is to put the 64 bit assets in asset folders from the above link

2) you need some code changes that are explained by yadavkohi in this comment link or you can simple get them from the above repository link.

3) and dont forget to metion abi filters in app level gradle https://developer.android.com/distribute/best-practices/develop/64-bit#building_with_android_studio_or_gradle

ArjunBhilare commented 5 years ago

Hello @ashirmehmood1996 thank you for providing the solution. I'm new to android development and I was using this library in my project. Could you please help me how to add these 64-bit binaries? Like do we have to copy arm64-v8a and x86_64 folders to our app asset folder? And how can we make changes to the code you'd mentioned above? I've installed the library using implementation 'com.writingminds:FFmpegAndroid:0.3.2'. Any help would really be appreciated....

ashirmehmood1996 commented 5 years ago

@ArjunBhilare the libraries I was dealing with were offline. I was given a task at my work space to make the code compatible with 64 bit OS as per google warning. The code handed over to me was using downloaded libraries as binaries. Unfortunately I don't know in your case how exactly we can do that. I am a bit junior too for that task. May be yadavkohi can help you out in that case.

ArjunBhilare commented 5 years ago

Ohh okay. Thank you @ashirmehmood1996. If possible could you share your project structure just so that I could get a hint on how to place the library folder?

ashirmehmood1996 commented 5 years ago

file structure

ArjunBhilare commented 5 years ago

Thank you @ashirmehmood1996. This really helped a lot to understand how to place the folders. One last question, could you please tell how have you implemented this in your build.gradle(Module: app) file?

ashirmehmood1996 commented 5 years ago

Actually it was not implemented by me I just added support of 64-bit using he method I described above

`apply plugin: 'com.android.application'

android { compileSdkVersion 28 defaultConfig { applicationId "" minSdkVersion 19 targetSdkVersion 28 versionCode 4 versionName "1.3" multiDexEnabled true ndk.abiFilters 'armeabi-v7a','arm64-v8a','x86','x86_64'

    testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}

lintOptions {

    checkReleaseBuilds false

}
buildTypes {
    release {
        minifyEnabled false

        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
}

} repositories { maven { url "http://dl.bintray.com/jlmd/maven" } } dependencies { implementation fileTree(include: ['*.jar'], dir: 'libs') implementation 'com.android.support:appcompat-v7:28.0.0' implementation 'com.android.support.constraint:constraint-layout:1.1.3'

testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation 'com.jakewharton:butterknife:8.5.1'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.5.1'
implementation 'com.android.support:recyclerview-v7:28.0.0'
implementation 'com.android.support:design:28.0.0'
implementation 'com.android.support:cardview-v7:28.0.0'
implementation files('libs/glide-3.7.0.jar')
implementation 'com.white:progressview:1.0.1'
implementation 'com.crystal:crystalrangeseekbar:1.1.3'
implementation project(':ananas')
implementation project(':library')

implementation 'com.google.android.gms:play-services-ads:17.2.0'
implementation 'com.android.support:multidex:1.0.3'
implementation 'com.google.firebase:firebase-core:16.0.9'
// implementation 'com.github.appunite:video-player-android:1.0.1'
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"

}

apply plugin: 'kotlin-android' apply plugin: 'kotlin-android-extensions' `

ArjunBhilare commented 5 years ago

Ohh okay. Thank you @ashirmehmood1996 for replying . Actually, I'm looking for how the ffmpeg library was implemented. I followed your steps and added support of 64-bit. But I don't know how to implement its dependency in build.gradle because of which I'm getting Cannot resolve symbol 'FFmpeg' error in my code. In the code file code you shared above I cannot understand how FFMPEG is implemented. If you could throw some light on it, it would really help me a lot. Till now I've followed all the steps you've told only the implementation in build.gradle is left. Would be really grateful if you could help me with this issue...

ArjunBhilare commented 5 years ago

@ashirmehmood1996 did you find anything that implements the library you've included in your project?

ArjunBhilare commented 5 years ago

@ashirmehmood1996 @yadavkohi I've added the support for 64 bit by adding 64-bit binaries over here https://github.com/ArjunBhilare/ffmpeg-android-java But still when I upload the app on Play Store it shows support for only 32-bit included. Could you please have a look at it and help me find the bug causing this issue?

yadavkohi commented 5 years ago

You can refer the following repo for ffmpeg library code : https://github.com/yadavkohi/FFmpegAndroid

ArjunBhilare commented 5 years ago

Yes, I've followed the same @yadavkohi I've replaced the FFmpegAndroid folder with the one you mentioned above. You can check it here https://github.com/ArjunBhilare/ffmpeg-android-java Could you please check it. Because when I implemented it in my project and uploaded app to Play Store it still shows error. I really can't understand where the error is and how to resolve this issue. Would be very very grateful of you @yadavkohi if you could help me

ArjunBhilare commented 5 years ago

Or if possible @yadavkohi could you upload a whole new repository of the complete library with 32-bit and 64-bit support. Since I don't have much in-depth knowledge in this there could be something missing in https://github.com/ArjunBhilare/ffmpeg-android-java due to which it's not supporting 64-bit.

ArjunBhilare commented 5 years ago

Capture and a

This is the error I'm getting on Google Play. Could you please help with this?

yadavkohi commented 5 years ago

follow the repo : https://github.com/yadavkohi/FFmpegAndroid and remove some unused folder from ffmpeg submodule like jni, libs etc.

ArjunBhilare commented 5 years ago

Okay I'll follow the above repo and try and let you know if it works. Thank you @yadavkohi for the help, will let you know soon

softwrengr commented 5 years ago

@ashirmehmood1996 does your method solved the issue for 64 bit like you put some stuffs in your assest folder ?

softwrengr commented 5 years ago

@ArjunBhilare after following @ashirmehmood1996 way still you are getting the error ?

ArjunBhilare commented 5 years ago

1 2 3 4 5

in settings.gradle 6

ArjunBhilare commented 5 years ago

@ArjunBhilare after following @ashirmehmood1996 way still you are getting the error ?

Yes I'm still getting the error

ArjunBhilare commented 5 years ago

1 2 3 4 5

in settings.gradle 6

@yadavkohi I've followed the repo you mentioned. I'm still getting the error. I've attached the screenshots above. Could you please help me? Where am I going wrong? I followed the steps you mentioned

ArjunBhilare commented 5 years ago

@softwrengr did you resolve this issue?

ashirmehmood1996 commented 5 years ago

@ArjunBhilare can you show the expanded picture of jni libs folder

ArjunBhilare commented 5 years ago

23

ashirmehmood1996 commented 5 years ago

further expand them

ArjunBhilare commented 5 years ago

More?

ashirmehmood1996 commented 5 years ago

yeah the sub folders

ArjunBhilare commented 5 years ago

Capture

ArjunBhilare commented 5 years ago

Here @ashirmehmood1996 . This one's fine?

ArjunBhilare commented 5 years ago

@ashirmehmood1996 From the above... In libs folder there is nothing for x86_64 or arm64-v8a

ashirmehmood1996 commented 5 years ago

1 2 3 4 5 in settings.gradle 6

@yadavkohi I've followed the repo you mentioned. I'm still getting the error. I've attached the screenshots above. Could you please help me? Where am I going wrong? I followed the steps you mentioned

there you only have 32 bit version of these libraries thats why google is not accepting this app.

ArjunBhilare commented 5 years ago

@ashirmehmood1996 Which files are missing? I added in assets the ones you'd mentioned

ashirmehmood1996 commented 5 years ago

what are those libraries used for you need a 64 bit version for them too

ashirmehmood1996 commented 5 years ago

it was for fmpeg but these libs are not ffmpeg ones. find out what are these libraries used for and try to get 64 bit versions for them too

ArjunBhilare commented 5 years ago

The ones in the libs folder right? the .so files?

yadavkohi commented 5 years ago

if the .so files not in use then remove those folders else use this repo https://github.com/yadavkohi/FFmpegSO to get .so files for all architectures.

ashirmehmood1996 commented 5 years ago

The ones in the libs folder right? the .so files?

yes

ashirmehmood1996 commented 5 years ago

if the .so files not in use then remove those folders else use this repo https://github.com/yadavkohi/FFmpegSO to get .so files for all architectures.

yes follow yahavkohi suggestion

ArjunBhilare commented 5 years ago

Shall I delete the libs folder and jni folder then?

yadavkohi commented 5 years ago

If you are only using the ffmpeg binaries then you can delete those folders.

ashirmehmood1996 commented 5 years ago

Shall I delete the libs folder and jni folder then?

donot delete them straigh away. cut them o another folder and see if things are working

ArjunBhilare commented 5 years ago

Yaa I've added the missing .so files and folder. Will try to publish the app using this Capture

ArjunBhilare commented 5 years ago

11

ArjunBhilare commented 5 years ago

@ashirmehmood1996 @yadavkohi Now the error is gone. But I'm getting this warning

aaa

yadavkohi commented 5 years ago

what is the error now?

ArjunBhilare commented 5 years ago

Device support removed warning. I did not understand why this warning is shown

ashirmehmood1996 commented 5 years ago

have you changed the minimum SDK ?

yadavkohi commented 5 years ago

It seems like some configuration changed from you previous playstore build, so it will re-install the app on existing users instead of updating the existing app.