如何从 YouTube 视频中获取比特率信息? [英] How to get the information of bit-rate from YouTube videos?

查看:152
本文介绍了如何从 YouTube 视频中获取比特率信息?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用 YouTube 视频进行测试,我想知道如何获取播放视频的比特率信息?

我使用了 2 种方法来了解有关比特率的信息,但没有得到任何信息.

1.右键单击视频并选择书呆子的统计数据".2. ffmpeg -i input_video -f ffmetadata metadata.txt

我不知道是否通过右键单击视频然后单击属性,然后详细信息将为我提供显示比特率的正确方式.

有什么建议吗?

解决方案

大多数 YouTube 视频使用自适应比特率 (ABR) 格式流式传输,这意味着不只是单一比特率.

对于 ABR,会创建视频的多个比特率版本,并且每个版本都被分解为等长(按时间)的块 - 例如10 秒块.

客户端播放器然后能够从当前网络条件最合适的比特率流中选择下一个块 - 如果网络繁忙,它可以降低下一个块的比特率,反之亦然,如果网络很好.

所以整个视频并没有真正的单一比特率的概念,而是每个下载的块都有不同的比特率(尽管在实践中如果你有一个良好的连接,它应该工作到最高比特率并且留在那里).

如您所说,您可以通过右键单击并查看书呆子的统计数据"选项在 YouTube 上看到此可视化效果 - 请参见下面的示例:

您还可以查看可用的分辨率,并通过单击右下角的滚轮"强制玩家选择一个.一般来说,更高的分辨率需要更多的比特,因此意味着更高的比特率,

要查看视频缓冲区和比特率的更详细视图,一些播放器提供了演示视图,其中包含随时间变化的表示 - 请参阅下面来自 DASH IF 参考播放器的示例 (

I was using YouTube videos for my test and I was wondering how can I get the information of bit-rate of the played video?

I used 2 methods to know the information about the bit-rate but didn't get any information.

1. Right-click on a video and choose "Stats for nerds".
2. ffmpeg -i input_video -f ffmetadata metadata.txt

I don't know if by doing the right click on the video and then properties, then details would give me the correct way of showing the bit-rate.

Any suggestions?

解决方案

Most YouTube video use adaptive bit rate (ABR) format streaming which means that there is not just a single bit rate.

For ABR multiple bit rate versions of the video are created and each one is broken down into equal length (by time) chunks - e.g. 10 second chunks.

The client player is then able to select the next chunk from the most appropriate bit rate stream for the current network conditions - if the network gets busy it can drop down to a lower bit rate for the next chunk and visa versa if the network is good.

So there is not really the concept of a single bit rate for the whole video, but different bit rates for each chunk that is downloaded (although in practice if you have a good connection it should work up to the top bit rate and stay there).

As you say, you can see a visualisation of this on YouTube by right clicking and looking at the 'stats for nerds' option - see example below:

You can also see the available resolutions, and force the player to select a single one by clicking on the 'wheel' in the bottom right hand corner. As a general rule, a higher resolution will need a higher number of bits and hence mean a higher bit rate,

To see a more detailed view of the video buffers and the bitrate, some players provide a demo view with a representation of the change over time - see below an example from the DASH IF reference player (https://reference.dashif.org/dash.js/latest/samples/dash-if-reference-player/index.html):

这篇关于如何从 YouTube 视频中获取比特率信息?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆