refine to support multiple ffmpeg version