Posts: 31
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

User avatar
Posts: 33334
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website

Re: <HTML> Autoindex video files?

Sun Jul 29, 2018 10:30 am

Microprocessor, Raspberry Pi & Arduino Hacker
Mainframe database troubleshooter
MQTT Evangelist
Twitter: @DougieLawson

2012-18: 1B*5, 2B*2, B+, A+, Z, ZW, 3Bs*3, 3B+

Any DMs sent on Twitter will be answered next month.

tpyo kingg
Posts: 146
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:

https://networking.ringofsaturn.com/Uni ... 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

Posts: 1
Joined: Sun Jul 08, 2018 6:16 pm

Re: <HTML> Autoindex video files?

Mon Aug 06, 2018 7:43 pm

It's better to put youtube in an iframe

Return to “Other programming languages”

Who is online

Users browsing this forum: No registered users and 2 guests