S
S
shasoft2016-01-14 17:28:36
Video
shasoft, 2016-01-14 17:28:36

What options should I run ffmpeg with to minimize video file size?

There is a family video archive. I would like to minimize the size of video files. Those. you need to recompress all video clips without changing the quality (at least "by eye").
As I understand it, the mp4 format will be optimal. Here is the following command:

ffmpeg -i file.avi -c:v libx264 -pix_fmt yuv420p -movflags faststart file.mp4

However, there may be another option/options. The running time does not matter (although compressing a 10-minute video for a week is overkill :))
The program will work on autoit, so you can even perform several recompression options and choose the smallest one. The whole question is what to press and what commands it can be done.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
G
glenean, 2016-01-14
@glenean

ffmpeg -i file.avi -c:v libx264 -pix_fmt yuv420p -b:v 1000k -pass 1 -movflags faststart file.mp4
or
ffmpeg -i file.avi -c:v libx264 -pix_fmt yuv420p -b:v 1000k -pass 1 -c:a libfdk_aac -b:a 128k -movflags faststart file.mp4
where -b:v 1000k - 1 Mbps bitrate for video,
-b:a 128k - 128 kbps for audio

V
Vasily, 2016-01-15
@Foolleren

look for a 265 or VP9 codec, with the same visual quality, it provides almost 4-fold space savings compared to 264, although playing this file on modern hardware will be very expensive in terms of resources - not every machine will pull

S
shasoft, 2016-01-15
@shasoft

In the end, I settled on this option.
When converting a video, I check - if the bitrate is below 5500k (more precisely, 5500 * 1.03, since when converting with such parameters, the bitrate can be more than 5500), then I will not convert the video clip. If more, then I start the conversion.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question