Answer the question
In order to leave comments, you need to log in
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
Answer the question
In order to leave comments, you need to log in
ffmpeg -i file.avi -c:v libx264 -pix_fmt yuv420p -b:v 1000k -pass 1 -movflags faststart file.mp4or
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.mp4where -b:v 1000k - 1 Mbps bitrate for video,
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
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 questionAsk a Question
731 491 924 answers to any question