View Full Version : Help with somethings
Trigs
26-04-2009, 01:37 AM
1. Is there a way to create a website that, like for example, you upload a file and it runs Norton Antivirus (like is there a way to install it on the server on something) to see if it's infected, like virustotal.com? That's not exactly what I want to do, just using it as an example. Or do I need a Microsoft server for that?
2. Is there a way to get a random screenshot or whatever of an .avi file? Like on youtube where a thumbnail of your vid is created after you upload it. How do you do that?
DeejayMachoo$
26-04-2009, 09:32 AM
Well not sure how you would go about doing it but unless you can get norton for linux then yes you would need a Windows Server, but i'm sure you could do some magic with an already made one such as...
http://www.kaspersky.com/scanforvirus
A bit of CURL could make it work?
The screencaps thing i'm sure theres websites around that do that already but if you have to upload the file everytime its going to take a long time to generate these images so wouldn't a executeable program be much more efficent?
Trigs
26-04-2009, 07:45 PM
Thanks. I'll look into CURL.
I know but I need it for something. I need to know how to do it though, in PHP if possible.
Source
26-04-2009, 08:01 PM
I'll comment on point 2.
In order to get a screenshot of a video uploaded on a website you will need a host with ffmpeg installed and supported. Once there, you use a simple exec command to parse the correct command to get the image. Here is a snippet from a site im currently working on:
ffmpeg -i /var/www/usrvids/{$inputFile}.flv -ss {$delay} -t 00:00:01 -s 280x152 -r 1 -f mjpeg /var/www/thumbnails/{$inputFile}_1.jpg
That takes an input file, tells it at what point to take the screenshot, how long for (1 second == 1 frame ). -s is the size, -r is the rendering mode, -f is the format to export to (in this case mjpeg) and lastly is the output file.
Hope that helps in someway.
Trigs
26-04-2009, 08:16 PM
Helps a lot, thanks!
So I upload the files to the server and run it using exec(); in PHP right?
Source
26-04-2009, 08:25 PM
Yea, but your host must have FFMPEG installed (normally running on a unix system of somesort).
Trigs
26-04-2009, 08:44 PM
Yep, thanks! +rep
Want to hide these adverts? Register an account for free!
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions Inc. All rights reserved.