Replace ffmpeg with libmagic.