updated script. working but with various ffmpeg issues