Script based on ffmpeg library