Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- * FFMPEG-PHP Test Script
- *
- * Special thanks to http://www.sajithmr.me/ffmpeg-sample-code for this code example!
- * See the tutorial at http://myownhomeserver.com on how to install ffmpeg-php.
- */
- // Check if the ffmpeg-php extension is loaded first
- extension_loaded('ffmpeg') or die('Error in loading ffmpeg');
- // Determine the full path for our video
- $vid = realpath('./vid2.avi');
- // Create the ffmpeg instance and then display the information about the video clip.
- $ffmpegInstance = new ffmpeg_movie($vid);
- echo "getDuration: " . $ffmpegInstance->getDuration() . "<br />".
- "getFrameCount: " . $ffmpegInstance->getFrameCount() . "<br />".
- "getFrameRate: " . $ffmpegInstance->getFrameRate() . "<br />".
- "getFilename: " . $ffmpegInstance->getFilename() . "<br />".
- "getComment: " . $ffmpegInstance->getComment() . "<br />".
- "getTitle: " . $ffmpegInstance->getTitle() . "<br />".
- "getAuthor: " . $ffmpegInstance->getAuthor() . "<br />".
- "getCopyright: " . $ffmpegInstance->getCopyright() . "<br />".
- "getArtist: " . $ffmpegInstance->getArtist() . "<br />".
- "getGenre: " . $ffmpegInstance->getGenre() . "<br />".
- "getTrackNumber: " . $ffmpegInstance->getTrackNumber() . "<br />".
- "getYear: " . $ffmpegInstance->getYear() . "<br />".
- "getFrameHeight: " . $ffmpegInstance->getFrameHeight() . "<br />".
- "getFrameWidth: " . $ffmpegInstance->getFrameWidth() . "<br />".
- "getPixelFormat: " . $ffmpegInstance->getPixelFormat() . "<br />".
- "getBitRate: " . $ffmpegInstance->getBitRate() . "<br />".
- "getVideoBitRate: " . $ffmpegInstance->getVideoBitRate() . "<br />".
- "getAudioBitRate: " . $ffmpegInstance->getAudioBitRate() . "<br />".
- "getAudioSampleRate: " . $ffmpegInstance->getAudioSampleRate() . "<br />".
- "getVideoCodec: " . $ffmpegInstance->getVideoCodec() . "<br />".
- "getAudioCodec: " . $ffmpegInstance->getAudioCodec() . "<br />".
- "getAudioChannels: " . $ffmpegInstance->getAudioChannels() . "<br />".
- "hasAudio: " . $ffmpegInstance->hasAudio();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement