added error handling to ffmpeg