![](/img/trans.png)
[英]How to execute command line ffmpeg commands programatically in android?
[英]Execute FFmpeg commands in android
我已經在android項目中編譯了所有ffmpeg的文件,但是我不知道如何調用ffmpeg命令。 如何獲取已編譯庫的“可執行文件”? 究竟是什么? 謝謝!!
試試這個代碼:
try {
Process ffmpegProcess = new ProcessBuilder(ffmpegCommand).redirectErrorStream(true).start();
String line;
BufferedReader reader = new BufferedReader(new InputStreamReader(ffmpegProcess.getInputStream()));
Log.d(null, "*******Starting FFMPEG");
while((line = reader.readLine())!=null){
Log.d(null, "***"+line+"***");
}
Log.d(null,"****ending FFMPEG****");
} catch (IOException e) {
e.printStackTrace(); }
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.