[GM Question] Generating a thumbnail preview

Posted by Glen on March 14, 2012, 10:30 p.m.

I'm working on a pc application that handles content within it's subdirectories. I need to find a way to display a list of videos in thumbnail format by generating an icon out of the video itself. Have a method you'd like to suggest? I just need a image from the video quickly and efficiently. I'm aware that some game maker scripts are lying around that can break each frame of a video into individual images, but that takes too long. Maybe there's a way to get the thumbnail image that Windows generates on explorer? Just a thought. And here's a video for your enjoyment. http://vimeo.com/36820781

PS: Q&A wouldn't let me submit this. Kept saying select a category regardless of what I selected.

Comments

Rob 12 years, 9 months ago

>application (non-game)

>Game Maker

Why?

Glen 12 years, 9 months ago

Because I can. And it's fun to use. Do you have a suggestion?

RC 12 years, 9 months ago

Rob would rather you use his penis to make applications with.

Rob 12 years, 9 months ago

Quote:
Because I can. And it's fun to use. Do you have a suggestion?

What other languages do you know?

firestormx 12 years, 9 months ago

I wouldn't know, personally, but I don't think you could do it with just a GM script. What about codecs and stuff?

You might be able to get the thumbnail that windows uses from thumbs.db (maybe there's a DLL out there to read that), but that's only assuming that the user has preview enabled (otherwise windows won't generate the .db file)

Alert Games 12 years, 9 months ago

you would need a DLL. hands down. writing something like that in GM is re-inventing the wheel.

and while youre at it write the whole program in another language LOL

Astryl 12 years, 9 months ago

You'd have to use a DLL that can load the AVI file, split the frames, and somehow generate image data. In order to do so effectively, you'll have to have a decent understanding of the base AVI Container format (Or one of the others), and the image format that you want to work with.

Somebody may have made a DLL to do this, but I haven't seen it yet.

Also, the problem with reading from thumbs.db is not complexity (It's an indexed set of images), but in getting the image that you want. Windows tends to take the first few frames of a video as the preview, and since most videos fade-in, that means that you get a little black rectangle.