ffmpeg engine script for encoding