TODO: native support for encoding (rid of OpenCV API for video writing)