在java中执行 ffmpeg 命令
把命令内容中的 \" 这种转义的全部去掉 并且不要有多余的空格(包括拼接字符串时传入的参数)
//在java中这么写(传入的参数不要有多余的空格)
String ffmpegCommand = "ffmpeg -protocol_whitelist file,http,https,tcp,tls,crypto -i " + tmpDir + " -c copy " + outputPath + "/" + title + ".mp4";
//java拼接好的命令终端命令都可以这么写
ffmpeg -protocol_whitelist file,http,https,tcp,tls,crypto -i /Users/you/Downloads/tmp.m3u8 -c copy /Users/you/Downloads/66-66-66.mp4
//终端命令可以这么写 java这么写会报Error opening input: No such file or directory
ffmpeg -protocol_whitelist file,http,https,tcp,tls,crypto -i "/Users/zigui/Downloads/tmp.m3u8" -c copy "/Users/zigui/Downloads/66-66-66.mp4"