Machine learning in video generation