Transload + FFMPEG
Hi clever people. :)
I was wondering if anyone could help me solve a riddle. :thumbsup:
- I have an empty folder on my shared web host.
- I transfer a video file to said web folder via FTP.
- Once the file is uploaded FFMPEG encodes the video into several definitions; 320p,480p,720p and 1080p and then automatically places all converted files into a new folder for me.
- Bonus: Video is also converted into as many HTML5 formats as possible (not just .flv and .mp4).
- Bonus: A remote upload feature (or transload) where I could grab a file from any url and place it in the folder for me server to server.
Is something like this possible? It would all have to be done without root access but I have access to FFMPEG, MPLAYER etc.
I know it's a whacky idea but I can no longer bear encoding video files on a Celeron laptop and then uploading the videos on my slow connection. :( Right now I am actually using ClipBucket's remote upload which grabs a video from a url and uploads it, but it only converts the video into two definitions and rarely works anyway.
Thanks for reading. Have a nice day!
PS. This would not be for leeching copyrighted material - it would be for material I am allowed to publish. :thumbsup: It simply allows me to compete with the big guys in terms of publishing fresh content quicker. ;) Right now ater encodingand uploading it's old news. Hah.
The only thing in here related to PHP is that you must have the exec privilege in order to run the ffmpeg. If you do, then the remaining work is done by ffmpeg, so you'll need to ensure you have the proper codec's available for it to work with.
I have all the codecs. I will research more right now. :) I am sorry if I posted it in the wrong section. :) And you have 9,511 posts to my 5. Heh. I feel very tiny right now.
Fou-lu is a god emperor for a reason!
What you propose is possible, because I'm doing the same thing on my fileserver. You mainly just need to shell_exec() ffmpeg with the right parameters (which is pretty hard to get right). If you're looking at HTML5, you want ffmpeg2theora (get the binary from their website, because the package you *may* find will be old and bad). I suggest dumping flv and just doing baseline mp4 (which is supported by 9.something flash player) using the ipod* presets supplied with ffmpeg.
I can help you compile ffmpeg with the relevant options if you need.
There's a lot of information to digest, I hope I've given you enough keywords to Google and come back to us with something more specific.
There is a lot of information to digest. I came across a great service which is what I am aiming for.
Have a look at http://transloadit.com/demos . Pretty impressive but it's not free unfortunately.