![]() |
Free server side video thumbnail generation script
Hey all, today I'm in a sharing mood so here's a little shell script that
automatically scans a user defined folder recursively for video files and auto extracts a user defined amount of thumbnails from each file it finds. Thumbnail size, compression, interval are easy controllable and instructions and comments are added to the source. This script is for use on a unix server and saves you having to download the vids to a workstation in order to generate thumbnails in whatever software and having to re-upload the thumbs manually back to the server. The thumbnails uses the following naming scheme for the generated thumbnails foldername_x.jpg where x is the number of thumbnail that is generated by the script i.e. if you define to extract 2 thumbs for each file...they will be named: foldername_1.jpg and foldername_2.jpg so it's very easy to see which thumbnails comes from which video input file. The script can process any video format as long as the ffmpeg binary which is used to extract the frames has the codec installed. ffmpeg is used to extract the raw frame data from the video file which is stored without any manipulation as a .PNG file and then the ImageMagick convert tool does the required image manipulation and conversion to JPEG ffmpeg can do this too but this way the quality of the jpeg thumbnail is MUCH better than doing it at once using ffmpeg only. A BIG THANK YOU to GrouchyAdmin who helped me today adding the folder and file scanning of the script to complete the script today as I urgently needed it so my content guy could start using it.......but I wasn't able to finish it today or even this week due to severe lack of time. If ANYONE is looking for a reliable coder/sysadmin that delivers his work in a timely fashion and with the result you asked for then look no further and contact GrouchyAdmin for your job and save yourself from getting screwed every possible way you can think off which lately seems to be the hottest trend. I don't vouch for people to avoid getting hassled by people asking me why the hell I send them somewhere.....but with Grouchy I'm comfortable enough and not having to worry about that. In the unlikely event that I turn out to be wrong feel free to contact me and if your complaint is valid I'll personally make sure that you'll get what you ordered.......so Grouchy don't even think of dissapointing me...... I know where you bed sleeps and I'm bigger than you :winkwink: Ok time for the goodies: part 1 vidscan.sh Code:
#!/bin/shPart 2 extract.sh Code:
#!/bin/bashI might use your comments to improve the script if your comments makes sense......Flames and thrash comments I'll read for entertainment and will be ignored.......if you can better do it yourself and post your result.....only if you it's really better I'll gladly admit and use your result myself...... Request for help and/or assistence post them here or email me. When I have time I'll be more than happy to assist....... The script comes without any warranty....the use of it I won't take any liability for damage to your server and/or data check the code before running it....if it doesn't make any sense to you either ask before you run it or hope for the best......if you decide to gamble on it......then accept the consequences if your gamble turns out that you lose...... It's advisable to first test it in a safe folder with a copy of the files you test it on.....before even thinking to use it on your live data before being sure it does exactly what you hope/think/guess it will do........ DON'T COME TO ME TO COMPLAIN WHEN WHEN IT FUCKS UP YOUR SHIT!!! YOU HAVE BEEN WARNED!!!!!!! so that's out of the way.....I'll finish by saying that it does exactly what I said it will do......so if you be careful it's very unlikely anything bad will happen when using it.........if you have any doubts just ask and I'll explain if it's safe for you to use........ Time to get some sleep now......behave while I'm gone and see you all my GFY friends tomorrow........I hope some of you can use this as if you do it saves can save you a LOT of time......I googled to see if there was anything like this I could use........either I used the wrong terms to find it which to be honest really got me suprised.......I expected to find dozens of scripts that would do something similar like this....but I guess I was wrong or just too stupid to be able to find them.......:thumbsup Grouchy thanks again......your quick help is very much appreciated :thumbsup |
Thanks for posting, going to test this baby...
|
you're welcome......lol the instructions I wrote for it are 5 times more than the actual code :1orglaugh
|
Quote:
Glad I could help, Hans! |
shameless bump
|
good job sg , do you mind if i repost this on my forum . ( with credit of course )
|
Quote:
|
Quote:
|
Quote:
|
bump for the day crew
|
great job on the script man, this is a very useful tool!
|
Hey all, I've made a quick update to the script adding some more controlable
features from the command line.....it's still a work in progress though so more updates will follow. Current and Future updates of the script can be found and downloaded at: http://www.sinnerscash.com/vidscan/index.html Feel free to grab it free of charge and bookmark URL to fetch future updates when they're available..........or suggest and request new features you'd like to get added........enjoy! :thumbsup |
after weekend bump
|
Quote:
Code:
#!/bin/sh |
This fucked up my server!!! YOU OWE ME $1000 in lost earnings!!!!!! ICQ me you ratbag!!!
little joke there... |
Quote:
|
nice!
I was JUST about to write something that does the same thing in php for a project, but I'll give this a shot instead Thanks! |
damn, a useful business thread wtf
|
Quote:
|
Quote:
|
Almost all servers come with GD together with php. Any reason why you use Imagemagic?
|
Interesting. Nice thread, thanks.
|
Quote:
|
hmm, what do you need a script for? as long as you have ffmpeg installed you can do it with a single shell command...
|
Quote:
|
heres a simple dirty php script to take screenshots from a video and turn them into an animated gif
Code:
<?php |
this thread delivers...nice
Thanks for these scripts! |
Update your ffmpeg skills and post some new tricks.
|
| All times are GMT -7. The time now is 10:38 PM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123