2017-10-18 109 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); } –