While this introduces some code duplicates, it seems to be the easy way without rewriting the whole example.
max_bit_rate()