when you upload something to gradio, it creates a temporary copy of the file and works with that, see https://www.gradio.app/docs/file#behavior so maybe it's just lack of disk space on your system partition?
However, I never tried the script with that many frames. And I also wouldn't recommend it because of color degradation that WILL happen over time.