Go Back   CodingForums.com > :: Server side development > PHP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 06-27-2011, 07:20 PM   PM User | #1
Nytol
New to the CF scene

 
Join Date: Jul 2009
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Nytol is an unknown quantity at this point
Smile Transload + FFMPEG

Hi clever people.

I was wondering if anyone could help me solve a riddle.
  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. 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.
Nytol is offline   Reply With Quote
Old 06-27-2011, 07:49 PM   PM User | #2
Fou-Lu
God Emperor


 
Fou-Lu's Avatar
 
Join Date: Sep 2002
Location: Saskatoon, Saskatchewan
Posts: 15,747
Thanks: 4
Thanked 2,465 Times in 2,434 Posts
Fou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to all
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.
Fou-Lu is offline   Reply With Quote
Old 06-27-2011, 08:52 PM   PM User | #3
Nytol
New to the CF scene

 
Join Date: Jul 2009
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Nytol is an unknown quantity at this point
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.

Last edited by Nytol; 06-27-2011 at 08:58 PM..
Nytol is offline   Reply With Quote
Old 06-27-2011, 09:05 PM   PM User | #4
Lamped
Super Moderator


 
Join Date: Feb 2009
Location: England
Posts: 539
Thanks: 8
Thanked 63 Times in 54 Posts
Lamped will become famous soon enough
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.
__________________
lamped.co.uk :: Design, Development & Hosting
marcgray.co.uk :: Technical blog
Lamped is offline   Reply With Quote
Old 06-28-2011, 05:48 AM   PM User | #5
Nytol
New to the CF scene

 
Join Date: Jul 2009
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Nytol is an unknown quantity at this point
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.
Nytol is offline   Reply With Quote
Reply

Bookmarks

Tags
encoding, ffmpeg, transload, video

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 04:57 PM.


Advertisement
Log in to turn off these ads.