Autorotate video files in PHP with mediainfo and ffmpeg