According to DASH spec (23009-1:2014):
Consider a hypothetical constant bitrate channel of
bandwidth with the value of this attribute in bits per second
(bps). Then, if the Representation is continuously delivered
at this bitrate, starting at any SAP that is indicated either by
@startwithsap or by any Segment Index box, a client can
be assured of having enough data for continuous playout
providing playout begins after @minbuffertime *
@bandwidth bits have been received (i.e. at time
@minbuffertime after the first bit is received).
For dependent Representations this value specifies the
bandwidth according to the above definition for the
aggregation of this Representation and all complementary
Representations.
This suggests that max bitrate should be used instead of average
bitrate.
Also cleaned up BandwidthEstimator code.
Fixes#376.
Change-Id: Ibf5896394c5c6bb820849771a2129c59202d2273
Content-Type for Widevine key request was incorrectly set to text/xml,
but it should be application/json.
Also added VLOGS for curl calls.
Fixes#372.
Change-Id: I4230795a582112c6d9c12883b5e61481b63284aa
Two-character ISO-639 code in --default_language was ignored due to
a bug in language code matching as the language code in stream is
always converted to 3-character code.
Fixes#371.
Change-Id: I8618938af583a417446636ff9efe1c72ce822c33
This flag was introduced to workaround a rounding error in Chrome
(probably in other browsers too).
Also although this flag avoids the first frame of a Period to be
dropped due to rounding error but it could cause the last frame of a
Period to be dropped.
Now that we use a high precision Period@duration, we do not expect to
see rounding errors any more. The player would be a better place for
the workaround even if it is still needed.
Related issue: #368.
Change-Id: I3bd517ecc6d548ff62e0c13394edb49d4bc68e8f
Instead, the actual earliest presentation time is used except for
the first segment if there is an offset between presentation time
(pts) and decoding time (dts).
Chrome (as of v66) reports dts instead of pts in buffered ranges in
MSE API. To avoid breaking Chrome, the earliest_presentation_time
of the first segment is set to its dts as Chrome does not like negative
values for
adjusted dts = dts + Period@start (0 for the first period)
- presentationTimeOffset (earliest_presentation_time).
Fixes#303.
Change-Id: I5ca80e05d5570961400499436f2bcc01f06e69e0
Chrome internally uses time accurate to microseconds, which is
implemented per MSE spec (https://www.w3.org/TR/media-source/).
Generate Period@duration with better precision to avoid possible
buffered range gaps in Chrome (possibly other browsers too), which
may lead to other problems like playback stall.
b/74238961
Fixes#368.
Change-Id: I357a0f62b67f75c7ca044bb99ea4e3c8bbb6fecd
SyncPointQueue manages all cue points and returns aligned cue
points to the callers (CueAlignmentHandlers).
CueAlignmentHandler is responsible for aligning cues from different
streams. It uses SyncPointQueue internally to align / synchronize the
cue points.
Issue: #355
Change-Id: I281fecb46a3ca7172d71e7495bdd07b8efdeb283
This is called when reaching end of the file of the media. The duration
of the media is updated.
Fixes#340.
Change-Id: I446f2d341b02125d4a7d8c958bda269b5403cb9c
We have an assert that ensures that the end time is greater than
the start time for any cue. However we never checked that cues
had a non-zero duration when parsing them.
We will throw away cues with a duration of zero (and print a
warning message) as they are not spec compliant.
Closes: #335
Change-Id: I404e8f3a5a8d43eff75a2554db3e38e8d340f421
In the video captured by Android's default camera app, meta box is written as
as Box instead of FullBox specified in the spec.
Closes#319.
Change-Id: I526492fdd505d5929c5161cb1ed1503b724de7e9
Prefer timestamps from Video AdaptationSets if available - this avoids
possible video playback jitters due to gaps.
presentationTimeOffset is not applied to the first period as it may in
negative dts which Chrome does not like: https://crbug.com/398141.
It is safe to apply to subsequent periods as the actual offset applied
takes Period@start into consideration:
offset = Period@start - presentationTimeOffset
The result timestamp with offset applied is close to Period@start, so
it is unlikely to result in a negative dts value.
Closes b/73899306.
Change-Id: If8361f5469610093b3aac6675754536ad7e83c4c
When converting from NAL unit stream to byte stream.
The packager should not assume the parameter sets in the sample is the
same as the parameter sets in sample entry (decoder configuration).
Fixes#327.
Change-Id: I7e84d28a296f4b33db0523cca5eabd62f623e852
Looks like Safari does not like v0 tenc box.
- Use v1 tenc box for cbcs and cens protection_scheme as required by
CENCv3 spec.
- Set crypt_byte_block and skip_byte_block to 0 for full sample
encryption cbcs and cens.
Fixes#326
Change-Id: I5581cd856fffc4ff104d950f3ca19b9337d57a78
Create a StreamDescriptor class that can be used to build the stream
descriptor command line argument.
Change-Id: Ifcba4f37d69a1a36c4add51a2a10c3f0c8b2ccd7
The old vtt sample data has the header as "WEBVTT FILE" which does
not reflect what the spec says it should be.
This changes it to "WEBVTT" as described in the WebVTT spec.
Change-Id: Ib54396a8b937501a835dafe966bf05b95b0b22c4
When a gap is found in the text stream, the WebVtt to Mp4 converter will
now output the special empty vtt cue.
Change-Id: I8be88c6b7589aa120a2215e1e4b8e98031fe326d
Closes: #324
- Add empty lines between different types of renditions to improve
readability.
- Group variants with the same audio/text group together, as it is
where the Adaptation occurs.
- Write master playlist after writing media playlists. This makes
more sense and it is also necessary to have the bandwidth of
the last iframe playist segment correctly computed.
- For fMP4, I-Frame segment must include the 'moof' header.
- Fix a problem that hls_iframe_playlist_name is not passed to
MuxerListenerFactory.
Issue: #287
Change-Id: Icf37c5de1dc29f85ae3f419cbc3264d04ca491a4
Adding all the code needed to allow the webvtt to mp4 converter to
send empty vtt cues. This change does everything except writing the
mp4 box.
Bug: #324
Change-Id: I16188e6357632b2ed06f7e9bab7844f093266696
Instead of always tracking segments with an index, this change makes a struct
that will act as the segment and track which segments are in it. Each
segment will store all the samples in the order they were given, it will
avoid any sorting.
Closes: 72867775
Change-Id: Ic5829161510fe8f3320d960c3bc4a276c26ff3be
Create WebVtt test that shows that the current implementation of the
webvtt segmenter does not respect the input order of cues.
Bug: 72867775
Change-Id: I811b3a93c10650e0cf9290c9c0c1680f562deb30
Took the same logic for DEFAULT and AUTOSELECT used by audio and
applied it to text. Combined the build tag logic for audio and
text as they were the same expect for a couple fields.
Bug: #205
Change-Id: I75ecbf4b25cd559b826982d12a5b132e70b83b69
The master playlist and media playlist did not have implementations
for handling text streams. This change adds support for both.
Bug: #205
Change-Id: I1329b8cc2585f15b89959071db9dd16d35847cba