开发者

Java: executing ffmpeg with command line arguments

开发者 https://www.devze.com 2023-03-05 14:09 出处:网络
I\'m trying to execute ffmpeg with several command line arguments. See http://pastebin.com/6RzLL8KQ for the complete program. It takes arguments and will print the correct command, but it will not exe

I'm trying to execute ffmpeg with several command line arguments. See http://pastebin.com/6RzLL8KQ for the complete program. It takes arguments and will print the correct command, but it will not execute ffmpeg with the correct parameters. However if I test and put String commandStr[] = {ffmpegpath,"-h"}; it is able to print that without issue. If I run the command on /home/user/PB200014b.avi for example, it prints the command ffmpeg -i /home/user/PB200014b.avi -r 1 -f image2 /home/user/originalframes-PB200014b/%03d.jpg as it should, but no frames a开发者_高级运维ppear in the directory /home/user/originalframes-PB200014b/

The relevant lines of my code are lines 71 onward. Thank you for any help you may be able to give!


Your program works fine on my computer. Have you checked error stream of created process in your example?

ffmpeg.getErrorStream();

May be some errors of ffmpeg itself?

0

精彩评论

暂无评论...
验证码 换一张
取 消