roman10 / android-ffmpeg-tutorial Goto Github PK
View Code? Open in Web Editor NEWandroid-ffmpeg-tutorial
android-ffmpeg-tutorial
android-ffmpeg-tutorial This project contains 7 tutorials about how to write a video player on Android using ffmpeg. Each of the tutorial corresponds to one tutorial in https://github.com/chelyaev/ffmpeg-tutorial MUST READ: Before start coding the player, we will need to compile ffmpeg libraries for Android, please follow the instructions here: http://www.roman10.net/how-to-build-ffmpeg-with-ndk-r9/ I'll update the project whenever a new tutorial is completed
I ran tutorial02 on a HTC one with a screen resolution of 1080 x 1920 pixels. Now I get the behaviour as shown in the screenshot:
The image is scrambled, the lines are somehow shifted towards the left. The Video works fine on other devices. I think the problem is that, the frameRGBA->linesize does not match with the windowBuffer.stride. In my case the first one is 1080 and the latter one 1088. Do you have an Idea what may be the error?
Thanks for your help.
Hi,
Thanks for the uploading the project as open source. I was trying to build ffmpeg using NDK version 9. I referred you blog, http://www.roman10.net/how-to-build-ffmpeg-with-ndk-r9/.
After following all the steps as mentioned in the blog I was able to build the ffmpeg with no issues. However, while building the jni it throws following error:
Android NDK: jni/Android.mk: Cannot find module with tag 'ffmpeg-2.0.1/android/arm' in import path
Android NDK: Are you sure your NDK_MODULE_PATH variable is properly defined ?
Android NDK: The following directories were searched:
Android NDK:
jni/Android.mk:11: *** Android NDK: Aborting. . Stop.
I have copied the ffmpeg-2.0.1 in $NDK/source folder and as well in the tutorial_project/jni. Even then the error pops up.
Need some help resolving this.
Thanks,
Vinay
I am able to compile all library but after run application it gives below error
FATAL EXCEPTION: main
Process: roman10.tutorial.android_ffmpeg_tutorial01, PID: 24710
java.lang.UnsatisfiedLinkError: dlopen failed: library "libswresample-1.so" not found
at java.lang.Runtime.loadLibrary(Runtime.java:372)
at java.lang.System.loadLibrary(System.java:1076)
at roman10.tutorial.android_ffmpeg_tutorial01.MainActivity.(MainActivity.java:175)
at java.lang.Class.newInstance(Native Method)
at android.app.Instrumentation.newActivity(Instrumentation.java:1090)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2327)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2490)
at android.app.ActivityThread.-wrap11(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1354)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5443)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:728)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
Hi
I'm try to these tutorial. I built ffmpeg without problems.
But when i build jni with ndk-build, under error occured.
ndk-build
Android NDK: /Users/dhko/android/android-ndk-r9d/sources/ffmpeg-2.0.1/android/arm/Android.mk:tutorial01: LOCAL_MODULE_FILENAME should not include file extensions
Android NDK: ERROR:/Users/dhko/android/android-ndk-r9d/sources/ffmpeg-2.0.1/android/arm/Android.mk:tutorial01: LOCAL_SRC_FILES should point to a file ending with ".so"
Android NDK: The following file is unsupported: tutorial01.c
/Users/dhko/android/android-ndk-r9d/build/core/prebuilt-library.mk:36: *** Android NDK: Aborting . Stop.
My Environment
OS : osx
ndk version : r9
NDK home : /Users/dhko/android/android-ndk-r9d/
Thanks, i am solved
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.