So I have users who have told me they are interested in being able to upload videos to my si开发者_JAVA百科te straight from DVD's (for which they own the rights, of course).
I've never encountered this before, but I would imagine this would take an enormous amount of resources and would clog up the servers, which I would like to avoid.
A basic google search returns numerous DVD to FLV converters but all seem to appear to be applications which would need to be used to convert the files before uploading.
So, if this isn't a horrible idea, how would I go about implementing it using PHP or any Linux command line tool?
Or if this is insane, Why is this a bad idea? and What are other possible alternatives?
As an example, I could see an alternative being:
- showing information about how to convert the files to a valid upload format before uploading
Search for ffmpeg - i don't know does it reads DVD files, but most of video formats can, see:
http://en.wikipedia.org/wiki/Libavcodec
It's a command line program, which can convert between many video formats.
You can't avoid huge load on server, because converting video simply require lot of computations. Maybe there is a way to restrict resources that program takes and slow it down - but it will have cost in execution time. On multi-core server, only one core will be loaded when converting video, so maybe this is not a problem ?
Remeber that uploading large files (like DVD video is) can also be a problem, and you should watch to nice uploader with progress bar (for example flash uploader)
精彩评论