How to reduce the file size of a video | Compress, convert & resize video compression tricks

Published: 19 June 2022
on channel: The FFMPEG guy
792
25

Today, we show how to easily reduce the size of a video file without losing quality. We will demonstrate several tricks that ensure a higher compression rate for your videos and films. All techniques can be combines and parameters customized to achieve the result you need. Enjoy!

ꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷ
EXAMPLE
ꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷ
❶ Reducing the file size by converting the video to the newest MP4 (H.265 codec)
→ ffmpeg -i input.mp4 -vcodec libx265 output01.mp4

with:
ffmpeg = Calls Ffmpeg, a free video / audio handling software to …
-i input.mp4 = … read file «input.mp4» and …
-vcodec libx265 = … converts the file to .mp4 using the newer H.265 codec… note: In comparison to most common H.264 (AVC) MP4 codec, the H.265 (HEVC) MP4 codec offers from 25% to 50% better data compression at the same level of video quality.
output01.mp4 = … and outputs the result to file «output01.mp4»

The result: In this example, the overall video file size is reduced from 7.29MB to 3.06MB

❷ Reducing the file size by changing the video Constant Rate Factor (CRF)
→ ffmpeg -i input.mp4 -crf 24 output02.mp4

with:
-i input.mp4 = Reads file «input.mp4» and …
-crf 24 = … sets the Constant Rate Factor (CRF) to 24… Note: With H.264/H.265, CRF can be set between 0 and 51 with default CRF values resp. 23/28. The lower the value, the better the quality.
output02.mp4 = … and outputs the result to file «output02.mp4»

The result: In this example, the overall video file size is reduced from 7.29MB to 6.05MB

❸ Reducing the file size by changing the video dimensions (height and width)
→ ffmpeg -i input.mp4 -vf scale=640:360 output03.mp4

with:
-i input.mp4 = Reads file «input.mp4» and …
-vf scale=640:360 = … calls the scale video filter (vf) to change the video size to 640x360…
output03.mp4 = … and outputs the result to file «output03.mp4»

The result: In this example, the overall video file size is reduced from 7.29MB to 2.47MB

❹ BONUS: Putting it all together
→ ffmpeg -i input.mp4 -vcodec libx265 -crf 24 -vf scale=640:360 output04.mp4

The result: In this final example, the overall video file size is reduced from 7.29MB to 1.85MB

ꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷ
→ Catch up with the FFMPEG guy Channel
   • ALL THE VIDEOS FROM THE CHANNEL  
ꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷ
MUSIC
ꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷ
→ Sky Scraper - Geographer
ꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷ
An FFMPEG question?
Ask the FFMPEG guy
ꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷꟷ


Watch video How to reduce the file size of a video | Compress, convert & resize video compression tricks online without registration, duration hours minute second in high quality. This video was added by user The FFMPEG guy 19 June 2022, don't forget to share it with your friends and acquaintances, it has been viewed on our site 792 once and liked it 25 people.