Error when running local video conversion (index -100001 )

#4
by wirelessguyNY - opened

I tried the photo conversion with both models and had OK results.

I tired two different short videos but both failed with the following error:

IndexError: index -100001 is out of bounds for axis 0 with size 0

I did check the requirements and all of my python packages are at least the minimum shown versions.

Thoughts?

In case it's helpful, here's the traceback given:

File "C:\Users\xxaaa\AppData\Local\Programs\Python\Python310\lib\site-packages\streamlit\runtime\scriptrunner\script_runner.py", line 552, in _run_script
exec(code, module.dict)
File "D:\Color\image-video-colorization\01_๐Ÿ“ผ_Upload_Video_File.py", line 135, in
main()
File "D:\Color\image-video-colorization\01_๐Ÿ“ผ_Upload_Video_File.py", line 116, in main
clip.write_videofile(converted_filename, codec="libx264")
File "", line 2, in write_videofile
File "C:\Users\xxaaa\AppData\Local\Programs\Python\Python310\lib\site-packages\moviepy\decorators.py", line 54, in requires_duration
return f(clip, *a, **k)
File "", line 2, in write_videofile
File "C:\Users\xxaaa\AppData\Local\Programs\Python\Python310\lib\site-packages\moviepy\decorators.py", line 135, in use_clip_fps_by_default
return f(clip, *new_a, **new_kw)
File "", line 2, in write_videofile
File "C:\Users\xxaaa\AppData\Local\Programs\Python\Python310\lib\site-packages\moviepy\decorators.py", line 22, in convert_masks_to_RGB
return f(clip, *a, **k)
File "C:\Users\xxaaa\AppData\Local\Programs\Python\Python310\lib\site-packages\moviepy\video\VideoClip.py", line 293, in write_videofile
self.audio.write_audiofile(audiofile, audio_fps,
File "", line 2, in write_audiofile
File "C:\Users\xxaaa\AppData\Local\Programs\Python\Python310\lib\site-packages\moviepy\decorators.py", line 54, in requires_duration
return f(clip, *a, **k)
File "C:\Users\xxaaa\AppData\Local\Programs\Python\Python310\lib\site-packages\moviepy\audio\AudioClip.py", line 206, in write_audiofile
return ffmpeg_audiowrite(self, filename, fps, nbytes, buffersize,
File "", line 2, in ffmpeg_audiowrite
File "C:\Users\xxaaa\AppData\Local\Programs\Python\Python310\lib\site-packages\moviepy\decorators.py", line 54, in requires_duration
return f(clip, *a, **k)
File "C:\Users\xxaaa\AppData\Local\Programs\Python\Python310\lib\site-packages\moviepy\audio\io\ffmpeg_audiowriter.py", line 166, in ffmpeg_audiowrite
for chunk in clip.iter_chunks(chunksize=buffersize,
File "C:\Users\xxaaa\AppData\Local\Programs\Python\Python310\lib\site-packages\moviepy\audio\AudioClip.py", line 85, in iter_chunks
yield self.to_soundarray(tt, nbytes=nbytes, quantize=quantize,
File "", line 2, in to_soundarray
File "C:\Users\xxaaa\AppData\Local\Programs\Python\Python310\lib\site-packages\moviepy\decorators.py", line 54, in requires_duration
return f(clip, *a, **k)
File "C:\Users\xxaaa\AppData\Local\Programs\Python\Python310\lib\site-packages\moviepy\audio\AudioClip.py", line 127, in to_soundarray
snd_array = self.get_frame(tt)
File "", line 2, in get_frame
File "C:\Users\xxaaa\AppData\Local\Programs\Python\Python310\lib\site-packages\moviepy\decorators.py", line 89, in wrapper
return f(*new_a, **new_kw)
File "C:\Users\xxaaa\AppData\Local\Programs\Python\Python310\lib\site-packages\moviepy\Clip.py", line 93, in get_frame
return self.make_frame(t)
File "C:\Users\xxaaa\AppData\Local\Programs\Python\Python310\lib\site-packages\moviepy\audio\io\AudioFileClip.py", line 77, in
self.make_frame = lambda t: self.reader.get_frame(t)
File "C:\Users\xxaaa\AppData\Local\Programs\Python\Python310\lib\site-packages\moviepy\audio\io\readers.py", line 205, in get_frame
result[in_time] = self.buffer[indices]

Sign up or log in to comment