CodingForums.com

CodingForums.com (http://www.codingforums.com/index.php)
-   PHP (http://www.codingforums.com/forumdisplay.php?f=6)
-   -   Transload + FFMPEG (http://www.codingforums.com/showthread.php?t=230559)

Nytol 06-27-2011 07:20 PM

Transload + FFMPEG
 
Hi clever people. :)

I was wondering if anyone could help me solve a riddle. :thumbsup:
  1. I have an empty folder on my shared web host.
  2. I transfer a video file to said web folder via FTP.
  3. 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.
  4. Bonus: Video is also converted into as many HTML5 formats as possible (not just .flv and .mp4).
  5. 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!

Nytol.

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.

Fou-Lu 06-27-2011 07:49 PM

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.

Nytol 06-27-2011 08:52 PM

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.

Lamped 06-27-2011 09:05 PM

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.

Nytol 06-28-2011 05:48 AM

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.


All times are GMT +1. The time now is 03:44 PM.

Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.