【工具】转码slk格式为mp3
前提 安装 ffmpeg
【安装】Linux安装ffmpeg_linux安装ffmpeg4.4_我是Superman丶的博客-CSDN博客
sh converter.sh 33921FF3774A773BB193B6FD4AD7C33E.slk mp3
java 执行转码的方法
- public static void main(String[] args) {
- try {
-
-
- //批量转换,会有一个文件转换失败,不明所以等待大神改进
- String command = "sh D:/silk-v3-decoder-master/converter.sh D:/aaa D:/bbb mp3";
- //单个文件转换 测试无问题
- String command1 = "sh D:/silk-v3-decoder-master/converter.sh D:/aaa/msg_181711011620205ce3eb94d104.amr mp3";
-
- Process process = Runtime.getRuntime().exec(command);
-
- int status = process.waitFor();
-
- //打印执行状态 0为成功
- System.out.println(status);
-
- System.out.println(command);
-
- } catch (InterruptedException e) {
- e.printStackTrace();
- } catch (IOException e) {
- e.printStackTrace();
- }
- }