Reputation: 11
I want to make a sample video file into video for 30 seconds to show. But I can not do it because I'm not good enough with FFmpeg.
My code :
String command[]={
"-y",
"-r",
"1/5",
"-i",
src.getAbsolutePath(), // only one image file path
"-c:v",
"libx264",
"-vf",
"fps=25",
"-pix_fmt",
"yuv420p",
imagesvideoOutput
};
Upvotes: 1
Views: 1775
Reputation: 134173
ffmpeg -loop 1 -i image.png -vf format=yuv420p -t 30 output.mp4
ffmpeg -loop 1 -framerate 1 -i image.png -vf fps=25,format=yuv420p -t 30 output.mp4
Upvotes: 2