使用ffmpeg合并视频和音频报错:opus in MP4 support is experimental, add '-strict -2' if you want to use it. Could not write header Stream mapping: Stream #0:0 -> #0:0 (copy) Stream #1:0 -> #0:1 (copy) Last message repeated 1 times
解决办法
1
但是经过测试,合并速度极慢
- 前台合并
后台合并ffmpeg -i x.mp4 -i y.mp3 -acodec copy -strict -2 xy.mp4
ffmpeg -i x.mp4 -i y.mp3 -acodec copy -strict -2 xy.mp4 -y -loglevel quiet
2
经测验合并速度很快
- 前台合并
后台合并ffmpeg -i x.mp4 -i y.mp3 -c:v copy -c:a aac -strict -2 xy.mp4
ffmpeg -i x.mp4 -i y.mp3 -c:v copy -c:a aac -strict -2 xy.mp4 -y -loglevel quiet