Histoire d’un ruisseau

Baudreix : vidéos / ffmpeg / ffmpeg wiki

Crop

# width:height:x:y
ffmpeg -i input.mp4 -filter:v "crop=720:405:0:534" output.mp4

Treshold b&w

ffmpeg -i out.mp4 -f lavfi -i color=gray:s=720x405 -f lavfi -i color=black:s=720x405 -f lavfi -i color=white:s=720x405 -filter_complex threshold output.mp4

# Nay
ffmpeg -i sources/VID_20250216_153217.mp4 -f lavfi -i color=gray:s=1280x720 -f lavfi -i color=black:s=1280x720 -f lavfi -i color=white:s=1280x720 -filter_complex threshold output.mp4

Image strip

Source

generate-video-preview sources/VID_20250216_153217.mp4 preview-nay.jpg --width 160 --rows 5 --cols 6 --padding 4 --margin 4

Slowmo

ffmpeg input.mp4 -filter_complex "[0:v]setpts=2.0*PTS[v];[0:a]rubberband=tempo=0.5:pitch=0.5[a]" -map "[v]" -map "[a]" output-tempo.mp4

Remove audio

ffmpeg -i input.mp4 -c copy -an output.mp4

Remove audio

ffmpeg -i input.mp4 -c copy -metadata:s:v:0 rotate=90 output.mp4

Loop

Source

ffmpeg -i bland.mp4 -filter_complex "[0]split[body][pre];  [pre]trim=duration=1,format=yuva420p,fade=d=1:alpha=1,setpts=PTS+(17/TB)[jt];  [body]trim=1,setpts=PTS-STARTPTS[main];  [main][jt]overlay"   bland-output.mp4

Misc.

ffmpegbyexample.com
github.com/vadimkantorov/mpegflow
github.com/transitive-bullshit/awesome-ffmpeg?tab=readme-ov-file