* Use avcodec_find_encoder_by_name to get requested codec
* Insert gap in pts values if buffering > 1 frame.
* Prebuffered packets are logged at level 2, other packets at level 3.