大家好,我已经成功地将 ffmpeg 安装到我的计算机上,我可以通过检查 ffmpeg-version 来检查它,它会返回一些合乎逻辑的东西。
这意味着 ffmpeg 在我的 pac 上成功运行,但是当我通过 php 运行此代码时,我在加载 ffmpeg 时出错
<?php
extension_loaded('ffmpeg') or die('Error in loading ffmpeg');
// Determine the full path for our video
$vid = realpath('./test/Sample.mp4');
// 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 />".
"getAudioChannels: " . $ffmpegInstance->getAudioChannels() . "<br />".
"hasAudio: " . $ffmpegInstance->hasAudio();
?>
请告诉我哪里做错了
最佳答案
好像没有安装 ffmpeg-php 模块
关于php - ffmpeg安装和php配置哪里错了,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31534767/