You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I come to rescue this FFMPEG error from the broken pipe, because I have noticed when I have been doing tests and deployments that the error occurs at a certain memory usage of the system, the initial system I have is 8GB of RAM and if I pass the 6.5GB of use it throws this same error:
Moviepy - Building video /tmp/output/video.mp4.
MoviePy - Writing audio in /tmp/output/temp-audio.mp3
MoviePy - Done.
Moviepy - Writing video /tmp/output/video.mp4
t: 8%|███████████▏ | 48/624 [00:06<06:34, 1.46it/s, now=None]Traceback (most recent call last):
File "/usr/local/lib/python3.10/dist-packages/moviepy/video/io/ffmpeg_writer.py", line 136, in write_frame
self.proc.stdin.write(img_array.tobytes())
BrokenPipeError: [Errno 32] Broken pipe
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/srv/yt1/lambda_function.py", line 424, in
lambda_handler("", "")
File "/srv/yt1/lambda_function.py", line 422, in lambda_handler
cm.CreateMP4(upload_to_yt)
File "/srv/yt1/lambda_function.py", line 371, in CreateMP4
f1.write_videofile(file, fps = 24 , temp_audiofile=os.path.join(DIR_PATH_OUTPUT, 'temp-audio.mp3' ))
File "", line 2, in write_videofile
File "/usr/local/lib/python3.10/dist-packages/moviepy/decorators.py", line 54, in requires_duration
return f(clip, *a, **k)
File "", line 2, in write_videofile
File "/usr/local/lib/python3.10/dist-packages/moviepy/decorators.py", line 135, in use_clip_fps_by_default
return f(clip, *new_a, **new_kw)
File "", line 2, in write_videofile
File "/usr/local/lib/python3.10/dist-packages/moviepy/decorators.py", line 22, in convert_masks_to_RGB
return f(clip, *a, **k)
File "/usr/local/lib/python3.10/dist-packages/moviepy/video/VideoClip.py", line 300, in write_videofile
ffmpeg_write_video(self, filename, fps, codec,
File "/usr/local/lib/python3.10/dist-packages/moviepy/video/io/ffmpeg_writer.py", line 228, in ffmpeg_write_video
writer.write_frame(frame)
File "/usr/local/lib/python3.10/dist-packages/moviepy/video/io/ffmpeg_writer.py", line 180, in write_frame
raise IOError(error)
OSError: [Errno 32] Broken pipe
MoviePy error: FFMPEG encountered the following error while writing file /tmp/output/video.mp4
<!-- Please include code that demonstrates this problem so that we can reproduce it. For advice on how to do this, see https://stackoverflow.com/help/mcve
It's higlhy helpfull if you can provide an exact and complete code reproducing the bug, *along with all necessary medias (videos, images, sounds, etc.).*
Ideally you should provide a functional code snippet that maintainers can run to investigate the bug.
And investigating a little more it turns out that the continuous use of final_video.write_videofile(
str(output_path),
fps=24,
threads=64,
codec='libx264',
audio_codec='aac',
)
The memory is not cleaned correctly to be able to make a continuous execution of my App, so I had to implement an automatic memory cleaning to avoid that, but sometimes I still get the same error because my cleaning functions are not sufficient.
-->
Used medias
Specifications
Python Version: 3.10.13
MoviePy Version: 2.1.2
Platform Name:
Platform Version:
The text was updated successfully, but these errors were encountered:
There should be no more broken pipes
There are still broken pipe errors
I come to rescue this FFMPEG error from the broken pipe, because I have noticed when I have been doing tests and deployments that the error occurs at a certain memory usage of the system, the initial system I have is 8GB of RAM and if I pass the 6.5GB of use it throws this same error:
And investigating a little more it turns out that the continuous use of final_video.write_videofile(
str(output_path),
fps=24,
threads=64,
codec='libx264',
audio_codec='aac',
)
The memory is not cleaned correctly to be able to make a continuous execution of my App, so I had to implement an automatic memory cleaning to avoid that, but sometimes I still get the same error because my cleaning functions are not sufficient.
-->
Used medias
Specifications
The text was updated successfully, but these errors were encountered: