2017-10-18 68 views

回答

0

您可以使用參數刪除音頻。

ffmpeg -i input.mkv -c copy -an output.mkv 

參見:

http://ffmpeg.org/ffmpeg.html#SEC8

因此,對於一個數組,這樣做:

String[] command = new String { "-i", yourRealPath, "-c", "copy", "-an", filePath }; 
+0

我已經看到了,但正確的查詢將是巨大的事業即時通訊新和有麻煩。如何在字符串數組中使用此代碼 –

+0

您可以向我們展示需要數組的代碼嗎? –

+0

private void removeAudioVideo(){ String filePrefix =「remove_audio」; String fileExtn =「.mp4」; File dest = new File(moviesDir,filePrefix + fileExtn); int fileNo = 0; while(dest.exists())fileNo ++;(012)。 dest =新文件(moviesDir,filePrefix + fileNo + fileExtn); } String [] complexCommand = {「-y」,「-i」,yourRealPath ,, filePath}; execFFmpegBinary(complexCommand); } –