Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use FFMPEG with java?

Tags:

java

ffmpeg

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..

like image 702
Shyam Avatar asked May 16 '12 06:05

Shyam


1 Answers

Runtime.getRuntime().exec("ffmpeg -r 1 -i sample%d.png -s 320x240 -aspect 4:3 output.flv");
like image 72
Yusuf X Avatar answered Oct 20 '22 00:10

Yusuf X