---
title: 'Compress 4K Video WITHOUT Losing Quality - FFmpeg Tutorial'
source: 'https://youtube.com/watch?v=STHKNVkCXHA'
video_id: 'STHKNVkCXHA'
date: 2026-07-28
duration_sec: 413
---

# Compress 4K Video WITHOUT Losing Quality - FFmpeg Tutorial

> Source: [Compress 4K Video WITHOUT Losing Quality - FFmpeg Tutorial](https://youtube.com/watch?v=STHKNVkCXHA)

## Summary

This tutorial demonstrates how to compress large video files without noticeable quality loss using a single FFmpeg command. The video shows a 6.23 GB 4K file reduced to 1.63 GB while maintaining visual quality.

### Key Points

- **Problem and Solution** [0:00] — Huge video files can be compressed without noticeable quality loss using a single FFmpeg command.
- **FFmpeg Installation** [0:15] — FFmpeg must be installed; a link to an installation tutorial is in the description.
- **Example Video Details** [0:36] — The example video is 7 minutes long, 4K, 60 FPS, using AVC video and AAC audio at 320 kbps, size 6.23 GB.
- **Encoder Options** [1:18] — Nvidia GPU users can use NVENC for fast encoding; CPU encoding (libx264) is slower but offers better compression.
- **CRF Value Explanation** [2:00] — CRF (Constant Rate Factor) controls quality: lower values (e.g., 18) give higher quality, higher values (e.g., 28) give more compression. Safe value is 23.
- **Commands for Different Needs** [2:41] — Two main commands: one for general use (libx264, CRF 23, preset medium) and one for very small file size. Nvidia variant uses h264_nvenc with CQ instead of CRF.
- **Advanced Command Options** [3:22] — Additional flags like -a (audio codec AAC at 128 kbps), pixel format yuv420p, and conditional audio processing provide more control.
- **Compression Result** [5:46] — Input 6.23 GB reduced to 1.63 GB (about 75% reduction) with identical visual quality.
- **Fast Start Flag** [6:19] — Using -movflags +faststart enables fast streaming/playback start.

### Conclusion

With FFmpeg and the right command, you can drastically reduce video file size (e.g., 75% reduction) while keeping quality nearly identical. The tutorial provides commands for both CPU and Nvidia GPU encoding.

## Transcript

So, if you have a huge video file and
you want to compress it without
noticeable quality loss, you can do that
with a single FFmpeg command. And in
this video, I'll show you how to do that
perfectly. So, for that, you will have
to have FFmpeg, a command-line video
processing tool, installed. I have a
video on how to install it. It is very
easy and straightforward. The link is in
the description. So, once you have
FFmpeg installed, you can just reduce
the size of your video without
noticeable quality loss in a single
command. So, here is a video I have. It
is 7 minutes long, and the size is 6. 23
GB. So, let's open the command prompt in
this directory so that I can execute
command on this file. And let's type
Let's see the details of this video.
So, as you can see, it is using AVC,
means Advanced Audio Codec. This is a 4K
video, 60 FPS, and a audio with AAC
codec.
Bit rate is around 320
kbps. So, I have prepared few command,
and those commands come in handy based
on your
situation. Like if you have an Nvidia
GPU then
you'll use Nvidia encoder, which will be
super fast. But if you do not have it,
don't worry. You will use processor
source
uh coding power, and that is sometimes
way better. Just a bit slow, but
compression is way better than Nvidia.
So, the first command is for regular for
everyone. So, here as you can see, we
are using lib
uh 264
codec. So, whatever your video file is,
the output video will have a lib x264
codec, which is very mainstream codec.
And then it comes There comes a flag
called CRF. So, here in CRF, the higher
value means
lower quality. I mean, more compression.
So, if the value is 18, then you'll see
no difference. But if the value is 28,
then video quality may degrade a little,
but the size will be reduced a lot. So,
a safe point is 23. Then preset medium
for a balanced encoding, and I'm
copying the audio codec, not changing or
anything related to audio. And the
second command is if you want to have
very small file size. And again, if you
have Nvidia GPU, then you'll use H.264
NVENC. Same encoding algorithm, but done
with the GPU for faster encoding. But
uh the CRF flag changed to CQ for
Nvidia.
Everything else is same. 23 for a medium
compression, and preset before is also
for medium.
So, the value before and CQ
changed for Nvidia encoding, and I did
not
change the audio encoding here still.
But if you want to have more control and
a resilient command, then you can use uh
something like {hyphen} a, means AC.
That means audio will be changed to AAC,
and the audio bit rate will be 120 kbps,
which is like standard. And you'll use
some additional uh flag like pixel
format you've 26 uh 240 pixel, and some
checking like if there is an audio If
audio exists, then do the audio
processing. If not, then don't. So,
those are uh commands you can use to uh
reduce the file size without losing
quality drastically. So, I'll go with
the last command since I have an Nvidia
GPU. So, by the way, uh the input file
is here, for example, input.mp4. So, you
can replace this with your file name and
extension.
And whatever you put at the last as file
name will be name of your output video.
So, my output video will be
output_compressed.mp4.
You will see if everything goes
correctly. So, I'm copying this command.
The name of my input video is input.mp4.
Let's go to the directory. Let's rename
it to input.mp4.
And let's open the command prompt in
this directory. And let's
zoom in so that you can see the command
and paste the command.
So, currently, the video is being
processed.
As you can see,
it is
using my GPU. So, yeah, video processing
is resource-heavy.
If I
would use the
processor encoding, then it would take
even more
even more time to
encode the video.
So, let's wait for it to complete.
The video compression is processed.
Now, let's go to the directory
and see what is the output video look
like. The input video is around 6.23 GB.
And the output video is 1.63
GB. So, from 6 GB to
uh 1.5 GB,
75%.
Okay.
So, 4:1 means from So, initially, if the
video size was 6.23, now the video size
is 1.63 with identical video quality.
So, that is how you can easily reduce
your video file size. And here I have
used some additional flag like MOV flags
plus faststart. So, if you stream or
play the video, it will start super
fast, which is very convenient. So,
that's it, guys. Uh if you have any
questions or any comment, feel free to
put that in the comment section below.
I'll be happy to reply and see your
opinion. So, that's it for this video. I
will add this to the comments in the
description and also how to install
FFmpeg. So, that's it for this video.
Hope you have learned something. See you
in the next video.
