Added video writing capabilities