get_duration
* get duration from VIDEO type * video get_duration unit test * fix Windows unit test: can't delete opened temp file
VIDEO
* get output format when saving to buffer * add unit tests for writing to file or stream with correct fmt * handle `to_format=None` * fix formatting