emkademy / jumpcutter

Automatically jump-cut silent parts of your videos using Python
MIT License
135 stars 23 forks source link

Error running script #30

Open johneloi opened 2 months ago

johneloi commented 2 months ago

Hi! I found this error when I run the code: C:\jumpcutter\ARABE_jumpcutter_master>jumpcutter -i input.mkv -o output.mp4 -m 0.05 -d 1.0 -f 0.2 -s 0.2 -x 2000 -c both Running with the arguments: Namespace(input=WindowsPath('input.mkv'), output=WindowsPath('output.mp4'), cut='both', magnitude_threshold_ratio=0.05, duration_threshold=1.0, failure_tolerance_ratio=0.2, space_on_edges=0.2, silence_part_speed=2000, min_loud_part_duration=-1, codec=None, bitrate=None)

Traceback (most recent call last): File "", line 198, in _run_module_as_main File "", line 88, in _run_code File "C:\Users\johne\AppData\Local\Programs\Python\Python312\Scripts\jumpcutter.exe__main.py", line 7, in File "C:\Users\johne\AppData\Local\Programs\Python\Python312\Lib\site-packages\jumpcutter\main.py", line 115, in main clip = Clip(str(input_path), args.min_loud_part_duration, args.silence_part_speed) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\johne\AppData\Local\Programs\Python\Python312\Lib\site-packages\jumpcutter\clip.py", line 11, in init self.audio = Audio(self.clip.audio) ^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\johne\AppData\Local\Programs\Python\Python312\Lib\site-packages\jumpcutter\clip.py", line 81, in init__ self.signal = self.audio.to_soundarray() ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "", line 2, in to_soundarray File "C:\Users\johne\AppData\Local\Programs\Python\Python312\Lib\site-packages\moviepy\decorators.py", line 54, in requires_duration return f(clip, *a, **k) ^^^^^^^^^^^^^^^^ File "C:\Users\johne\AppData\Local\Programs\Python\Python312\Lib\site-packages\moviepy\audio\AudioClip.py", line 113, in to_soundarray return stacker(self.iter_chunks(fps=fps, quantize=quantize, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\johne\AppData\Local\Programs\Python\Python312\Lib\site-packages\numpy_core\shape_base.py", line 218, in _vhstack_dispatcher return _arrays_for_stack_dispatcher(tup) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\johne\AppData\Local\Programs\Python\Python312\Lib\site-packages\numpy_core\shape_base.py", line 211, in _arrays_for_stack_dispatcher raise TypeError('arrays to stack must be passed as a "sequence" type ' TypeError: arrays to stack must be passed as a "sequence" type such as list or tuple.

johneloi commented 2 months ago

entered Command: jumpcutter -i input.mkv -o output.mp4 -m 0.05 -d 1.0 -f 0.2 -s 0.2 -x 2000 -c both

gustawdaniel commented 1 month ago

There is similar problem: https://stackoverflow.com/questions/62703814/futurewarning-arrays-to-stack-must-be-passed-as-a-sequence-type-such-as-list

There is issue with the same problem: https://github.com/emkademy/jumpcutter/issues/26

my numpy version

numpy                   2.1.1
gustawdaniel commented 1 month ago

Potentially these problems can be connected with old https://zulko.github.io/moviepy/ version, 1.0.3 but 2.0.0 is not released officially yet.

https://github.com/Zulko/moviepy/pull/2024

There is releases history: https://pypi.org/project/moviepy/#history

gustawdaniel commented 1 month ago

version of moviepy was ok, i fixed in https://github.com/emkademy/jumpcutter/pull/31 thanks to https://github.com/Zulko/moviepy/issues/2025#issuecomment-1767953504