Added custom image checking for ffmpeg