User avatar
Posts: 122
Joined: Wed Jun 27, 2018 10:24 pm

<HTML> Autoindex video files?

Sun Jul 29, 2018 3:02 am

My goal is quite "simple":

Is it possible to auto-index (mp4) video files with thumbnails?

I have severals videos on my hard drive (over 100) and I want them to be automaticly indexed everytime I upload a new file, with an automaticly generated low-res thumbnail.

I basically want a simple video explorer similar to youtube s.

Is that possible? :shock:
Thanks! :P :P
I like cats

User avatar
Posts: 39789
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: <HTML> Autoindex video files?

Sun Jul 29, 2018 10:30 am

Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All fake doctors are on my foes list.

tpyo kingg
Posts: 836
Joined: Mon Apr 09, 2018 5:26 pm
Location: N. Finland

Re: <HTML> Autoindex video files?

Sun Jul 29, 2018 12:09 pm

Or if you are thinking of something more complex you can write a script in perl5, python, or even shell to interact with avconv or ffmpeg to create a thumbnail and then write out an HTML document somewhere in the web server's document root. I don't see avconv in the Raspbian repository so ffmpeg will have to do: ... mbnail.php

The script would make the thumbnail and fill in the HTML. CSS can be used to make the layout nice. An external CSS file would probably be easiest to work with. Do the CSS last, however.

I have more or less that kind of wrapper as a basic shell script for making thumbnails of JPEG images, but it could be done in python or perl5 as well. The only difference would be how to guess which part of the video to use to get a relevant thumbnail.

Once you have made a wrapper script then you can use incron to trigger it by having incron watch your upload directory. In that way it gets run

Return to “Other programming languages”