Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Need help "RUNNING MULTIPLE COMMANDS WITH PHP" can some one help?
Old 09-01-2007, 03:04 PM Need help "RUNNING MULTIPLE COMMANDS WITH PHP" can some one help?
goheadtry's Avatar
Webmaster Talker

Posts: 730
Name: John
Location: United States of America, California
Trades: 0
Hi I need help running multiple commands when using PHP

using the exec function in PHP

these are the commands that I need to execute
I need PHP to run the following commands
This will encode the video as FLV
$output = '0000005'; // A number between 0000000 and 9999999
$input= 'donewithform.flv'; // Will be chosen with a form
--

ffmpeg -i $input -ar 22050 -ab 32 -f flv -s 320x240 $output.flv


--
This will Take a screenshot

--

ffmpeg -i $output.flv -an -ss 00:00:45 -an -r 1 -vframes 1 -y -s 150x100 $output.jpg


--
so how can this be done I am confused can someone help me

also ffmpeg is at /usr/bin/ffmpeg/
output needs to be saved at /home/forbushj/public_html/videos/
input needs to be uploaded to /home/forbushj/convert/ and will be converted and outputed to
/home/forbushj/public_html/videos/
can someone help me?
__________________
Free $1 gift card when you signup at
Please login or register to view this content. Registration is FREE

Please login or register to view this content. Registration is FREE


Last edited by goheadtry; 09-01-2007 at 05:14 PM..
goheadtry is offline
Reply With Quote
View Public Profile Visit goheadtry's homepage!
 
 
Register now for full access!
Old 09-02-2007, 01:12 AM Re: Need help "RUNNING MULTIPLE COMMANDS WITH PHP" can some one help?
goheadtry's Avatar
Webmaster Talker

Posts: 730
Name: John
Location: United States of America, California
Trades: 0
I've found out a little bit since the first post I have made some code but I still need some help
%d I think is what makes the filename the next number up if not please help me or if not please help me
I need this to do one command after the other but I need it to make sure it is ready before starting the next command
PHP Code:
<?php 
$input 
$_GET['input'];
$output '%d'//hopefully that will make the file name a number
exec 'ffmpeg -i /home/forbushj/public_html/uploadvidd/'.$input.' -ar 22050 -ab 32 -f flv -s 320x240 /home/forbushj/public_html/2vidd/'.$output.'.flv';
exec 'ffmpeg -i /home/forbushj/public_html/uploadvidd/'.$input.' -an -ss 00:00:45 -an -r 1 -vframes 1 -y -s 150x100 /home/forbushj/public_html/2vidd/'.$output.'.jpg';
?>
__________________
Free $1 gift card when you signup at
Please login or register to view this content. Registration is FREE

Please login or register to view this content. Registration is FREE


Last edited by goheadtry; 09-03-2007 at 11:42 PM..
goheadtry is offline
Reply With Quote
View Public Profile Visit goheadtry's homepage!
 
Reply     « Reply to Need help "RUNNING MULTIPLE COMMANDS WITH PHP" can some one help?
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.15368 seconds with 12 queries