简体   繁体   English

如何在Java Maven项目上使用ffmpeg?

[英]How to use ffmpeg on Java maven project?

I want to use pan control. 我想使用声像控制。 But I'm confused how to use it. 但是我很困惑如何使用它。 For example, I can run this command in terminal ffmpeg -i wmafile.wav -af “pan=stereo|c1=c1” outr.wav 例如,我可以在终端ffmpeg -i wmafile.wav -af “pan=stereo|c1=c1” outr.wav运行此命令

How to implement this command in java? 如何在Java中实现此命令?

Maven is also a dependency management solution, it will download libraries which you put in pom.xml. Maven还是一个依赖项管理解决方案,它将下载您放入pom.xml中的库。 You can search for libraries here: https://mvnrepository.com/ 您可以在此处搜索库: https : //mvnrepository.com/

If you want to use ffmpeg from java, you have at least two options: 如果要使用Java的ffmpeg,则至少有两个选择:
find a ffmpeg library on mvnrepository and "import" it, or 在mvnrepository上找到一个ffmpeg库并“导入”,或者
use System.Diagnostics.Process.Start to run that command as a subprocess. 使用System.Diagnostics.Process.Start将该命令作为子进程运行。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM