按照视频长度添加音频
ffmpeg -i home_test.mp4 -i testmp3.mp3 -filter_complex " [1:0] apad " -shortest output.mp4
视频按时间切片
ffmpeg -ss 00:00:10 -t 00:00:30 -i 25_1.mp4 -vcodec copy -acodec copy 2_cache.mp4 -y -loglevel quiet
ffmpeg -i 25_0.mp4 -ss 00:00:10 -t 15 -c copy test.mp4
修改分辨率
ffmpeg -i video_1920.mp4 -vf scale=640:360 video_640.mp4 -hide_banner
修改编码
ffmpeg -i input.mp4 -vcodec mpeg4 output.mp4
自动Y和不要打印
-y -loglevel quiet
视频切片
ffmpeg -ss 00:00:00 -t 0:03:00 -i E:\1.mp4 -vcodec copy -acodec copy E:\1-C.mp4
视频合成
在{concat.txt}中按照原格式添加视频名称
示例:file+空格+单引号+视频名称+单引号,视频会按顺序合成
ffmpeg -f concat -safe 0 -i {concat.txt} -c copy -y {result.mp4}
替换音频
ffmpeg -i 1.mp4 -i b.mp3 -map 0:0 -map 1:0 -c:v copy -c:a libmp3lame -q:a 1 -shortest video_with_newAudio.mp4