Tag Info

Hot answers tagged


Here's a way to do it with the blackdetect and trim filters. First, a better way to get the blackdetect output is via ffprobe because it is capable of writing structured data such as XML, JSON or one key=value per line. You do this using metadata injection: ffprobe -f lavfi -i "movie=/path/to/input.mp4,blackdetect[out0]" -show_entries ...


Using crop and vstack: ffmpeg -i input -filter_complex \ "[0:v]crop=iw/3:ih:0:0[left]; \ [0:v]crop=iw/3[center]; \ [0:v]crop=iw/3:ih:ow*2:0[right]; \ [left][center][right]vstack=inputs=3[v]" \ -map "[v]" -map 0:a -c:a copy output vstack is faster than pad + overlay. If your ffmpeg is too old for the vstack filter then just download a recent build.


This should work universally. ffmpeg -i in.avi -y -pix_fmt yuv420p -an -qscale 1 -vcodec libx264 -vf setsar=1,crop=in_w:in_h-64:0:64 out.mp4

Only top voted, non community-wiki answers of a minimum length are eligible