Bitrate value is -1 for any HLS content
Issue description
When I try to reproduce an HLS content the method player.getVideoFormat().bitrate in DebugTextViewHelper returns always -1.
Reproduction steps
- Open Exoplayer 2.4.2 demo app
- Select any HLS content for example "Apple 4x3 basic stream"
- Log player.getVideoFormat().bitrate in private String getVideoString() method in DebugTextViewHelper class
- bitrate is always -1
Link to test content
Any HLS content, for example "Apple 4x3 basic stream" in Exoplayer demo app
Version of ExoPlayer being used
Exoplayer 2.4.2
Device(s) and version(s) of Android being used
Nexus 5, Android 6.0.1
A full bug report captured from the device
no logs
Info
I have checked in HlsPlaylistParser class and the bitrate value is correct. I'm continuing to study this case and I will add more info soon.
Thanks
The format you're seeing here is really only intended for internal use by the player (and for debugging purposes). It is correct to say that the bitrate is set to -1, but it's also correct to say this shouldn't really be a problem. Note that this format represents just the video component of the stream, after de-muxing and extraction from the container.
So, it is not a bug. I had this doubt because other formats (DASH or SS) have this information in the same callback or in EventLogger.
Thank you for your answer.
What should the proper way to access bitrate be?