avconv: factor out initializing stream parameters for encoding