Shyam Shyam - 7 months ago 173
Java Question

How to use FFMPEG with java?

I'm using the following command to convert sequence of images to a video.

ffmpeg -r 1 -i sample%d.png -s 320x240 -aspect 4:3 output.flv


This works fine for me!

Now i'm trying to use the above command to run through java code.

How can i run the ffmpeg command using
Runtime.getRuntime()
from my java code.

Please share your thoughts..

Answer
Runtime.getRuntime().exec("ffmpeg -r 1 -i sample%d.png -s 320x240 -aspect 4:3 output.flv");
Comments