Merge Image with Video in Android - android

Any one know any solution or library which helps to merge an image with video file? I researched some libraries as OpenCV, FFmpeg, but they seem not help my case.

I have successfully integrated Ffmpeg in one of my apps and added a watermark image on my video.
These links can be used to compile ffmpeg for Android.
Link 1
Link 2 (better and clearer approach)
Or, if you want to keep away from the hassle you can buy a paid wrapper by indie-developers (although i won't recommend it):
one such example is ffmpeg4android

Related

how to use FFMpeg in android with easy possible way? with Gradle in android studio for videos concatenation

I am working on video editing in android. After alot of research and
development the only possible solution for real time video editing
found is FFMpeg (Other libraries like Vitamio just impose change
on video while running instead of changing the video). Want to find
soltuion where FFMpeg can easily integrate into android studio
project. Want to do Crop, trim, concatenation and other possible
process on video.

Android: Build a decoder library from Jpeg to MP4 video

I am working on Android 2.2, and my goal is to covert a sequence of images to mp4 video, MPEG-4_Part_14, to be more exact.
The most reasonable solution would be using FFmpeg libraries, and compile them to Android using NDK. How ever I am looking for solution without NDK.
I do not expect from you to build this tool for me, or find some one else who did. I spent quit of time now searching for that, and it's some thing that probably no1 one did yet.
So the only thing that I am asking, is help me find the specs so I be able to build the decoder by my self. I know that it's not a trivial task(May be this is why no one did it yet), but I want to do it any way. So please just help me start it.

Creating a video from set of images Android

I am working on an app for android that creates video file from a video at start and then set of images, and saves it.
Is there any way to accomplish that?
I tried JCodec and it has broken libraries, untrusted code on the web and lack of knowledge about this library.
I tried FFMpeg and it is unsupported enough on android and involves working with NDK.
I tried to create an animation with AnimationDrawable and save this animation as a video, but I can't find a way to save animation as video except using the feature of KITKAT 4.4, but it requires connecting to a computer and having a root.
Is there any other solutions or a trusted and explained way to do this using the ways above?
Thank in advance
I would vote for FFMPEG. You don't need NDK or other sourcery if you can afford a prebuilt solution, like FFmpeg 4 Android.

Android - FFmpeg Alternative to get video frames. (Due to licensing)

Scenario:
I am working on a Android project where in one particular openGL page, I display videos.
FFmpeg is used to obtain frames from videos(as openGL does not support video as texture) and I am using the frames to obtain a video effect.
I am using pre-compiled FFmpeg binaries in the project.
I was not aware of the level of legal implications of using the FFmpeg library.
My superior brought this to my notice FFmpeg legal reference
Problem:
I am no legal expert, so only thing that I understood is that using FFmpeg in a comercial free app (but service needs to be paid for) is going to get me and my company into trouble :(
In no way the source or any part of the source of the project can be released.(The client is very strict about this.)
Questions?
1) Is there any alternative to FFmpeg (which uses Apache or MIT license) that I can use to obtain video frames?
2) In openGL, getting the video frames and looping through - Is it the only way of playing a video? Is there any alternate method to achieve this functionality?
IANAL, but LGPL means that if you compile and use ffmpeg as shared library (.so file) or standalone executable, then you are fine - even in closed source application that you sell for money.

How to play video using FFMPEG library in Android?

I was able to build ffmpeg library by using rock player build script.
Now I have this .so file, how do I play video? And I want to display this video inside a small LinearLayout in my Activity.
Is it possible?
Update:
I know that it's easy to play video using VideoView or MediaPlayer + SurfaceView. I just wanted to understand more about ffmpeg library and how to display the frames inside an Android Activity.
Have a look at this player: https://github.com/bbcallen/ijkplayer
Basically what you need to do is build a JNI interface through to the MediaPlayer class (or possibly ExoPlayer in newer Android though I haven't done this yet).
If you look at the repo link you will see that this needs to be done on top of ffplay more than ffmpeg as the former is the player and the latter the decode/encode/package tool.
There are a few ways of doing this. You should have a look at Dolphin Player, an open source media player for Android. Its actually rather complex, you could also look at the VLC source code which makes use of FFMPEG but VLC is an extensive very complete wrapper to play videos.
See for example an Android app in github: https://github.com/havlenapetr/FFMpeg. This project may be somewhat outdated, but its part that is responsible for video display is quite understandable. You can look for more recent contributions on github.

Categories

Resources