【工具】转码silk格式为mp3

【工具】转码slk格式为mp3

前提 安装 ffmpeg

【安装】Linux安装ffmpeg_linux安装ffmpeg4.4_我是Superman丶的博客-CSDN博客

GitHub - kn007/silk-v3-decoder: Skype Silk Codec SDKDecode silk v3 audio files (like wechat amr, aud files, qq slk files) and convert to other format (like mp3). Batch conversion support.

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();
        }
    }
相关推荐
Flittly4 小时前
【AgentScope Java新手村系列】(16)从RAG到多路检索
java·spring boot·spring
小兔崽子去哪了4 小时前
Java 生成二维码解决方案
java·后端
人活一口气8 小时前
从JVM调优到MCP协议:Java全栈技术体系深度总结与企业级架构实践
java·spring boot
NE_STOP10 小时前
Vibe Coding -- 完整项目案例实操
java
荣码10 小时前
GraphRAG:普通RAG只能回答"点"的问题,我踩了4个坑才搞懂
java·python
SimonKing10 小时前
Google第三方授权登录
java·后端·程序员
明月光81810 小时前
从一行 @Builder 说起:重新拾起 Java 的 Lombok、注解与 Builder 模式
java
考虑考虑20 小时前
Mybatis实现批量插入
java·后端·mybatis
咖啡八杯20 小时前
GoF设计模式——中介者模式
java·后端·spring·设计模式
青石路1 天前
记一次多JDK版本问题的排查,一坑套一坑,差点没爬上来
java