gradio icon indicating copy to clipboard operation
gradio copied to clipboard

Video Gallery Outputs

Open fffiloni opened this issue 2 years ago • 11 comments

[*] I have searched to see if a similar issue already exists. YES

Is your feature request related to a problem? Please describe.
NO

Describe the solution you'd like
I'd like to be able to display a list of videos outputs as a Gallery, that would work as the images gallery works, but for videos.

Additional context
Context: I made a PySceneDetect demo that can divide a video sequence into every shots it can detect. Link: Scene Edit Detection on HuggingFace I use the gr.List instead, and display an image Gallery for every first frame of each shot.

fffiloni avatar Sep 20 '22 06:09 fffiloni

Hey @fffiloni! We've now made it possible for Gradio users to create their own custom components -- meaning that you can write some Python and JavaScript (Svelte), and publish it as a Gradio component. You can use it in your own Gradio apps, or share it so that anyone can use it in their Gradio apps. Here are some examples of custom Gradio components:

You can see the source code for those components by clicking the "Files" icon and then clicking "src". The complete source code for the backend and frontend is visible. In particular, its very fast if you want to build off an existing component. We've put together a Guide: https://www.gradio.app/guides/five-minute-guide, and we're happy to help if you'd like to put together a custom component for this issue

abidlabs avatar Nov 07 '23 00:11 abidlabs

@fffiloni I published a video_gallery component using our new custom component workflow. Feel free to try it out (https://pypi.org/project/gradio-videogallery/)

dawoodkhan82 avatar Nov 13 '23 17:11 dawoodkhan82

@abidlabs After seeing how much thumbs up the original issue has, maybe we should add this functionality to core.

dawoodkhan82 avatar Nov 13 '23 17:11 dawoodkhan82

Instead of adding a new component, could we modify Gallery to accept images or videos or a combination?

abidlabs avatar Nov 13 '23 17:11 abidlabs

@abidlabs yeah for sure, wasn't clear but that's what I meant.

dawoodkhan82 avatar Nov 13 '23 17:11 dawoodkhan82

Let's do it

abidlabs avatar Nov 13 '23 17:11 abidlabs

yay 🎉

fffiloni avatar Nov 15 '23 17:11 fffiloni

I dropped a simple space to demonstrate the video gallery component, but as you can experiment here, it seems there is a conflict with the File component i use to drop some videos.

—› File component won't upload my files :( —› deactivating the videogallery component let the File input component work properly

fffiloni avatar Nov 16 '23 13:11 fffiloni

there's no logs *

fffiloni avatar Nov 16 '23 13:11 fffiloni

Let's do it

is the gr.Gallery() already supporting videos?

240db avatar May 27 '24 02:05 240db

is the gr.Gallery() already supporting videos?

Seems not supported yet

Lyken17 avatar Jun 11 '24 22:06 Lyken17