Forum Moderators: bakedjake
One of my clients has a video sharing service site and basically he'd like for the system to detect what format the user is uploading (one of the three allowed such as real player / quick etc) and automatically recode it into the two other formats on the fly after the upload thus saving it as copies...
I'm not sure this is possible and haven't been able to find much when I googled for these topics I'm afraid.
Any help would be greatly apreciated!
Regards,
Andie
Use file(8) to determine the filetype that's been uploaded. Result looks something like this:
file 116read.rm
116read.rm: RealMedia file Then use mencoder [mplayerhq.hu] to re-encode the video to another format. (see http://www.mplayerhq.hu/DOCS/HTML/en/mencoder.html [mplayerhq.hu] for more details).
Something like:
mencoder uploadedmovie.wmv -ovc lavc -lavcopts vcodec=mpeg4 -oac copy -o movie.avi
You can also probably use other players/encoders that are out there.