Closed onefish51 closed 2 years ago
what happens if you print frames ? it seems like something is going wrong upstream...
from add_texts_to_image_vertical
and video_frames[folder_name].append(video_frame)
, it's list(PIL.Image.Image)
when I add out_image = np.array(out_image)
in utils/edit_utils.py/def add_texts_to_image_vertical(texts, pivot_images)
before return out_image
, a new error occurred
File "edit_video.py", line 54, in main
_main(**config, config=config)
File "edit_video.py", line 137, in _main
imageio.mimwrite(os.path.join(folder_path, 'out.mp4'), frames, fps=18, output_params=['-vf', 'fps=25'])
File "/opt/conda/lib/python3.8/site-packages/imageio/core/functions.py", line 341, in mimwrite
writer.append_data(im)
File "/opt/conda/lib/python3.8/site-packages/imageio/core/format.py", line 492, in append_data
return self._append_data(im, total_meta)
File "/opt/conda/lib/python3.8/site-packages/imageio/plugins/ffmpeg.py", line 666, in _append_data
raise IOError(msg)
OSError: [Errno 32] Broken pipe
and ffmpeg version 4.3 Copyright (c) 2000-2020 the FFmpeg developers imageio in /opt/conda/lib/python3.8/site-packages (2.3.0) imageio-ffmpeg==0.4.2 in /opt/conda/lib/python3.8/site-packages (0.4.2)
@onefish51 I would guess that both issues are version issues, can you try to upgrade imageio and imageio-ffmpeg? The versions that I use are: imageio==2.16.0 imageio-ffmpeg==0.4.5
As for the numpy array/PIL image, I will test if it works well with numpy arrays and update it.
Successfully installed imageio-2.16.0 Successfully installed imageio-ffmpeg-0.4.5
and the error fixed! thanks!
So there is something wrong.