I converted the video to avi using the following ffmpeg command: ffmpeg -i input.mp4 -c:v libxvid output.avi. It works fine now. Many thanks for the help!