Use rc_max_rate in av_find_best_stream() if bitrate == 0.