How to Resize,Scale & Compress Any Video Without Losing Quality Using FFMPEG in Terminal
39 views
Jun 3, 2025
Command used in the video: ffmpeg -i input.mp4 -vf scale=1280:-2 output.mp4
View Video Transcript
0:00
uh hello guys uh welcome to this video
0:02
so in this video I'll show you a ffmppg
0:04
command which can actually uh resize
0:06
your video it can actually change the
0:09
aspect ratio or it can transform the uh
0:13
width and the height you can let's
0:17
suppose if your if your video is having
0:20
uh 1080p quality you can change this
0:22
quality to lower the quality you can
0:25
increase the quality as well so this is
0:27
a simple fmpg command i will show you so
0:30
I have this input video here if you see
0:34
2.MPP4 so I just need to resize this
0:38
video so we simply write here ffmpg- i
0:41
and then followed by the name of the
0:42
video which I will simply say
0:45
2.mpp4 after that we actually I have
0:49
given this command in the description of
0:51
this video i got this command from this
0:53
articlestack overflow.com where someone
0:56
has given this command so I personally
0:58
tried this command which works perfectly
1:01
and then we simply provide this option
1:03
which is -vf which stands for video
1:06
filter so we're providing a video filter
1:10
of fmpp which is called as scale so this
1:13
scale
1:15
filter you can see we simply write here
1:17
scale is equal to and then we simply
1:19
provide the
1:22
uh width in this case so let's suppose
1:26
we want to change the width here so this
1:29
is actually 1280 into 720 video if I
1:33
open this video you see the size of this
1:36
video is 1280 into 720 it's a simple
1:39
normal YouTube video if I show you the
1:42
properties here of this video details of
1:45
this you will see the frame width is
1:48
1280 height is 720 so if I want to
1:51
manipulate this change this so let's
1:54
suppose I change this to
1:57
200 and uh
1:59
then we provide colon and then we just
2:03
write dash 2 minus 2 so this simply
2:06
calculate the height accordingly so this
2:10
is this is meant by this you can even
2:12
provide 200 right here as well so this
2:15
will actually transform this video to
2:18
200 width 200 height and then after that
2:22
we give the output file name so you can
2:25
give here
2:28
compressed.mpp4 so we basically lower
2:30
down the quality of this video this is a
2:32
command fmppi the input video then we
2:35
providing this - VF filter scale is
2:38
equal to then the width and the height
2:40
and then this output file if you execute
2:43
this you will see it will actually
2:47
process this
2:48
video and uh it will actually create
2:51
this video here compressed.mpp4 MP4 in
2:54
the same directory and if you see the
2:56
size of this video if I hover onto this
2:59
you will see 2.77 MGB but the original
3:03
size of this video was 12.8 MGB because
3:06
we lowered down the quality of this
3:10
video you can see as you can see the
3:14
video is slightly lowered in terms of
3:17
quality it is blurry so if you want to
3:21
make your videos lower down the quality
3:24
you want to change it resize it scaling
3:27
dimensions if I show you the dimensions
3:30
of this code go to properties details if
3:32
you see it has changed this to 200 200
3:36
so very simple command and
3:38
[Music]
3:39
uh so you can see that
3:43
it's we have the scaling filter which is
3:46
available in
3:48
ffmppg and uh we can do this 800
3:56
by can provide any width and the height
4:00
here and it will just uh do that for you
4:05
d size with any width and height and
4:08
then it will process it it will create
4:12
this so I've given the command in the
4:15
description uh you can basically check
4:17
out the article as well where they
4:20
have you can see
4:22
that so this stack overflow article they
4:25
have given this command i have given
4:29
this article in the description of this
4:31
video so they have explained each option
4:34
in this in detail as well so you can
4:36
check out this article and thank you
4:38
very much for watching this video and
4:40
also check out my website
4:42
freemediatools.com which contains
4:44
thousands of tools regarding audio video
4:46
and image
#Multimedia Software