Add ffmpeg optimization