updated video writing for linux