transcode: add some comments
transcode: small refactor
avcodec: just set timestamp at beginning of block

It's used only to calculate timestamps if block needs to be divided into
multiple frames and not in overall timestamp keeping.
transcode: assume user requests visible width/height so init those instead of with/height
transcode: cosmetic
transcode: initialize audio encoder after first packet arrives

Similar approach as video encoding does, helps for example with faad
module that in some cases only gets proper audio properties on decoding.

Ref #9022,#6298
Revert "faad: try to guess channel count if we can, and don't set it to 0 in Open"

This reverts commit c2e4f7c67765ab9ef464f4e320128056133d5f3a.