improve ffmpeg integration