How to crop a video with FFMPEG | Cut out unwanted parts / sections

Опубликовано: 09 Апрель 2021
на канале: The FFMPEG guy
1,164
25

Today, we show you how to crop a video using ffmpeg. Cropping is used to:
choose what part of a video you want to be visible
cut out unwanted elements or lines at the edges of a video
fit a video to a new aspect ratio

ꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷ
EXAMPLES
ꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷ
❶ Cropping with 2 parameters
→ ffmpeg -i input.mp4 -vf crop=600:400 output.mp4

with:
crop = FFMPEG video filter to cut part of a video
600 = The cropping width (around the reference point)
400 = The cropping height (around the reference point)
Note: In this scenario (2 parameters only for the crop video filter), the reference point is the center of the input video

❷ Cropping with 4 parameters
→ ffmpeg -i input.mp4 -vf crop=600:400:500:300 output.mp4

with:
crop = FFMPEG video filter to cut part of a video
600 = The cropping width
400 = The cropping height
500 = The horizontal distance from the reference point before the horizontal cropping starts
300 = The vertical distance from the reference point before the vertical cropping starts
Note: In this scenario (4 parameters for the crop video filter), the reference point is the upper left corner of the input video (0, 0)

ꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷ
→ Catch up with the FFMPEG guy Channel

ꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷ
MUSIC
ꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷ
→ What It Is - Silent Partner
ꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷ
An FFMPEG question?
Ask the FFMPEG guy
ꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷ


Смотрите видео How to crop a video with FFMPEG | Cut out unwanted parts / sections онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь The FFMPEG guy 09 Апрель 2021, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 1,164 раз и оно понравилось 25 людям.