I have a small application that stream pictures from a device using android. I'm able to take pictures and save into sdcard and now I have been willing to do some video recording with that. I have done it using IOS: I save the pictures into an array and for each pictures, I create a mjpeg video with these combined pictures.
I have thought of using pure java to do so, but most of the import libraries cannot be supported in Android.
I have tried to use this: https://github.com/lessthanoptimal/BoofCV/blob/master/main/io/src/boofcv/io/video/CreateMJpeg.java
But it cannot be played for some unknown reason.
I'm out of ideas. Please help me.
Thank you
You can use MJPEGGenerator.java to create an AVI from a set of jpg images
This is example of using MJPEGGenerator in russian language. Use translate.google.com to understand.
Related
I've been working on this videos thing in android and I thought to make it more functional. I have a question that, is there any way we can insert or remove frames from some video, like edit videos the same way we edit images, give them effects and all. I think, I am clear. Any links, sample codes, hints or books would be useful to start with this.
thanks :)
Here are multiple things you can look for video editing.
The more efficient in FFMpeg android sample for processing video (so that effects on video applied and saved on device as new video with applied effects) FFmpeg android java
For run time effects, just to show the user effect on video while running in your app, can use Vitamio
I am thinking to start the development of a new project and I have some ideas in mind, but I am not sure how much is doable in android.
The steps of the app would be:
The user selects a set of images from Gallery
The user selects an audio file from external storage
I combine the images and the sound (each image is displayed for a timeframe) into a movie file that can be exported to YouTube
From my research I wasn't able to find any way to create the movie. All the answers contained links to android NDK and external codecs.
So my question is: which would be the easiest way of making this on android?
Okay, your idea is feasible. You need to have Ffmpeg compiled for android. First have a look for it at Stack link.Then decide yourselves as per need.
After you have Ffmpeg compiled for android, you can just search and extract/add audio as per your needs. To give a a start have a look at this and FFmpeg Docs Guide/Official Example.
To make video from images have a look at Ffmpeg official example. You can find plenty of these on google.
After having all these things on your hand, you are ready for your project. I would suggest to try and familiarize yourself for Ffmpeg on Windows/Linux as per your need first.
Hope this would help.
Cheers.:)
I have read many threads about how to create videos from images on Android. I am a bit confused about how can I get it work.
Some posts says that we can use a ffmpeg library for android. I have seen other posts talking about the library Media Format. Some other posts have two years and maybe has been some changes.
Right now, what is the simplest way to create a video from images (regardless how eficient is the process)?
Thank you.
In my app I have a requirement to create a video from the screen activities programatically. (ie: I am running some animations for some time I need to convert these animations to a video, like video demos.)
I have been searching for this for the last week, but I haven't found any solution. I don't know whether it is possible in Android or not. If it is, please tell me the way or suggest me some links.
If you want to capture the screenshots from "within your activity", it is possible. Follow this post
Having grabbed the screenshoton a bitmap, you need to encode the frames to a video yourself.
Captured bitmap --> JNI (Native-bitmap) --> feed input buffer to a native encoder (ffmpeg) --> save to file
This project will meet your request Android-MJPEG-Video-Capture-FFMPEG
It is just to convert jpegs into a movie file by ffmpeg bin
Hey guys, I'm looking into creating an application that requires a video file taken on the mobile phone, open it and allow the user to cut the video using two sliders, one for IN(the beginning) and the other for out(end of the clip you want), this will then create a new file and my app will use it then.
Does this sound feasible? Where should I start looking in order to do this quite simple concept? Does anyone have any ideas?
Thanks
Android SDK has no video-editing (not even cropping) capabilities. So you'd need to write your own.
To do this you'd need to know 3gpp video/audio file format and also a way to decode the file (for showing in the UI).
This is by no means a trivial task.