使用java-ffmpeg wrapper,或者简单的使用java运行时来执行ffmpeg? [英] use java-ffmpeg wrapper, or simply use java runtime to execute ffmpeg?

查看:268
本文介绍了使用java-ffmpeg wrapper,或者简单的使用java运行时来执行ffmpeg?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对Java很新,需要编写一个程序,收听视频转换指令,并在新指令到达后转换视频(指令存储在Amazon SQS中,但与我的问题无关)

I'm pretty new to Java, need to write a program that listen to video conversion instructions and convert the video once an new instruction arrives (instructions is stored in Amazon SQS, but it's irrelevant to my question)

我正在面对一个选择,要么使用Java RunTime来执行'ffmpeg'转换(像从命令行),或者我可以使用写在Java中的ffmpeg包装器 http://fmj-sf.net/ffmpeg-java/getting_started.php

I'm facing a choice, either use Java RunTime to exec 'ffmpeg' conversion (like from command line), or I can use a ffmpeg wrapper written inJava http://fmj-sf.net/ffmpeg-java/getting_started.php

我更喜欢使用Java Runtime直接执行ffmpeg,并避免使用java-ffmpeg包装器,因为我必须学习库。所以我的问题是使用java-ffmpeg包装器直接使用运行时方式执行exec ffmpeg有什么好处吗?我不需要ffmpeg播放视频,只需转换视频

I'd much prefer using Java Runtime to exec ffmpeg directly, and avoid using java-ffmpeg wrapper as I have to learn the library. so my question is are there any benefits using java-ffmpeg wrapper over exec ffmpeg directly using Runtime? I don't need ffmpeg to play videos, just convert videos

感谢

推荐答案

如果我没有错误,你链接到的ffmpeg wrapper项目已经过时了,没有维护。 ffmpeg是一个非常活跃的项目,很多变化和发布。

If I'm not mistaken, the "ffmpeg wrapper" project you linked to is out of date and not maintained. ffmpeg is a very active project, lot's of changes and releases all the time.

您应该看看Xuggler项目,这为您要做的事情提供了一个Java API ,并且与ffmpeg紧密结合。

You should look at the Xuggler project, this provides a Java API for what you want to do, and they have tight integration with ffmpeg.

http: //www.xuggle.com/xuggler/

如果您选择下载Runtime.exec()路径,则此Red5线程应该很有用:

Should you choose to go down the Runtime.exec() path, this Red5 thread should be useful:

http:// www.nabble.com/java-call-ffmpeg-ts15886850.html

这篇关于使用java-ffmpeg wrapper,或者简单的使用java运行时来执行ffmpeg?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆