Portal video generation code