matthewn4444 / VPlayer_lib

Simple FFmpeg library for android for multiple architectures
Apache License 2.0
44 stars 13 forks source link

NDK_MODULE_PATH issue in Window 10 #2

Closed vxhviet closed 6 years ago

vxhviet commented 8 years ago

Hi @matthewn4444,

I've followed your instruction in the wiki Building VPlayer with FFmpeg binaries. However until step 7, whenever I try to build i get this error:

:VPlayer_library:cleanNative
Android NDK: WARNING: APP_PLATFORM android-23 is larger than android:minSdkVersion 16 in ./AndroidManifest.xml    
Android NDK: jni/libyuv/Android.mk: Cannot find module with tag 'cpufeatures' in import path    
Android NDK: Are you sure your NDK_MODULE_PATH variable is properly defined ?    
jni/Android.mk:185: *** Android NDK: Aborting.    .  Stop.
Android NDK: The following directories were searched:    
Android NDK:         
:VPlayer_library:cleanNative FAILED
Error:Execution failed for task ':VPlayer_library:cleanNative'.
> Process 'command 'C:\Users\Viet\AppData\Local\Android\ndk\android-ndk-r11c/ndk-build.cmd'' finished with non-zero exit value 2
Information:BUILD FAILED

I have Windows 10 and NDK r11c. I've been fighting a losing battle with FFmpeg for too long. Any help is very much appreciated.

Thank you so much for your time.

vxhviet commented 8 years ago

for people that may have this problem, add the following line to the Android.mk under VPlayer_library folder:

...
$(call import-add-path,C:\Users\Viet\AppData\Local\Android\ndk\android-ndk-r11c\sources\android)
$(call import-module,cpufeatures)

Of course you will need to update it to your specific NDK path.

matthewn4444 commented 8 years ago

Sorry for the late response. Were you able to figure out how to build it? My instructions on the wiki are for Linux though I never tried to build it on Windows.

I just tried building the library on Ubuntu again and it worked without adding anything extra to the build scripts. And the instructions also said to export NDK location (therefore you don't need to hardcode it) if you were using Cywgin/git bash on Windows. https://github.com/matthewn4444/VPlayer_lib/wiki/Compiling-FFmpeg#building-source-and-ffmpeg

vxhviet commented 8 years ago

Yes, I've compiled it successfully even though I haven't had time to test it until later today. Will come back if I had any issue.

I do set the ndk path in the environment variable but i guest its not the same as NDK_MODULE_PATH.

Honestly trying to compile and set up Ffmpeg as well as the NDK on window give me so much pain but due to my team's main dev OS is Windows I have to find a way to make it work.

One side question, I'm trying to develop a scrubbing feature like this using the input seeking of FFmpeg. I've tried a bunch of player before but the seeking simply takes too much time for a smooth scrubbing.

From a quick skimming on your code, it seem like it's only accurate to seconds when milliseconds is what I need for accuracy so that's will be the first thing I need to modify.

Secondly, I'm not very experienced with FFmpeg lib so could you point me to what function/ method that input seeking is implemented?

Thank you so much for your time.

matthewn4444 commented 8 years ago

First, once you compile the ffmpeg.so files you don't need linux anymore, you can build the rest of the app using Windows and command prompt (or whatever console you use).

I forked this engine and didn't work too much on the original implementation of the seeking and playback (mainly fixing misc bugs, build scripts and adding easier integration code). You would need to talk to the original author about that.

vxhviet commented 8 years ago

Yes thank you for your recommendation. If you had any experience on this matter I would love to hear. I've been fighting this ffmpeg battle for far too long, it's especially more frustrating when the same thing can be easily achieve in iOS with just 1 line of code.

Anyway, still thank you for your huge effort on making the compiling process easier.

matthewn4444 commented 6 years ago

After my last couple of changes, everything should be buildable (until android changes ndk again....). If you must compile on windows, I suggest you download the ubuntu shell from the windows store and use that to compile (I am currently doing that on Windows). And for android studio, I just updated a new change to compile on all the new versions of everything and architectures (newest NDK, sorta new gradle, newest android studio), that will work on Windows.

If you have anymore issues, then we can reopen this.