ffmpeg warning

476 views
Skip to first unread message

Sahir Khan

unread,
Dec 18, 2009, 10:12:55 AM12/18/09
to ffmpeg-php
Aslam u aliekum,

i m going to develop an online streaming website jst like
youtube.com, i download php-extension from sourceforg and copied it to
the windows/system32 folder then i cheked phpinfo() and found that
ffmpeg has succesfuly installed and loaded.
now the problem is that m gona use this coad bt php alert me about two
things,
1: Warning: Can't open movie file clock.avi in C:\xampp\htdocs\sahir
\ffmpeg1.php on line 6..
2:Fatal error: Call to a member function getDuration() on a non-object
in
C:\xampp\htdocs\sahir\ffmpeg1.php on line 7


Remember that i kept the php script and avi file in the same
directory,

i m using windows XP and xamp 1.7.0 with php version 5.2.8;

<?php
extension_loaded('ffmpeg') or die('Error in loading ffmpeg');

$ffmpegInstance = new ffmpeg_movie('clock.avi');
echo "getDuration: " . $ffmpegInstance->getDuration() .
"getFrameCount: " . $ffmpegInstance->getFrameCount() .
"getFrameRate: " . $ffmpegInstance->getFrameRate() .
"getFilename: " . $ffmpegInstance->getFilename() .
"getComment: " . $ffmpegInstance->getComment() .
"getTitle: " . $ffmpegInstance->getTitle() .
"getAuthor: " . $ffmpegInstance->getAuthor() .
"getCopyright: " . $ffmpegInstance->getCopyright() .
"getArtist: " . $ffmpegInstance->getArtist() .
"getGenre: " . $ffmpegInstance->getGenre() .
"getTrackNumber: " . $ffmpegInstance->getTrackNumber() .
"getYear: " . $ffmpegInstance->getYear() .
"getFrameHeight: " . $ffmpegInstance->getFrameHeight() .
"getFrameWidth: " . $ffmpegInstance->getFrameWidth() .
"getPixelFormat: " . $ffmpegInstance->getPixelFormat() .
"getBitRate: " . $ffmpegInstance->getBitRate() .
"getVideoBitRate: " . $ffmpegInstance->getVideoBitRate() .
"getAudioBitRate: " . $ffmpegInstance->getAudioBitRate() .
"getAudioSampleRate: " . $ffmpegInstance->getAudioSampleRate() .
"getVideoCodec: " . $ffmpegInstance->getVideoCodec() .
"getAudioCodec: " . $ffmpegInstance->getAudioCodec() .
"getAudioChannels: " . $ffmpegInstance->getAudioChannels() .
"hasAudio: " . $ffmpegInstance->hasAudio();

?>

Please if any body help me , 'll b very thnkfull. i hv to submit my
final term project as soon as possible. very very thax in advance

Reply all
Reply to author
Forward
0 new messages