Set resolution and bitrate instead of width and height;
refactored code a bit.

Bitrates are roughly averaged from VLC's "Content bitrate" (in kb/s).
Not sure if these are correct (or set in the correct units, since the
documentation doesn't include any details.)