work for ffmpeg mode