add support for input audio/video sync
support choosing optimal video version