Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

convert_video2gif function error #251

Open
joseph16388 opened this issue Nov 21, 2023 · 0 comments
Open

convert_video2gif function error #251

joseph16388 opened this issue Nov 21, 2023 · 0 comments

Comments

@joseph16388
Copy link

When I run to :
def convert_video2gif(video_path, output_gif_path, num_samples=16):
p = (
pipe.input('video_path')
.map('video_path', 'video_frames',
ops.video_decode.ffmpeg(sample_type='uniform_temporal_subsample', args={'num_samples': num_samples}))
.output('video_frames')
)
frames = p(video_path).to_list()[0][0]
imgs = [Image.fromarray(frame) for frame in frames]
imgs[0].save(fp=output_gif_path, format='GIF', append_images=imgs[1:], save_all=True, loop=0)

There is an error: 

raise RuntimeError(node.err_msg)
RuntimeError: Node-video-decode/ffmpeg-0 runs failed, error msg: Create video-decode/ffmpeg-0 operator video-decode/ffmpeg:main with args None and kws {'sample_type': 'uniform_temporal_subsample', 'args': {'num_samples': 16}} failed, err: Load operator failed, Traceback (most recent call last):

In this place:
https://github.com/towhee-io/examples/blob/main/video/text_video_retrieval/1_text_video_retrieval_engine.ipynb

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant