Open wh19990906 opened 1 month ago
mac系统没研究,之后研究
String ffmpegCmd = FFMPEG_PATH + " -i " + "\""+inputFilePath+"\"" + " -ss " + start + " -to " + end + " -c copy " + "\""+outputFilePath+"\"" +" -y"; System.out.println(ffmpegCmd); // 执行FFmpeg命令 String[] cmds = {"/bin/sh", "-c", ffmpegCmd}; Process process = Runtime.getRuntime().exec(cmds);
mac下执行步骤: 1、添加 mac 版 ffmpeg 2、修改 FFMPEG_PATH 3、修改代码执行命令
会做个策略 适配不同的操作系统
环境:mac m1 java11 mac版: ffmpeg
in:./config/LiveRecord/online/douyu/开开丶0510_2024-05-28 13_55_33.flv 视频分割失败。