14

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?

Ashutosh Singla
  • 743
  • 4
  • 13
  • 34

1 Answers1

21

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:

enter image description here

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):

enter image description here

Mick
  • 24,231
  • 1
  • 54
  • 120
  • @jaepage - yes the settings icon, and yes you are right, it is resolution rather than bit rate, corrected above. The two are closely related in practice as, generally a higher resolution implies a higher bit rate, but the actual bit rate is in the graph picture itself. – Mick Nov 08 '17 at 20:08
  • 3
    that is your connection bandwidth - not an actual bitrate of the video - You download chunks of the video at 14.8Mbit/s, but as you can see - most of the time you are not downloading anything (only during those short spikes in the network activity graph). – Adam K. Nov 03 '19 at 11:08
  • @AdamK. - each time the player requests the next chunk of video it decides what resolution to request for the next chunk, generally based on its assessment of the current network conditions and the capability of the device. So if it sees good throughput it will request a higher resolution, so long as the device can display it. This will use more bits and hence you get a higher bitrate for the video delivery. The player and the video server do not have visibility of other traffic on the connection. I've added an example which shows this in more detail and hopefully helps illustrate it better. – Mick Nov 03 '19 at 20:18