Consider making the bandwidth attribute in a manifest optional #938
Labels
status: archived
Archived and locked; will not be updated
status: bad content
Caused by invalid, broken, or unsupported content
type: enhancement
New feature or request
Milestone
There are cases where there may not always be a useful value for the
bandwidth
attribute when converting user videos on-the-fly with DASH without multiple qualities. Shaka is asserting thatbandwidth
be defined, and non-zero.https://github.com/google/shaka-player/blob/310e48f8cc2fe5ef4efac808716a93bfb9a2091d/lib/dash/dash_parser.js#L1061
When parsing the manifest, it is forcing
bandwidth
to either be a number greater than zero, or it will beundefined
.However, streams without a
bandwidth
attribute orbandwidth="0"
in the manifest were otherwise working until a more recent change. a452c24 is the change that actually broke playback whenbandwidth
is missing or zero. It is expectingbandwidth
to be a number, and if it is not, it results in anaverageBandwidth
ofNaN
and it will not choose codecs.I believe making
bandwidth
optional aligns with the ExoPlayer's expectations of thebandwidth
attribute in the manifest, which appears to allow it to be optional.https://github.com/google/ExoPlayer/blob/d979469659861f7fe1d39d153b90bdff1ab479cc/library/dash/src/main/java/com/google/android/exoplayer2/source/dash/manifest/DashManifestParser.java#L435
Otherwise, the manifest could have a fake bandwidth value of any number greater than zero and that should at least work around the issue.
The text was updated successfully, but these errors were encountered: