Table of Contents

ffmpeg - Video bit rate

Get the bitrate of a video

ffprobe "0.mkv" 2>&1 | grep -E "bitrate|Video:"

returns:

  Duration: 00:23:30.34, start: 0.000000, bitrate: 4115 kb/s
  Stream #0:0(eng): Video: av1 (Main), yuv420p(tv, bt709/unknown/unknown, progressive), 1920x1080, SAR 1:1 DAR 16:9, 23.98 fps, 23.98 tbr, 1k tbn (default)

Set the bitrate of a video

To keep the same image details use the following formula to calculate the output video bit rate:

-b:v value = input_file_size_KB / duration_sec / 100

Example

460520KB / 120sec / 100 = 38.37

result:

-b:v 38M