如何检测嵌入式视频编码比特率

发布于 2024-12-17 06:50:09 字数 112 浏览 5 评论 0原文

如果我想将不属于我自己的视频文件或流嵌入到 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

口干舌燥 2024-12-24 06:50:09

如果您有权访问FFmpeg,您可以使用:

ffmpeg -i file.avi

这将输出有关视频文件的信息,包括组成它的流,以及他们的比特率。然后,您可以使用 grep 过滤出您感兴趣的特定比特率,或者仅使用 shell_exec() 并解析返回的字符串以查找您感兴趣的比特率。

If you have access to FFmpeg, you can use:

ffmpeg -i file.avi

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 with shell_exec() and parse the returned string to find the bitrate you're interested in.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文