crop video with ffmpeg

Volker is currently helping out with his semi professional home streaming setup. Streaming from Instagram to facebook for instance. Ally Allergens is conducting interview on Instagram with the live feature, the stream is captured locally using a HDMI grabber and streamed to facebook (or other service)

Image may contain: 1 person, text

This is how the stream/recording looks on facebook (or youtube in this instance)

Of course the phone is in portait mode, and some nice background was added to make the landscape experience more pleasing.

Now the topic of this post: we want the portrait version of this video. FFMPEG to the rescue:

export frames as PNG: ffmpeg -i Ally_Meets_Dr_Yvonne_Braun.mp4 -r 1 image-%04d.png

This would export the complete video, so make sure to kill (CTRL+C) the process after a bit.

and crop: ffmpeg -i Ally_Meets_Dr_Yvonne_Braun.mp4 -filter:v “crop=378:720:450:0” Ally_Meets_Dr_Yvonne_Braun_cropped.mp4

The result.


ffmpeg -i in.mp4 -filter:v "crop=out_w:out_h:x:y" out.mp4

Kommentare sind geschlossen.