mikey3521 Posted October 24, 2007 Share Posted October 24, 2007 Hello, This should be pretty simple and even if someone could just provide me with a link that would be awesome as well. Or if they've just got some code up there sleves that works too!!... Pretty much I need a "YouTube" script upload a video converts to to FLV saves the path in database, generates a thumbnail. Now I can download like complete youtube clones for free but I don't need members and profiles and everything else, that i'm building from scratch. Pretty much all I need is a simple upload forum (which I can make) "Video Name" "Video File" then I need the script (which i can't make) which uploads it and runs the ffmpeg, ffmpeg-php scripts to convert it and generate the thumbnail & save it to a database. Any help would be awesome. I've done a simple picture upload where it changes the name to timestamp, puts the path in a database with some fields but i'm not quite sure how to call the ffmpeg script... Thanks -Mike Quote Link to comment https://forums.phpfreaks.com/topic/74654-php-file-convert/ Share on other sites More sharing options...
MadTechie Posted October 24, 2007 Share Posted October 24, 2007 use System() or exec() and readup on ffmpeg command lines Quote Link to comment https://forums.phpfreaks.com/topic/74654-php-file-convert/#findComment-377357 Share on other sites More sharing options...
mikey3521 Posted October 24, 2007 Author Share Posted October 24, 2007 haha thank you but your greatly over ... estimating my skills. I've read up on them all but i'm a take it apart and put it back together learner. but thank you I am researching some other tutorials. If you know of any that would be awesome. I know it's nothing terribly complicated to-do, I just can't seem to make it work. Quote Link to comment https://forums.phpfreaks.com/topic/74654-php-file-convert/#findComment-377360 Share on other sites More sharing options...
ToonMariner Posted October 24, 2007 Share Posted October 24, 2007 much as I hate it - if you get hold of a copy of clipshare that has all the bits in you need - think it uses mencoder to create the flv but you can do that with ffmpeg too. all the code is in there including the command needed for ffmepg/mencoder. Quote Link to comment https://forums.phpfreaks.com/topic/74654-php-file-convert/#findComment-377361 Share on other sites More sharing options...
MadTechie Posted October 24, 2007 Share Posted October 24, 2007 another post (same idea) http://www.phpfreaks.com/forums/index.php/topic,161173.0.html EDIT: just did a search for ffmepg Quote Link to comment https://forums.phpfreaks.com/topic/74654-php-file-convert/#findComment-377362 Share on other sites More sharing options...
mikey3521 Posted October 24, 2007 Author Share Posted October 24, 2007 Thanks i'll find the command I need. My other question is in PHP how do I do this so that it's running in the background, and the user isn't awaiting a result. For example uploads, then says Thanks, Uploaded, in line for processing shouldn't be long... then they can navigate around and it will keep doing it things / generating a thumb? Quote Link to comment https://forums.phpfreaks.com/topic/74654-php-file-convert/#findComment-377367 Share on other sites More sharing options...
MadTechie Posted October 24, 2007 Share Posted October 24, 2007 read last post in this thread http://www.phpfreaks.com/forums/index.php/topic,163402.0.html Quote Link to comment https://forums.phpfreaks.com/topic/74654-php-file-convert/#findComment-377368 Share on other sites More sharing options...
BlueSkyIS Posted October 24, 2007 Share Posted October 24, 2007 you can use exec() to execute actions or scripts on the server that don't care whether the visitor is still on the same page or not. Quote Link to comment https://forums.phpfreaks.com/topic/74654-php-file-convert/#findComment-377371 Share on other sites More sharing options...
mikey3521 Posted October 25, 2007 Author Share Posted October 25, 2007 im just curious how it works in the way say I have several people all upload videos within moments of each other. Will it naturally start a queue, or will it try to convert them all at the same time causing a large spike on CPU usage? Or is there a way I can decide (I think the queue method would be the best) but i'm open to thought's on this. Quote Link to comment https://forums.phpfreaks.com/topic/74654-php-file-convert/#findComment-377416 Share on other sites More sharing options...
MadTechie Posted October 25, 2007 Share Posted October 25, 2007 yes it would cause a spike, best bet would be create a queue, and then have a cron to run convert. also detect if its already running.. Quote Link to comment https://forums.phpfreaks.com/topic/74654-php-file-convert/#findComment-377424 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.