refactor and bug fix ffmpeg warning check