RayVentura / ShortGPT

๐Ÿš€๐ŸŽฌ ShortGPT - Experimental AI framework for youtube shorts / tiktok channel automation
https://shortx.ai/?ref=sgpt
Other
5.35k stars 663 forks source link

๐Ÿ› [Bug]: MoviePy error: failed to read the duration of file %s.\n #53

Open lilinrestart opened 1 year ago

lilinrestart commented 1 year ago

What happened?

Follow the example to run

Step 9 _editAndRenderShort Error File "/home/ecs-user/shortgpt/gui/video_automation_ui.py", line 95, in respond video_path = makeVideo(script, language.value, isVertical, progress=progress) File "/home/ecs-user/shortgpt/gui/video_automation_ui.py", line 46, in makeVideo for step_num, step_info in shortEngine.makeContent(): File "/home/ecs-user/shortgpt/shortGPT/engine/abstract_content_engine.py", line 72, in makeContent self.stepDict[currentStep]() File "/home/ecs-user/shortgpt/shortGPT/engine/content_video_engine.py", line 139, in _editAndRenderShort videoEditor.renderVideo(outputPath, logger=self.logger) File "/home/ecs-user/shortgpt/shortGPT/editing_framework/editing_engine.py", line 95, in renderVideo engine.generate_video(self.schema, outputPath, logger=logger) File "/home/ecs-user/shortgpt/shortGPT/editing_framework/core_editing_engine.py", line 53, in generate_video clip = self.process_video_asset(asset) File "/home/ecs-user/shortgpt/shortGPT/editing_framework/core_editing_engine.py", line 200, in process_video_asset clip = VideoFileClip(**params) File "/home/ecs-user/.local/lib/python3.10/site-packages/moviepy/video/io/VideoFileClip.py", line 88, in init self.reader = FFMPEG_VideoReader(filename, pix_fmt=pix_fmt, File "/home/ecs-user/.local/lib/python3.10/site-packages/moviepy/video/io/ffmpeg_reader.py", line 35, in init infos = ffmpeg_parse_infos(filename, print_infos, check_duration, File "/home/ecs-user/.local/lib/python3.10/site-packages/moviepy/video/io/ffmpeg_reader.py", line 289, in ffmpeg_parse_infos raise IOError(("MoviePy error: failed to read the duration of file %s.\n"

What type of browser are you seeing the problem on?

Chrome

What type of Operating System are you seeing the problem on?

Linux

Python Version

python 3.10

Application Version

V0.0.15

Expected Behavior

Get a generated video

Error Message

Error   File "/home/ecs-user/shortgpt/gui/video_automation_ui.py", line 95, in respond
    video_path = makeVideo(script, language.value, isVertical, progress=progress)
  File "/home/ecs-user/shortgpt/gui/video_automation_ui.py", line 46, in makeVideo
    for step_num, step_info in shortEngine.makeContent():
  File "/home/ecs-user/shortgpt/shortGPT/engine/abstract_content_engine.py", line 72, in makeContent
    self.stepDict[currentStep]()
  File "/home/ecs-user/shortgpt/shortGPT/engine/content_video_engine.py", line 139, in _editAndRenderShort
    videoEditor.renderVideo(outputPath, logger=self.logger)
  File "/home/ecs-user/shortgpt/shortGPT/editing_framework/editing_engine.py", line 95, in renderVideo
    engine.generate_video(self.schema, outputPath, logger=logger)
  File "/home/ecs-user/shortgpt/shortGPT/editing_framework/core_editing_engine.py", line 53, in generate_video
    clip = self.process_video_asset(asset)
  File "/home/ecs-user/shortgpt/shortGPT/editing_framework/core_editing_engine.py", line 200, in process_video_asset
    clip = VideoFileClip(**params)
  File "/home/ecs-user/.local/lib/python3.10/site-packages/moviepy/video/io/VideoFileClip.py", line 88, in __init__
    self.reader = FFMPEG_VideoReader(filename, pix_fmt=pix_fmt,
  File "/home/ecs-user/.local/lib/python3.10/site-packages/moviepy/video/io/ffmpeg_reader.py", line 35, in __init__
    infos = ffmpeg_parse_infos(filename, print_infos, check_duration,
  File "/home/ecs-user/.local/lib/python3.10/site-packages/moviepy/video/io/ffmpeg_reader.py", line 289, in ffmpeg_parse_infos
    raise IOError(("MoviePy error: failed to read the duration of file %s.\n"

^CKeyboard interruption in main thread... closing server.

Code to produce this issue.

No response

Screenshots/Assets/Relevant links

No response

sunupup commented 11 months ago

me too

acarrothers commented 11 months ago

Also have the same issue

KalvinThien commented 9 months ago

Has anyone fixed this error? Can you help me? @sunupup @acarrothers @lilinrestart @deftio @Erim32 thanks you