如何检测嵌入式视频编码比特率
如果我想将不属于我自己的视频文件或流嵌入到 html 页面中,有什么方法可以首先检测视频编码的比特率?有没有办法可以通过 php 例程(理想情况下)或其他一些基于 Linux 的服务器例程来询问它来检测比特率?
If I want to embed a video file or stream that is not my own into an html page, is there any way that I can first detect the bitrate that the video was encoded at? Is there a way that it can be interrogated by a php routine (ideally) or some other linux based server routine to detect the bitrate?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您有权访问FFmpeg,您可以使用:
这将输出有关视频文件的信息,包括组成它的流,以及他们的比特率。然后,您可以使用
grep
过滤出您感兴趣的特定比特率,或者仅使用shell_exec()
并解析返回的字符串以查找您感兴趣的比特率。If you have access to FFmpeg, you can use:
This will output information about the video file, including the streams composing it, along with their bitrates. You can then use
grep
to filter out the specific bitrate you're interested in, or just execute the command from PHP withshell_exec()
and parse the returned string to find the bitrate you're interested in.