Fix #1598 #1599 : Fix support for portrait videos.