FFmpeg

FFmpeg

Posted by: The
Posted on: 2007-11-28 13:09:00

OK, I was reading the wiki, FFmpeg and it says that FFmpeg is already installed on dreamhost. Is that true?

if so, I would like to know why this doesn't work... any one know?

In reply to:

<?php
$loca = '../../tzfiles.com/users/ryan/file.mpg';
$new = '../../tzfiles.com/users/ryan/file.flv';
if(exec("/home/ryannaddy/bin/ffmpeg -i $loca -ar 22050 -ab 32 -f flv -s 320x240 $new"))
echo 'SUCCESS!!!';
else
echo 'FAILED :(';
?>


the output says FAILED :(

Re: FFmpeg

Posted by: Mousee
Posted on: 2007-11-28 13:33:00

Does the ffmpeg binary actually exist in "/home/ryannaddy/bin/ffmpeg"?

Perhaps you should run a which ffmpeg (from the shell) to discover the exact location of ffmpeg on your dreamhost server, and use that instead wink

Re: FFmpeg

Posted by: The
Posted on: 2007-11-28 13:36:00

it is "/usr/bin/ffmpeg"

so I switched it, and it still doesn't work.

Any ideas why now?

In reply to:

<?php
$loca = '../../tzfiles.com/users/ryan/file.mpg';
$new = '../../tzfiles.com/users/ryan/file.flv';
if(file_exists($loca)){
if(exec("/usr/bin/ffmpeg -i ".$loca." -ar 22050 -ab 32 -f flv -s 320x240 ".$new))
echo 'SUCCESS!!!';
else
echo 'FAILED :(';
}else{
echo 'File Doesn't exist';
}
?>



Re: FFmpeg

Posted by: rlparker
Posted on: 2007-11-28 14:41:00

Browsing to http://tzfiles.com/users/ryan/ shows that /home/yourusername/tzfiles.com/users/ryan/file.mpg does not exist, so it *should* fail (even if your path to that file was correctly stated). wink

--rlparker




Re: FFmpeg

Posted by: The
Posted on: 2007-11-28 16:18:00

OK, the file file.mpg is now there.

http://tzfiles.com/users/ryan/file.mpg

The file I was using had spaces in the file name.

If I remove the spaces it works.

What do I need to do to allow for the spaces? doesn't work, I have tried it.

Re: FFmpeg

Posted by: rlparker
Posted on: 2007-11-28 16:36:00

Linux commandline tools do *not* like spaces...you should rename the file to eliminate spaces before processing it with ffmpeg.

--rlparker

Re: FFmpeg

Posted by: The
Posted on: 2007-11-28 16:40:00

That is what I thought I had to do, thanks!

I was thinking:
- rename the file to temp name
- process
- rename new file to old name

Re: FFmpeg

Posted by: wholly
Posted on: 2007-11-28 18:36:00

You could always just add quotes... Then you don't have to muck with filenames.

Wholly - Use promo code WhollyMindless for full 97$ credit. Let me know if you want something else!

Re: FFmpeg

Posted by: The
Posted on: 2007-11-29 10:02:00

Yeah, that is what I just found out, thanks guys for all the help!

Tags: ffmpegreplydreamhostwiki