pythontester192 / AI-Video-Generator-Using-OpenAI-Python

Python Bot That Generates Text About a Specific Topic you Want, & Generate Video Using OpenAI Model, GTTS, & MoviePy.
192 stars 66 forks source link

getting error when I run \video_generator.py #4

Open vishalspawar25 opened 1 year ago

vishalspawar25 commented 1 year ago

I am running below cmd after generating text. python .\video_generator.py I am getting below error. Can you suggest where I missed?

Generate New AI Image From Paragraph... The Generated Image Saved in Images Folder! The Paragraph Converted into VoiceOver & Saved in Audio Folder! Extract voiceover and get duration... Extract Image Clip and Set Duration... Customize The Text Clip... Traceback (most recent call last): File "C:\Users\VishalPawar\AppData\Roaming\Python\Python310\site-packages\moviepy\video\VideoClip.py", line 1137, in init subprocess_call(cmd, logger=None) File "C:\Users\VishalPawar\AppData\Roaming\Python\Python310\site-packages\moviepy\tools.py", line 46, in subprocess_call
proc = sp.Popen(cmd, **popen_params) File "C:\Program Files\Python310\lib\subprocess.py", line 966, in init self._execute_child(args, executable, preexec_fn, close_fds, File "C:\Program Files\Python310\lib\subprocess.py", line 1435, in _execute_child hp, ht, pid, tid = _winapi.CreateProcess(executable, args, FileNotFoundError: [WinError 2] The system cannot find the file specified

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "C:\BC\Gen AI\AI-Video-Generator-Using-OpenAI-Python-main\video_generator.py", line 52, in text_clip = TextClip(para, fontsize=50, color="white") File "C:\Users\VishalPawar\AppData\Roaming\Python\Python310\site-packages\moviepy\video\VideoClip.py", line 1146, in init raise IOError(error) OSError: MoviePy Error: creation of None failed because of the following error:

[WinError 2] The system cannot find the file specified.

.This error can be due to the fact that ImageMagick is not installed on your computer, or (for Windows users) that you didn't specify the path to the ImageMagick binary in file conf.py, or that the path you specified is incorrect PS C:\BC\Gen AI\AI-Video-Generator-Using-OpenAI-Python-main>

singhjagtar0290 commented 1 year ago

1.Un-Install the ImageMagick

  1. Install the ImageMagick - https://imagemagick.org/script/download.php
  2. When installing install legacies also - https://stackoverflow.com/questions/51928807/moviepy-cant-detect-imagemagick-binary-on-windows

I was also facing the same issue but after re-installing it was fixed