[FFmpeg-user] file size too big after re-encoding (was: help please)

Lou Logan lou at lrcd.com
Tue Feb 6 20:54:38 EET 2018

On Tue, Feb 6, 2018, at 1:02 AM, sarkis yol wrote:
> hey what is the best way to hardcore subtitles into a movie while 
> staying as close as possible to his original size and settings i tried 
> this command:
> ffmpeg -i 1.mp4 -vf "subtitles=1.srt:force_style='FontName=Droid Naskh 
> Shift Alt,Fontsize=21'" -c:a copy "output.mp4"

Always show the complete console output with your command. It will provide helpful info.

> but my 770mb movie goes to 1.3gb which is too much
> even though i tried another movie and went from 750 to 800 mb which is good
> but now allot of movies are getting x2 the size any help lease :)

Re-encoding from a lossy input will often result in a bigger file size. There are many reasons for this. For example, the input may have been encoded efficiently (this could be determined by the format, encoder implementation, options used, etc). Secondly, lossy encoding introduces artifacts that become part of the video. When re-encoding a lossy input the encoder will attempt to preserve details including these artifacts which can be detrimental for encoding efficiency resulting in a comparatively higher output file size.

Assuming you're using libx264 it by default tries to achieve a certain quality, so trying to guess the output file size is not possible until you do it. However, you can use two-passes if you need to target a specific output file size. Use the slowest -preset (default is "medium") you have patience for. See:

You may also consider using "-c:v libx265" but it is much slower and HEVC may not be supported by your playback device.

Alternatively, use softsubs to avoid re-encoding video. Consider outputting to MKV if your player supports it as MP4 is a poor choice for softsubs.

More information about the ffmpeg-user mailing list