How to make a videoplayer using FFmpeg on android ndk
This tutorial hasn't been written with Android or Java in mind.
One thing you can do is to do all the FFMPEG
stuff in your C code, putting your decoded images in a queue. From Java SurfaceView
, from a separate thread, you will then be passing a bitmap to the native code. In the native code you will be filling the pixels of that bitmap from your decoded images using AndroidBitmap_lockPixels
and other such stuff.
There is a 'bitmap-plasma'
sample in the NDK. Although it is not related to FFMPEG
it shows how you can operate on a Bitmap
from the native code.
How to use latest FFMPEG in Android Studio project?
There's a very easy solution for this, There's a precompiled library for android, as below https://github.com/WritingMinds/ffmpeg-android-java
Simply include this as a gradle project in your code and add few methods as per their documentation and you are done with FFMPEG commands in android.
This library is not very updated and have some missing features but still its good to use for many simple tasks.
Related Topics
Get Altitude by Longitude and Latitude in Android
Implement Page Curl on Android
Best Place to Close Database Connection
Android App Specific Soft Keyboard
Android Appcompat 21 Elevation
Prevent Dialog Dismissal on Screen Rotation in Android
How to Delete a Whole Folder and Content
How to Change Color of Textinputlayout's Label and Edittext Underline Android
How to Set the Edittext Keyboard to Only Consist of Numbers on Android
Alphabetindexer with Custom Adapter Managed by Loadermanager
How to Remove a Button or Make It Invisible in Android
Firebase Fcm Force Ontokenrefresh() to Be Called
Android 4.3 Bluetooth Low Energy Unstable
What's "Tools:Context" in Android Layout Files
How to Hide Status Bar in Android