Video-hub-app: Automatically use an image of the same name as the video as a thumbnail

Created on 16 Aug 2020  ยท  5Comments  ยท  Source: whyboris/Video-Hub-App

I see that I can manually specify the thumbnail image, but can I do it automatically?

.
โ”œโ”€โ”€ sample.mp4
โ””โ”€โ”€ sample.jpg     # Use this image as a thumbnail
discussion

All 5 comments

Interesting idea. I wonder how common it is for people to have such a setup. My guess it's very uncommon ๐Ÿค” ๐Ÿคทโ€โ™‚๏ธ ... perhaps some people have cover.jpg file name instead ๐Ÿ’ญ I'm really unsure.

If you'd like I can help you code the changes so you could build your own version of the app ๐Ÿค

I'm unsure whether I'd want the feature to be a part of the app - I'm sort-of on the border. Would love to hear others' opinions ๐Ÿ‘

Interesting idea but I agree that multiple people probably use different kinds of formats (yay multiple standards).
The format I'm using is a folder with the movie file in it, an information file (NFO), a trailer, a poster (like a DVD case front) and a background image (fanart). There's also 2 subfolders for thumbnails and backgrounds (fanart).
It looks a bit like this:

extrafanart
โ”œโ”€โ”€ fanart0.jpg
โ””โ”€โ”€ fanart1.jpg
extrathumbs
โ”œโ”€โ”€ thumb0.jpg
โ””โ”€โ”€ thumb1.jpg
.
โ”œโ”€โ”€ sample.mp4
โ”œโ”€โ”€ sample.nfo
โ”œโ”€โ”€ sample-fanart.jpg
โ”œโ”€โ”€ sample-poster.jpg
โ””โ”€โ”€ movie-trailer.mp4

And in the case of TV series there also a theme music file in the same location as the main folder named theme.mp3. But that's outside the scope of this project I think. Besides my TV series folders have a different format with season subfolders. Let's not get in to that (unless you want to).

Thanks for the reply.
It certainly doesn't seem to be an easy solution, as different people manage their cover images differently.
I'll make a fork that is suitable for me :smirk:.

Do let me know if you'd like me to point you to locations in code where to add your changes / if you have any questions ๐Ÿ‘

ps - the current main branch already has the changes from 3.0.0 but it might have minor bugs still. The branch is stable-enough that it shouldn't change much before release, but whatever you build would likely benefit from a git merge main update once 3.0.0 comes out ๐Ÿ˜Š

Thank you for the suggestion and the discussion.

I think this is too bespoke and is best handled by individual developers on their end. There's already functionality in the app that can take an arbitrary .jpg or .png and set it as the main thumbnail for a video. It wouldn't be too hard to add a few lines of code that check for presence of a particular image format and use that functionality.

Closing the issue since I don't think this will appear in the production app. Please feel free to comment on it if you'd like any help with getting the code to work for yourself ๐Ÿค

Was this page helpful?
0 / 5 - 0 ratings

Related issues

whyboris picture whyboris  ยท  5Comments

cal2195 picture cal2195  ยท  5Comments

whyboris picture whyboris  ยท  5Comments

cal2195 picture cal2195  ยท  6Comments

cal2195 picture cal2195  ยท  6Comments