homepage Welcome to WebmasterWorld Guest from 54.198.157.6
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
Forum Library, Charter, Moderators: coopster & jatar k

PHP Server Side Scripting Forum

    
PHP ffmpeg
PHP ffmpeg
Mahabub




msg:3881074
 10:44 am on Mar 29, 2009 (gmt 0)

Dear all,

I need some help in php ffmpeg.

$extension = "ffmpeg";
$extension_soname = $extension . "." . PHP_SHLIB_SUFFIX;
$extension_fullname = PHP_EXTENSION_DIR . "/" . $extension_soname;

// load extension
if(!extension_loaded($extension)) {
dl($extension_soname) or die("Can't load extension $extension_fullname\n");
}

if(exec("ffmpeg -itsoffset -4 -i 1Video5.avi -vcodec mjpeg -vframes 1 -an -f rawvideo -s 320x240 test.jpg")) { echo "Ok";
} else {echo "not okay";}

Above code not create a thumbnail for the video. any help would be highly appreciated.

N.B: Safe Mode is off

Thanks
Mahabub

 

dreamcatcher




msg:3882239
 8:38 am on Mar 31, 2009 (gmt 0)

Hi Mahabub,

Have you got your error reporting set to report ALL errors? E_ALL. And do your server error logs reveal any clues?

dc

jezra




msg:3883335
 7:12 pm on Apr 1, 2009 (gmt 0)

Are you running this as a local script or on a webserver? If you are running on a server does the web user have write access to the directory where you want the file to be created?

By using "exec" to run ffmpeg, there will be no PHP errors. Similarly, there is no reason to load the php-ffmpeg extensions if php-ffmpeg isn't going to be used.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved