0

I'm trying to use ffmpeg to encode some videos with h264. I'm trying to hit a target filesize.

My code is:

D:\SOFTWARE\ffmpeg\bin\test\ffmpeg.exe -i "%~1" -c:v libx264 -preset veryslow -b:v 200k -an "%~n1.mp4"

The video is 15 seconds long.

So I've read that my filesize should be 200 x 15 (bitrate x duration). But it's not. The filesize is 400kb, when it should be 3000kb.

What gives?

Supercreature
  • 441
  • 6
  • 25
  • There are difference in bits and bytes. 8bit = 1byte. Bitrate in bits, filesize in bytes. So to achieve exactly what you need multiply bitrate by 8 – uaBArt Jun 16 '19 at 05:14

1 Answers1

1

It's bitrate, so 200k == 25kb. File sizes are shown in bytes.

Gyan
  • 85,394
  • 9
  • 169
  • 201