Reputation: 4837
I am using this http://androidwarzone.blogspot.in/2011/12/ffmpeg4android.html for implementing what I need.
My code for Creating video from images is:
for (int i = 1; i < 60; i++)
{
commandStr = "ffmpeg -y -r 1/5 -i /sdcard/TApp/Media/"+i+".jpg /sdcard/TApp/Media/out.mp4";
setCommand(commandStr);
runTranscoing();
}
And I`m not getting the right result. Why is that?
Upvotes: 1
Views: 354
Reputation: 1346
Firstly you have coded wrongly. You just have to specify the Image Series
for making Video from images. That means all the images should have a name in series. Take a look at Ffmpeg Doc for a better understanding.
Also you have not specified the filter to be used for encoding the video. Make a change like this to code
String cmnd ="ffmpeg -r 1/5 -i img%03d.png -c:v libx264 -r 30 -pix_fmt yuv420p out.mp4";
setCommand(cmnd);
runTranscoing();
Cheers. :)
Upvotes: 2