harry0703/MoneyPrinterTurbo

同时生成两个视频都成功,但是最后会出现这个错误信息

duffercn opened this issue · 2 comments

2024-03-28 22:12:03 | INFO | "./app/services/video.py:39": combine_videos - max duration of audio: 55.75 seconds
2024-03-28 22:12:03 | INFO | "./app/services/video.py:43": combine_videos - each clip will be maximum 3 seconds long
2024-03-28 22:12:07 | INFO | "./app/services/video.py:83": combine_videos - resizing video to 1080 x 1920
2024-03-28 22:12:09 | INFO | "./app/services/video.py:83": combine_videos - resizing video to 1080 x 1920
2024-03-28 22:12:09 | INFO | "./app/services/video.py:83": combine_videos - resizing video to 1080 x 1920
2024-03-28 22:12:10 | INFO | "./app/services/video.py:83": combine_videos - resizing video to 1080 x 1920
2024-03-28 22:12:11.075 Uncaught app exception
Traceback (most recent call last):
File "/Users/ZhenLi/miniconda3/envs/MoneyPrinterTurbo/lib/python3.10/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 542, in _run_script
exec(code, module.dict)
File "/Users/ZhenLi/AI/MoneyPrinterTurbo/webui/Main.py", line 264, in
tm.start(task_id=task_id, params=cfg)
File "/Users/ZhenLi/AI/MoneyPrinterTurbo/app/services/task.py", line 139, in start
video.combine_videos(combined_video_path=combined_video_path,
File "/Users/ZhenLi/AI/MoneyPrinterTurbo/app/services/video.py", line 57, in combine_videos
clip = VideoFileClip(video_path).without_audio()
File "", line 2, in init
File "/Users/ZhenLi/miniconda3/envs/MoneyPrinterTurbo/lib/python3.10/site-packages/moviepy/decorators.py", line 89, in wrapper
return f(*new_a, **new_kw)
File "/Users/ZhenLi/miniconda3/envs/MoneyPrinterTurbo/lib/python3.10/site-packages/moviepy/video/io/VideoFileClip.py", line 141, in init
self.audio = AudioFileClip(
File "", line 2, in init
File "/Users/ZhenLi/miniconda3/envs/MoneyPrinterTurbo/lib/python3.10/site-packages/moviepy/decorators.py", line 89, in wrapper
return f(*new_a, **new_kw)
File "/Users/ZhenLi/miniconda3/envs/MoneyPrinterTurbo/lib/python3.10/site-packages/moviepy/audio/io/AudioFileClip.py", line 75, in init
self.reader = FFMPEG_AudioReader(
File "/Users/ZhenLi/miniconda3/envs/MoneyPrinterTurbo/lib/python3.10/site-packages/moviepy/audio/io/readers.py", line 60, in init
infos = ffmpeg_parse_infos(filename, decode_file=decode_file)
File "/Users/ZhenLi/miniconda3/envs/MoneyPrinterTurbo/lib/python3.10/site-packages/moviepy/video/io/ffmpeg_reader.py", line 308, in ffmpeg_parse_infos
proc = sp.Popen(cmd, **popen_params)
File "/Users/ZhenLi/miniconda3/envs/MoneyPrinterTurbo/lib/python3.10/subprocess.py", line 971, in init
self._execute_child(args, executable, preexec_fn, close_fds,
File "/Users/ZhenLi/miniconda3/envs/MoneyPrinterTurbo/lib/python3.10/subprocess.py", line 1762, in _execute_child
errpipe_read, errpipe_write = os.pipe()
OSError: [Errno 24] Too many open files

查看下当前限制

ulimit -n

如果过低,可以调高一些,比如

ulimit -n 10240

ulimit -n
输出256

懂了,谢谢!