# Video : thumbnail

**URL:** <https://community.glideapps.com/t/video-thumbnail/31232>\
**Category:** Ask for Help\
**Tags:** custom-code\
**Created:** [September 1, 2021, 3:52pm UTC](https://community.glideapps.com/t/video-thumbnail/31232 "2021-09-01T15:52:07Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Manu.n](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/manu.n/32/11679_2.png) [@Manu.n](https://community.glideapps.com/u/Manu.n)\
**Post date:** [September 1, 2021, 3:52pm UTC](https://community.glideapps.com/t/video-thumbnail/31232/1 "2021-09-01T15:52:07Z")

</div>

thumbnail video  
Part 1: PROTOTYPE.  
Good at the request of @Robert_Petitto, I made a script to extract an image from a video.  
For the moment, it is not perfect, I have only done the tests with videos stored at glide! it seems that it does not work on other servers !!! ☹  
This is still a prototype, but if I have a little free time, I complete to have other possibilities.

You can choose the location of the capture, as well as the size of the image, even if with the default video values ​​the result is better. The return is an image.  
You don’t have to display the video, it was for the demo

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/7/f/7f0608fa5602028ff496d4ed204b98b06548d0ed.png)

Link YC  
[https://video-thumbnail-V1.manun2.repl.co](https://video-thumbnail-V1.manun2.repl.co)

Source

**UPDATE V1-1**  
attempt to integrate YouTube videos, use the Current Time field to define one of the 4 images available by YT with various resolutions (0, 1, 2, 3, low0, low1, low2, low3, medium0, medium1, medium2, medium3, high0, high1, high2, high3, max0, max1, max2, max3)

---

<div class="post-metadata">

**Author:** ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)\
**Post date:** [September 1, 2021, 3:57pm UTC](https://community.glideapps.com/t/video-thumbnail/31232/2 "2021-09-01T15:57:09Z")

</div>

Awesome! I definitely have a use for this!

---

<div class="post-metadata">

**Author:** ![Manu.n](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/manu.n/32/11679_2.png) [@Manu.n](https://community.glideapps.com/u/Manu.n)\
**Post date:** [September 1, 2021, 3:59pm UTC](https://community.glideapps.com/t/video-thumbnail/31232/3 "2021-09-01T15:59:33Z")

</div>

Yes @Jeff_Hager  
there are probably still (and still) bugs, give me a feedback if you encounter any difficulties, even if video is not my passion (I don’t like pixels) 😜

---

<div class="post-metadata">

**Author:** ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)\
**Post date:** [September 1, 2021, 4:02pm UTC](https://community.glideapps.com/t/video-thumbnail/31232/4 "2021-09-01T16:02:18Z")

</div>

I’ll try it out and let you know. I have a small collection of videos (5) in my app that were taken and uploaded from a phone, so we’ll see how well it works.

---

<div class="post-metadata">

**Author:** ![Manu.n](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/manu.n/32/11679_2.png) [@Manu.n](https://community.glideapps.com/u/Manu.n)\
**Post date:** [September 1, 2021, 4:04pm UTC](https://community.glideapps.com/t/video-thumbnail/31232/5 "2021-09-01T16:04:08Z")

</div>

there is a waiting time, the time to load the video, I will undoubtedly make a modification to avoid as much as possible the waiting time if the image is already extracted.

---

<div class="post-metadata">

**Author:** ![Lucas\_Pires](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/lucas_pires/32/64863_2.png) [@Lucas\_Pires](https://community.glideapps.com/u/Lucas_Pires)\
**Post date:** [September 1, 2021, 4:15pm UTC](https://community.glideapps.com/t/video-thumbnail/31232/6 "2021-09-01T16:15:51Z")

</div>

That’s awesome @Manu.n

---

<div class="post-metadata">

**Author:** ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)\
**Post date:** [September 1, 2021, 4:26pm UTC](https://community.glideapps.com/t/video-thumbnail/31232/7 "2021-09-01T16:26:59Z")

</div>

Just some preliminary testing, it works awesome! I’m setting the time to 1 second and leaving the width and height as blank.

It takes a little bit of time to load the images, but I guess I would expect that and it’s only 2 or 3 seconds. The only thing I’m noticing so far is that sometimes I get a black image, and it’s random which one will be black. This is after force closing and reopening the app, so it must be running the code again. This is only happening for me on my phone so far, so I’m guessing that the phone can’t process the video fast enough before the image is generated. Is there some way to set a small delay between when the video is fetched, and when the image is captured? I’ll be sure to do some more testing.

 ![Screenshot_20210901-111511~2](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/0/d/0de8851e8ddde12eb9e01b9de23a19ea2ce2ebdd.jpeg)

---

<div class="post-metadata">

**Author:** ![Manu.n](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/manu.n/32/11679_2.png) [@Manu.n](https://community.glideapps.com/u/Manu.n)\
**Post date:** [September 1, 2021, 4:35pm UTC](https://community.glideapps.com/t/video-thumbnail/31232/8 "2021-09-01T16:35:00Z")

</div>

🤔  
How do behave the display in the data-editor?

---

<div class="post-metadata">

**Author:** ![Manu.n](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/manu.n/32/11679_2.png) [@Manu.n](https://community.glideapps.com/u/Manu.n)\
**Post date:** [September 1, 2021, 4:46pm UTC](https://community.glideapps.com/t/video-thumbnail/31232/9 "2021-09-01T16:46:20Z")

</div>

I managed to reproduce the problem, and it’s unrelated to your video, presumably to my script. 🤔 🤔

---

<div class="post-metadata">

**Author:** ![Manu.n](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/manu.n/32/11679_2.png) [@Manu.n](https://community.glideapps.com/u/Manu.n)\
**Post date:** [September 1, 2021, 4:57pm UTC](https://community.glideapps.com/t/video-thumbnail/31232/10 "2021-09-01T16:57:05Z")

</div>

I made a fix in the script and cached the image.  
I can no longer reproduce your problem, well for the moment.  
For each test, do not forget to close the application on the phone to force a new refresh of the script.

---

<div class="post-metadata">

**Author:** ![gvalero](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/gvalero/32/1037_2.png) [@gvalero](https://community.glideapps.com/u/gvalero)\
**Post date:** [September 1, 2021, 5:29pm UTC](https://community.glideapps.com/t/video-thumbnail/31232/11 "2021-09-01T17:29:37Z")

</div>

WTF!!! 😳

Amazing Manu

---

<div class="post-metadata">

**Author:** ![Robert\_Petitto](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/robert_petitto/32/25193_2.png) [@Robert\_Petitto](https://community.glideapps.com/u/Robert_Petitto)\
**Post date:** [September 1, 2021, 5:48pm UTC](https://community.glideapps.com/t/video-thumbnail/31232/12 "2021-09-01T17:48:11Z")

</div>

Can’t wait to test this out~

---

<div class="post-metadata">

**Author:** ![Robert\_Petitto](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/robert_petitto/32/25193_2.png) [@Robert\_Petitto](https://community.glideapps.com/u/Robert_Petitto)\
**Post date:** [September 1, 2021, 5:58pm UTC](https://community.glideapps.com/t/video-thumbnail/31232/13 "2021-09-01T17:58:32Z")

</div>

BRILLIANT—I’ve been searching FOREVER for such a solution.  
👏 👏 👏

Have a donation page? Would love to give you some props.

---

<div class="post-metadata">

**Author:** ![Rosewebstudio](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/rosewebstudio/32/12261_2.png) [@Rosewebstudio](https://community.glideapps.com/u/Rosewebstudio)\
**Post date:** [September 1, 2021, 6:31pm UTC](https://community.glideapps.com/t/video-thumbnail/31232/14 "2021-09-01T18:31:38Z")

</div>

Fabulous, I never thought this would ever be possible.

I have seen so many attempts/questions about this and to see it actually working is fantastic 👍

Well Done!!! ⭐ ⭐ ⭐ ⭐ ⭐

---

<div class="post-metadata">

**Author:** ![Manu.n](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/manu.n/32/11679_2.png) [@Manu.n](https://community.glideapps.com/u/Manu.n)\
**Post date:** [September 1, 2021, 6:46pm UTC](https://community.glideapps.com/t/video-thumbnail/31232/15 "2021-09-01T18:46:47Z")

</div>

I did some caching of the data, to avoid the wait if the image is already extracted. But I’m afraid this will consume a lot of memory, so I don’t know if I keep this option.  
Please return if in doubt. 🤔

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [September 1, 2021, 9:43pm UTC](https://community.glideapps.com/t/video-thumbnail/31232/16 "2021-09-01T21:43:43Z")

</div>

Awesome!

---

<div class="post-metadata">

**Author:** ![SantiagoPerez](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/santiagoperez/32/16807_2.png) [@SantiagoPerez](https://community.glideapps.com/u/SantiagoPerez)\
**Post date:** [September 1, 2021, 11:25pm UTC](https://community.glideapps.com/t/video-thumbnail/31232/17 "2021-09-01T23:25:39Z")

</div>

Great work!!!

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [September 2, 2021, 3:47am UTC](https://community.glideapps.com/t/video-thumbnail/31232/18 "2021-09-02T03:47:23Z")

</div>

oooh… I didn’t realise that YC columns can return an image. I have an immediate use case for this! (quickcharts that overflow)

---

<div class="post-metadata">

**Author:** ![AyS\_0908](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/ays_0908/32/27349_2.png) [@AyS\_0908](https://community.glideapps.com/u/AyS_0908)\
**Post date:** [September 2, 2021, 5:21am UTC](https://community.glideapps.com/t/video-thumbnail/31232/19 "2021-09-02T05:21:58Z")

</div>

Juste génial! Bravo @Manu.n !

---

<div class="post-metadata">

**Author:** ![Manu.n](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/manu.n/32/11679_2.png) [@Manu.n](https://community.glideapps.com/u/Manu.n)\
**Post date:** [September 2, 2021, 8:48am UTC](https://community.glideapps.com/t/video-thumbnail/31232/20 "2021-09-02T08:48:28Z")

</div>

Hi @Robert_Petitto  
I saw that you use “[res.cloudinary.com](http://res.cloudinary.com)” for Youtube videos.  
Without worrying too much about the YT videos, I updated the script to integrate basic images from the video.  
I don’t know if it’s the equivalent or worse than “cloudinary”.  
there are 4 basic picture possibilities 0, 1, 2 and 3 with different resolutions.  
If you have 5 minutes to do a test and tell me if it sucks (or not) 🙂

[Next page](https://community.glideapps.com/t/video-thumbnail/31232.md?page=2)
