检索用户上传的视频规格
我正在开发的网络应用程序允许用户上传视频。视频必须符合我们客户规定的特定标准(格式、帧大小、帧速率等),否则将被拒绝。我通过谷歌搜索找到了 ffmpeg-php 库。但是,我注意到它似乎没有得到积极维护。
- 目前通过 PHP 访问视频数据的标准库是什么?
- 如果从视频的元数据中检索此数据,可以相信此信息是准确的吗?
The web app I'm working on allows a user to upload videos. The videos must meet specific criteria as outlined by our client (format, frame size, frame rate, etc) or they will be rejected. I found the ffmpeg-php library from some googling. However, I noticed that it doesn't appear to be actively maintained.
- What's the current standard library for accessing video data via PHP?
- If this data is retrieved from the video's metadata, can this information be trusted to be accurate?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
ffmpeg 是一个不错的选择: http://ffmpeg-php.sourceforge.net/ doc/api/ffmpeg_movie.php
或者您可以使用 PHP 类,这是我发现的一个类,其中写着“在不使用 ffmpeg-php 库的情况下访问媒体元数据。”: http://www.phpclasses.org /package/3747-PHP-Manipulate-and-convert-videos-with-ffmpeg-program.html
与大多数元数据一样,它们可能很容易编辑且不值得信任。
ffmpeg is a good option at: http://ffmpeg-php.sourceforge.net/doc/api/ffmpeg_movie.php
Or you could use a PHP class, here is one i have found which says "Access media metadata without using the ffmpeg-php library.": http://www.phpclasses.org/package/3747-PHP-Manipulate-and-convert-videos-with-ffmpeg-program.html
Like most meta datas, they are likely easily editable and untrustworthy.