0

Now I am trying to convert a few jpg files and a mp3 to flv file.

The ffmpeg command can do this.

ffmpeg -loop 1 -i image.jpg -i music.mp3 -shortest -c:v libx264 -crf 20 -tune stillimage -c:a copy output.mkv

but I must use this function in my java project ):

Are there any java opensource projects?

thanks :)

4

1 回答 1

0

我不确定这是否与您有关,但我认为这会有所帮助:

使用 java-ffmpeg 包装器,还是简单地使用 java 运行时来执行 ffmpeg?更准确地说是得分最高的答案:

https://stackoverflow.com/a/1281454/1091386当然是 4 岁。按照论坛主题的第二个链接http://red5.5842.n7.nabble.com/java-call-ffmpeg-td25005.html似乎建议类似

Runtime rt = Runtime.getRuntime();
Process proc = rt.exec("ffmpeg");

可能适用于您的情况。当然,您将希望单独传递选项...

于 2013-03-27T03:17:13.077 回答