分享一下整理的常用ffmpeg命令
分享一下整理的常用ffmpeg命令!! Transform videos to picture
.\ffmpeg.exe -i input.mp4 -vf fps=1 output%d.png
!! Change size of videos or images
.\ffmpeg.exe -i input.mp4 -vf scale=320:240 output.mp4
!! Combine/stack two videos or images
.\ffmpeg.exe -i part1.mp4 -i part2.mp4 -filter_complex vstack=inputs=2 output.mp4
.\ffmpeg.exe -i part1.mp4 -i part2.mp4 -filter_complex hstack=inputs=2 output.mp4
!! Combine images to videos
.\ffmpeg.exe -r 100 -f image2 -s 500x500 -i pic%00d.png -vcodec libx264 -vf "pad=ceil(iw/2)*2:ceil(ih/2)*2" -crf 25-pix_fmt yuv420p output.mp4
!! Combine/stack two videos or images and change size
.\ffmpeg.exe -i part1.mp4 -i part1.mp4 -filter_complex "pad=iw*2:ih*1;overlay=w" output.mp4
!! Crop videos or images
!! out_w is the width of the output rectangle
!! out_h is the height of the output rectangle
!! x and y specify the top left corner of the output rectangle
!! .\ffmpeg.exe -i input.mp4 -strict -2 -vf crop=600:796:200:0 output.mp4 !! ctspecimen
!! .\ffmpeg.exe -i input.mp4 -strict -2 -vf crop=1612:300:0:300 output.mp4 !! ASTM_E606
.\ffmpeg.exe -i a.mov -strict -2 -vf crop=out_w:out_h:x:y output.mp4
!! Combine/stack three videos or images
.\ffmpeg.exe -i part1.mp4 -i part2.mp4 -i out3.mp4 -filter_complex "pad=iw*3:ih*1;overlay=w;overlay=2.0*w" output.mp4
!! Speed up videos
.\ffmpeg.exe -i input.mp4 -filter:v "setpts=PTS/60" output.mp4
!! Cut videos
.\ffmpeg.exe -i input.mp4 -ss 00:00:00 -t 00:00:10 -async 1 output.mp4
!! remove voice
.\ffmpeg.exe -i input.mp4 -c copy -an output.mp4
!! compress video
.\ffmpeg.exe -i input.mp4 -vcodec libx265 -crf 28 output.mp4
!! concat video
.\ffmpeg.exe -f concat -safe 0 -i join.txt -c copy output.mp4
!! join.txt
!! file part1.mp4
!! file part2.mp4
!! file part3.mp4
!! file part4.mp4
!! Merging video and audio, with audio re-encoding
.\ffmpeg.exe -i input.mp4 -i audio.wav -c:v copy -c:a aac output.mp4
!! Speed up videos
.\ffmpeg.exe -i input.mp4 -filter:v "setpts=0.5*PTS" output.mp4
!! change videos format
.\ffmpeg.exe -i input.mp4 -c:v libx264 -ar 22050 -crf 28 output.flv
!! change videos size
.\ffmpeg.exe -i input.mp4 -vf scale=-1:720 -c:v libx264 -crf 18 -preset veryslow -c:a copy output.mp4
最近在研究,刚刚用上了 感谢师傅分享 这个帖子很有帮助 没看懂。难搞 整理的不错,都是常用的,辛苦了 谢谢!发个中文注解的啊 感谢分享整理教程 学习研究一下 先收藏了,后期应该能用的上,谢谢分享 标记一下,感谢分享