ffmpeg
Updated: Oct 16th, 2023
裁剪
ffmpeg -ss 00:15:00 -to 00:20:00 -i DJI_0205.mp4 -threads 2 -c:v copy -c:a copy outputVideo.mp4
transcode video
ffmpeg -i 2023-10-13-1.mkv -codec copy 2023-10-13-1.mp4
compress video
FFmpeg -crf参数优化:200MB视频变10MB画质基本不变-腾讯云开发者社区-腾讯云
ffmpeg -i part2.mkv -c:v libx264 -preset slow -crf 21 -c:a copy part2-ffmpeg.mp4
concat videos
v1
file 'input2.mp4'
file 'input3.mp4'
file 'input4.mp4'
ffmpeg -f concat -i list.txt -c copy output.mp4
test ok
v2
ffmpeg -i video1.mp4 -c copy -bsf:v h264_mp4toannexb -f mpegts intermediate1.ts
ffmpeg -i video2.mp4 -c copy -bsf:v h264_mp4toannexb -f mpegts intermediate2.ts
ffmpeg -i "concat:intermediate1.ts|intermediate2.ts" -c copy -bsf:a aac_adtstoasc output.mp4
作者:阳盾科技 链接:https://www.zhihu.com/question/338508930/answer/3170934958 来源:知乎 著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。