harry0703 / MoneyPrinterTurbo

利用AI大模型,一键生成高清短视频 Generate short videos with one click using AI LLM.
MIT License
18.34k stars 2.82k forks source link

生成视频失败啥情况? #383

Closed fuxin-mail closed 6 months ago

fuxin-mail commented 6 months ago

2024-05-24 19:16:59.056 | INFO | main::633 - 开始生成视频

2024-05-24 19:16:59.058 | INFO | main::634 - { "video_subject": "", "video_script": "他只想知道,还会有谁,能够陪伴着他,又有谁会对他说,没事,有我在", "video_terms": "", "video_aspect": "9:16", "video_concat_mode": "random", "video_clip_duration": 3, "video_count": 1, "video_source": "pexels", "video_materials": null, "video_language": "", "voice_name": "zh-CN-XiaoxiaoNeural-Female", "voice_volume": 1.0, "bgm_type": "random", "bgm_file": "", "bgm_volume": 0.2, "subtitle_enabled": true, "subtitle_position": "bottom", "font_name": "MicrosoftYaHeiBold.ttc", "text_fore_color": "#FFFFFF", "text_background_color": "transparent", "font_size": 60, "stroke_color": "#000000", "stroke_width": 1.5, "n_threads": 2, "paragraph_number": 1 }

2024-05-24 19:16:59.065 | INFO | app.services.task:start:30 - start task: a5916059-80ac-43d2-91e6-4ca1312d7a6d

2024-05-24 19:16:59.066 | INFO | app.services.task:start:39 -

generating video script

2024-05-24 19:16:59.068 | DEBUG | app.services.task:start:45 - video script: 他只想知道,还会有谁,能够陪伴着他,又有谁会对他说,没事,有我在

2024-05-24 19:16:59.069 | INFO | app.services.task:start:54 -

generating video terms

2024-05-24 19:16:59.073 | INFO | app.services.llm:generate_terms:295 - subject:

2024-05-24 19:16:59.074 | INFO | app.services.llm:_generate_response:18 - llm provider: qwen

2024-05-24 19:17:00.142 | WARNING | app.services.llm:generate_terms:308 - failed to generate video terms: [qwen] returned an error response: "{"status_code": 401, "request_id": "025f3777-d0e1-9ffb-a614-87401772302f", "code": "InvalidApiKey", "message": "Invalid API-key provided.", "output": null, "usage": null}"

2024-05-24 19:17:00.147 | WARNING | app.services.llm:generate_terms:321 - failed to generate video terms, trying again... 1

2024-05-24 19:17:00.151 | INFO | app.services.llm:_generate_response:18 - llm provider: qwen

2024-05-24 19:17:00.912 | WARNING | app.services.llm:generate_terms:308 - failed to generate video terms: [qwen] returned an error response: "{"status_code": 401, "request_id": "1e10a131-dbe8-9666-a071-275f736b29e5", "code": "InvalidApiKey", "message": "Invalid API-key provided.", "output": null, "usage": null}"

2024-05-24 19:17:00.918 | WARNING | app.services.llm:generate_terms:321 - failed to generate video terms, trying again... 2

2024-05-24 19:17:00.920 | INFO | app.services.llm:_generate_response:18 - llm provider: qwen

2024-05-24 19:17:01.593 | WARNING | app.services.llm:generate_terms:308 - failed to generate video terms: [qwen] returned an error response: "{"status_code": 401, "request_id": "d91c1876-4c33-97f0-9e51-2fe71c90014c", "code": "InvalidApiKey", "message": "Invalid API-key provided.", "output": null, "usage": null}"

2024-05-24 19:17:01.597 | WARNING | app.services.llm:generate_terms:321 - failed to generate video terms, trying again... 3

2024-05-24 19:17:01.598 | INFO | app.services.llm:_generate_response:18 - llm provider: qwen

2024-05-24 19:17:02.303 | WARNING | app.services.llm:generate_terms:308 - failed to generate video terms: [qwen] returned an error response: "{"status_code": 401, "request_id": "0d4667b9-c744-9950-a8b5-7b9997177ed1", "code": "InvalidApiKey", "message": "Invalid API-key provided.", "output": null, "usage": null}"

2024-05-24 19:17:02.305 | WARNING | app.services.llm:generate_terms:321 - failed to generate video terms, trying again... 4

2024-05-24 19:17:02.307 | INFO | app.services.llm:_generate_response:18 - llm provider: qwen

2024-05-24 19:17:02.973 | WARNING | app.services.llm:generate_terms:308 - failed to generate video terms: [qwen] returned an error response: "{"status_code": 401, "request_id": "d76f15d2-1ad0-9c72-ad84-8155885b4143", "code": "InvalidApiKey", "message": "Invalid API-key provided.", "output": null, "usage": null}"

2024-05-24 19:17:02.977 | WARNING | app.services.llm:generate_terms:321 - failed to generate video terms, trying again... 5

2024-05-24 19:17:02.981 | SUCCESS | app.services.llm:generate_terms:323 - completed: []

2024-05-24 19:17:02.986 | ERROR | app.services.task:start:70 - failed to generate video terms.

2024-05-24 19:17:02.989 | ERROR | main::640 - 视频生成失败

harry0703 commented 6 months ago

这个是 千问模型返回了401错误,请检查你的API KEY是否正确

failed to generate video terms: [qwen] returned an error response: "{"status_code": 401, "request_id": "025f3777-d0e1-9ffb-a614-87401772302f", "code": "InvalidApiKey", "message": "Invalid API-key provided.", "output": null, "usage": null}"
fuxin-mail commented 6 months ago

这个是 千问模型返回了401错误,请检查你的API KEY是否正确

failed to generate video terms: [qwen] returned an error response: "{"status_code": 401, "request_id": "025f3777-d0e1-9ffb-a614-87401772302f", "code": "InvalidApiKey", "message": "Invalid API-key provided.", "output": null, "usage": null}"

OSError: MoviePy Error: creation of None failed because of the following error: magick.exe: unable to read font `F:/下载/MoneyPrinterTurbo-Portable-Windows-1.1.9/MoneyPrinterTurbo/resource/fonts/MicrosoftYaHeiBold.ttc (invalid stream operation)' @ error/annotate.c/RenderFreetype/1654. . .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. Check the documentation. Traceback: File "F:\下载\MoneyPrinterTurbo-Portable-Windows-1.1.9\lib\python\lib\site-packages\streamlit\runtime\scriptrunner\script_runner.py", line 584, in _run_script exec(code, module.dict) File "F:\下载\MoneyPrinterTurbo-Portable-Windows-1.1.9\MoneyPrinterTurbo\webui\Main.py", line 637, in result = tm.start(task_id=task_id, params=params) File "F:\下载\MoneyPrinterTurbo-Portable-Windows-1.1.9\MoneyPrinterTurbo\app\services\task.py", line 184, in start video.generate_video(video_path=combined_video_path, File "F:\下载\MoneyPrinterTurbo-Portable-Windows-1.1.9\MoneyPrinterTurbo\app\services\video.py", line 260, in generate_video clip = create_text_clip(subtitle_item=item) File "F:\下载\MoneyPrinterTurbo-Portable-Windows-1.1.9\MoneyPrinterTurbo\app\services\video.py", line 231, in create_text_clip _clip = TextClip( File "", line 2, in init File "F:\下载\MoneyPrinterTurbo-Portable-Windows-1.1.9\lib\python\lib\site-packages\moviepy\decorators.py", line 89, in wrapper return f(*new_a, **new_kw) File "F:\下载\MoneyPrinterTurbo-Portable-Windows-1.1.9\lib\python\lib\site-packages\moviepy\video\VideoClip.py", line 1272, in init raise IOError(error)

harry0703 commented 6 months ago

不要放在中文文件夹下面(F:\下载\MoneyPrinterTurbo-Portable-Windows-1.1.9),换一个英文的。

fuxin-mail commented 6 months ago

不要放在中文文件夹下面(F:\下载\MoneyPrinterTurbo-Portable-Windows-1.1.9),换一个英文的。

2024-05-27 21:52:36.162 | INFO | main::633 - 开始生成视频

2024-05-27 21:52:36.167 | INFO | main::634 - { "video_subject": "", "video_script": "一个人,夜晚独自走在路灯下", "video_terms": "", "video_aspect": "9:16", "video_concat_mode": "random", "video_clip_duration": 3, "video_count": 1, "video_source": "pexels", "video_materials": null, "video_language": "", "voice_name": "zh-CN-XiaoxiaoNeural-Female", "voice_volume": 1.0, "bgm_type": "random", "bgm_file": "", "bgm_volume": 0.2, "subtitle_enabled": true, "subtitle_position": "bottom", "font_name": "MicrosoftYaHeiBold.ttc", "text_fore_color": "#FFFFFF", "text_background_color": "transparent", "font_size": 60, "stroke_color": "#000000", "stroke_width": 1.5, "n_threads": 2, "paragraph_number": 1 }

2024-05-27 21:52:36.211 | INFO | app.services.task:start:30 - start task: 28b454a1-b797-47ad-b464-0111bdbd6627

2024-05-27 21:52:36.222 | INFO | app.services.task:start:39 -

generating video script

2024-05-27 21:52:36.228 | DEBUG | app.services.task:start:45 - video script: 一个人,夜晚独自走在路灯下

2024-05-27 21:52:36.237 | INFO | app.services.task:start:54 -

generating video terms

2024-05-27 21:52:36.246 | INFO | app.services.llm:generate_terms:295 - subject:

2024-05-27 21:52:36.254 | INFO | app.services.llm:_generate_response:18 - llm provider: qwen

2024-05-27 21:52:39.284 | SUCCESS | app.services.llm:generate_terms:323 - completed: ['night walk', 'solitary figure', 'street lamp', 'evening stroll', 'lonely night scene']

2024-05-27 21:52:39.292 | INFO | app.services.task:start:85 -

generating audio

2024-05-27 21:52:39.301 | INFO | app.services.voice:azure_tts_v1:1042 - start, voice name: zh-CN-XiaoxiaoNeural, try: 1

2024-05-27 21:52:41.995 | INFO | app.services.voice:azure_tts_v1:1060 - completed, output file: .\storage\tasks\28b454a1-b797-47ad-b464-0111bdbd6627\audio.mp3

2024-05-27 21:52:42.003 | INFO | app.services.task:start:107 -

generating subtitle, provider: edge

2024-05-27 21:52:42.017 | INFO | app.services.voice:create_subtitle:1232 - completed, subtitle file created: .\storage\tasks\28b454a1-b797-47ad-b464-0111bdbd6627\subtitle.srt, duration: 2.788

2024-05-27 21:52:42.023 | INFO | app.services.task:start:141 -

downloading videos from pexels

2024-05-27 21:52:42.032 | INFO | app.services.material:search_videos_pexels:51 - searching videos: https://api.pexels.com/videos/search?query=night+walk&per_page=20&orientation=portrait, with proxies: {}

2024-05-27 21:52:43.501 | ERROR | app.services.material:search_videos_pexels:58 - search videos failed: {'status': 401, 'code': 'Unauthorized'}

2024-05-27 21:52:43.510 | INFO | app.services.material:download_videos:196 - found 0 videos for 'night walk'

2024-05-27 21:52:43.515 | INFO | app.services.material:search_videos_pexels:51 - searching videos: https://api.pexels.com/videos/search?query=solitary+figure&per_page=20&orientation=portrait, with proxies: {}

2024-05-27 21:52:44.752 | ERROR | app.services.material:search_videos_pexels:58 - search videos failed: {'status': 401, 'code': 'Unauthorized'}

2024-05-27 21:52:44.760 | INFO | app.services.material:download_videos:196 - found 0 videos for 'solitary figure'

2024-05-27 21:52:44.766 | INFO | app.services.material:search_videos_pexels:51 - searching videos: https://api.pexels.com/videos/search?query=street+lamp&per_page=20&orientation=portrait, with proxies: {}

2024-05-27 21:52:46.123 | ERROR | app.services.material:search_videos_pexels:58 - search videos failed: {'status': 401, 'code': 'Unauthorized'}

2024-05-27 21:52:46.132 | INFO | app.services.material:download_videos:196 - found 0 videos for 'street lamp'

2024-05-27 21:52:46.138 | INFO | app.services.material:search_videos_pexels:51 - searching videos: https://api.pexels.com/videos/search?query=evening+stroll&per_page=20&orientation=portrait, with proxies: {}

2024-05-27 21:52:47.482 | ERROR | app.services.material:search_videos_pexels:58 - search videos failed: {'status': 401, 'code': 'Unauthorized'}

2024-05-27 21:52:47.492 | INFO | app.services.material:download_videos:196 - found 0 videos for 'evening stroll'

2024-05-27 21:52:47.498 | INFO | app.services.material:search_videos_pexels:51 - searching videos: https://api.pexels.com/videos/search?query=lonely+night+scene&per_page=20&orientation=portrait, with proxies: {}

2024-05-27 21:52:48.712 | ERROR | app.services.material:search_videos_pexels:58 - search videos failed: {'status': 401, 'code': 'Unauthorized'}

2024-05-27 21:52:48.722 | INFO | app.services.material:download_videos:196 - found 0 videos for 'lonely night scene'

2024-05-27 21:52:48.727 | INFO | app.services.material:download_videos:204 - found total videos: 0, required duration: 3 seconds, found duration: 0.0 seconds

2024-05-27 21:52:48.734 | SUCCESS | app.services.material:download_videos:232 - downloaded 0 videos

2024-05-27 21:52:48.742 | ERROR | app.services.task:start:152 - failed to download videos, maybe the network is not available. if you are in China, please use a VPN.

2024-05-27 21:52:48.748 | ERROR | main::640 - 视频生成失败

harry0703 commented 6 months ago
search videos failed: {'status': 401, 'code': 'Unauthorized'}

这个是你的 pexelsAPI KEY 有问题,填写正确的

Jiang8002000 commented 2 months ago

2024-09-02 12:50:54.296 | INFO | main::783 - 开始生成视频

2024-09-02 12:50:54.296 | INFO | main::784 - { "video_subject": "父母如何教导孩子学会拒绝", "video_script": "", "video_terms": "", "video_aspect": "9:16", "video_concat_mode": "random", "video_clip_duration": 3, "video_count": 1, "video_source": "pexels", "video_materials": null, "video_language": "zh-CN", "voice_name": "zh-CN-YunyangNeural-Male", "voice_volume": 1.0, "voice_rate": 1.0, "bgm_type": "random", "bgm_file": "", "bgm_volume": 0.2, "subtitle_enabled": true, "subtitle_position": "bottom", "custom_position": 70.0, "font_name": "MicrosoftYaHeiNormal.ttc", "text_fore_color": "#e4128f", "text_background_color": "transparent", "font_size": 60, "stroke_color": "#000000", "stroke_width": 1.5, "n_threads": 2, "paragraph_number": 1 }

2024-09-02 12:50:54.296 | INFO | app.services.task:start:210 - start task: 6f45e73f-f470-4578-a360-861b4e6ff532, stop_at: video

2024-09-02 12:50:54.296 | INFO | app.services.task:generate_script:18 -

generating video script

2024-09-02 12:50:54.296 | INFO | app.services.llm:generate_script:282 - subject: 父母如何教导孩子学会拒绝

2024-09-02 12:50:54.296 | INFO | app.services.llm:_generate_response:18 - llm provider: deepseek

2024-09-02 12:50:54.905 | ERROR | app.services.llm:generate_script:318 - failed to generate script: Error code: 402 - {'error': {'message': 'Insufficient Balance', 'type': 'unknown_error', 'param': None, 'code': 'invalid_request_error'}}

2024-09-02 12:50:54.905 | WARNING | app.services.llm:generate_script:321 - failed to generate video script, trying again... 1

2024-09-02 12:50:54.905 | INFO | app.services.llm:_generate_response:18 - llm provider: deepseek

2024-09-02 12:50:55.467 | ERROR | app.services.llm:generate_script:318 - failed to generate script: Error code: 402 - {'error': {'message': 'Insufficient Balance', 'type': 'unknown_error', 'param': None, 'code': 'invalid_request_error'}}

2024-09-02 12:50:55.467 | WARNING | app.services.llm:generate_script:321 - failed to generate video script, trying again... 2

2024-09-02 12:50:55.483 | INFO | app.services.llm:_generate_response:18 - llm provider: deepseek

2024-09-02 12:50:56.061 | ERROR | app.services.llm:generate_script:318 - failed to generate script: Error code: 402 - {'error': {'message': 'Insufficient Balance', 'type': 'unknown_error', 'param': None, 'code': 'invalid_request_error'}}

2024-09-02 12:50:56.061 | WARNING | app.services.llm:generate_script:321 - failed to generate video script, trying again... 3

2024-09-02 12:50:56.061 | INFO | app.services.llm:_generate_response:18 - llm provider: deepseek

2024-09-02 12:50:56.623 | ERROR | app.services.llm:generate_script:318 - failed to generate script: Error code: 402 - {'error': {'message': 'Insufficient Balance', 'type': 'unknown_error', 'param': None, 'code': 'invalid_request_error'}}

2024-09-02 12:50:56.623 | WARNING | app.services.llm:generate_script:321 - failed to generate video script, trying again... 4

2024-09-02 12:50:56.623 | INFO | app.services.llm:_generate_response:18 - llm provider: deepseek

2024-09-02 12:50:57.186 | ERROR | app.services.llm:generate_script:318 - failed to generate script: Error code: 402 - {'error': {'message': 'Insufficient Balance', 'type': 'unknown_error', 'param': None, 'code': 'invalid_request_error'}}

2024-09-02 12:50:57.186 | WARNING | app.services.llm:generate_script:321 - failed to generate video script, trying again... 5

2024-09-02 12:50:57.186 | SUCCESS | app.services.llm:generate_script:323 - completed:

2024-09-02 12:50:57.186 | ERROR | app.services.task:generate_script:31 - failed to generate video script.

2024-09-02 12:50:57.186 | ERROR | main::790 - 视频生成失败