给小学妹将avi转mp4的时候。自己的avi用
ffmpeg -i “name.avi” -c copy -map 0 "name.mp4"
是能够转的,但是小学妹的机子上就出现了问题
Could not find tag for codec vp6 in stream #0, codec not currently supported in container
Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument
Error initializing output stream 0:1 --
经过采取了很多方案,例如:
ffmpeg -i “name.avi” -c:v libx264 -preset slow -qp 37 -c:a copy "name.avi"
都不行
最后使用了这个方案
ffmpeg -i "name.avi" -strict -2 "name.mp4"
解决。
然后是添加遍历整个文件夹的脚本
for name in *.avi; do ffmpeg -i "$name" -strict -2 "${name%.*}.mp4"; done
扫描二维码关注公众号,回复:
10818524 查看本文章