avconv: factorize common code from new_*_stream()