> AVCodecContext->max_bitrate * (duration_in_secs / 8) [ bytes ] Are you sure about this? What if I encode only random noise? Does max_bitrate take this into account as I would expect that you'll have something like: upper_bound_in_bytes = input_in_bytes + encoder_overhead_in_bytes Best, P