Welcome Guest, Not a member yet? Register   Sign In
PHP FFMPEG Help
#1

[eluser]Justin Patel[/eluser]
Hello Friend ...

Code:
$s = getcwd()."/videos/flame.avi";
$d = getcwd()."/videos/flame.flv";
$a = shell_exec("/usr/bin/ffmpeg -i $s -ar 22050 -ab 32 -f flv -s 320x240 $d");


Above is code which convert the avi to flv ... But this create the flv file the ISSUE is it has the null content ... ( 0 bites)

Can some one please help me ...
Thanks.
Justin
#2

[eluser]Isern Palaus[/eluser]
Hello,

Have you ever tried...

Code:
$s = getcwd()."/videos/flame.avi";
$d = getcwd()."/videos/flame.flv";
$a = shell_exec("/usr/bin/ffmpeg -i ".$s." -ar 22050 -ab 32 -f flv -s 320x240 ".$d);
#3

[eluser]Justin Patel[/eluser]
Yes but no luck Sad
#4

[eluser]Isern Palaus[/eluser]
Ouch... :-(

Then we will wait best coders and be listening this post for learn about it.

Sorry.

Regards,
-- Isern Palaus
#5

[eluser]dmorin[/eluser]
Did you figure it out? If no, try assigning the string that you execute to a variable and then printing the variable out to the screen. Then try running the command manually and see if you get the desired result. Chances are, you'll see what the problem is when you print out the command to execute.
#6

[eluser]evilgeoff[/eluser]
Couple things right off the bat...and this is very old so I'm sure no one is going to read this but what the hay. ffmpeg bit rates are in bits no kbits/s so -ab 32 should be -ab 32k (it knows that k is). Secondly do this same command on the command line and see if it works....it will spit out an explanation if it doesn't.

This command should work.

exec("ffmpeg -i ".$s." -ar 22050 -ab 32k -f flv -s 320x240 ".$d)

again I doubt anyone is still paying attention but if you have any questions about this let me know.




Theme © iAndrew 2016 - Forum software by © MyBB