To allow generating Widevine / Playready PSSHs if the corresponding
PSSH generator is specified.
Note that Key Rotation with RawKeySource is designed to be used for
testing only.
Change-Id: Icaf9e74955c082a7b000bd6a08f4561f2e01a2e2
By having 'disable-clang-format' in commit message.
If you have the script setup as git pre-commit, it can be disabled
by '--no-verify' option.
Change-Id: I6fb358e85105255fddde41f950e986c74b7defc9
Problem: Sending samples to the cue alignmenet handler did
not reflect what was more likely to happen. In our
tests we would send all the samples for one stream
then all the samples for another stream. This created
some special cases that would either not happen in
reality or miss cases that would likely happen in
reality.
Changes: Changes all tests to dispatch samples in an interlaced
pattern that better reflects muxed content.
Change-Id: I985092154b62eb12d95499663d195ca6c103bc19
In H265Parser::ParseSliceHeader, the parser does not handle
byte_alignment() from the spec. byte_alignment() reportedly contains
at least one bit, which is not handled right now.
See Section 7.3.2.12 Rec. ITU-T H.265 v3 (04/2015).
Also added a few size sanity checks in H265Parser to make sure the
code does not crash if an invalid input is provided.
Fixes#383.
Change-Id: I33b31396058fc5ba67a0fc119be5fe56ec9443b0
http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#option-lists
RST only accepts two forms for option argument:
- Begins with a letter and consists of [a-zA-Z0-9_].
- Begins with "<" and ends with ">"; any characters except angle
brackets are allowed internally.
Updated documents to obey the above rule.
Also cleaned up the documents to follow the syntaxes defined in
http://docopt.org/.
Change-Id: I06c6fa6db524325373053b26fc99169469664f01
Packager uses ThreadedIO to write media segments and manifest /
playlists. There was a possibility that media segments write being
delayed and scheduled after updating manifest / playlists.
This CL fixes the race condition.
Also added a note on how segments can be synced to cloud storage to
avoid the race condition during file sync.
Also added a live WebM test.
Fixes#386.
Change-Id: Icf9c38cdec715fa3dc2836eab1511131e129fe41
Fixes#387.
Note that the output will not play in Chrome until the Chrome bug
https://crbug.com/837832 is fixed.
Change-Id: Ic3e917161cedfa773c0a18b4a5d7b1254c6f1313
The number of preserved segments outside live window can be
configured using flag --preserved_segments_outside_live_window,
which is default to 50, i.e. 5 minutes for 6s segment.
Note that the segment removal will be disabled if it is set to 0.
Only HLS live playlist and DASH dynamic MPD are affected by this flag.
- Also add end to end tests.
Fixes#223.
Change-Id: I8a566efebe2f1552c7d9509ab017bade5a4a1c98
Problem: The time scale for text was being set to zero in our tests
because it was never needed.
Change: This changes it to use MS as that is what's most common and
requires the least amount of changes.
Change-Id: Ia046ac1994b4cede079d2f801275c7f058d5bdd3
To move us toward no longer need to ensure order when building
our pipeline, use a map to share demuxers between stream descriptors.
This will even allow use to use the same demuxers in the text pipelines
while still building them separately from the audio and video streams.
Change-Id: I4d4dbddbc06adee36cbe7f4aa1f6769f7bb2a3f6
It is not always possible to align segment duration to target duration
exactly. For example, for AAC with sampling rate of 44100, there are
always 1024 audio frames per sample, so the sample duration is
1024/44100. For a target duration of 2 seconds, the closest segment
duration would be 1.984 or 2.00533.
This feature allows MPD generator to treat these segments as having
the same duration, thus allows MPD generator to generate less
SegmentTimeline entries and potentially no SegmentTimeline entries
(replaced with SegmentTemplate@duration instead if
--segment_template_constant_duration flag is enabled).
Under flag --allow_approximate_segment_timeline. Disabled by default.
Fixes#330.
Change-Id: I5044eaa348ebbf45bf792a2af53fc95a115ae21b
- Allow including Widevine and Common SystemID PSSH boxes
for PlayReadyKeySource.
- --playready_key_id and --playready_key flags are deprecated.
- --enable_raw_key_encryption already supports playready PSSH generation.
Addresses issue #245
Change-Id: I072d4f43a3239875959e4c5b1eb6854415d7367e
To ensure that we can parse content with style and region blocks,
this change updates the parser to skip those blocks so that we
can still parse the cues from a file.
Full style and region support will be added later this year.
Issue #380
Change-Id: I11b8fd862a108c27a5c67b15d4703532b44a1214
Removed the logic in MuxerListener to estimate bandwidth from file
size and duration, since it is not compliant to the spec.
MpdBuilder will estimate bandwidth from segment size and duration
if bandwidth is not specified in MediaInfo.
Here is the statement from 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.
Fixes#376.
Change-Id: I0fddce39e709d0cded0a4c9ae59adbbcc97ec5ea
And for HlsNotifier and SimpleHlsNotifier as well.
This will make it easier to add preserve_segments_outside_live_window
param in a later CL.
Change-Id: I86d464fe247e04574158a0a76e39d8a122960ae4
The file_name fields will be used to solely indicate file paths on the
designated file system, and they are used to do normal file operations,
including file creation, file updating and file removal if needed;
added new xxx_url fields, for the URLs that should appear on DASH
manifest or HLS playlists.
xxx_url are the URIs of the media in the manifest. The fields are
converted from file_name fields but adjusted to be relative to DASH
manifest path or HLS playlist path, optionally with base_url prepended.
Previously the file_name fields are converted in place to indicate
URLs when passing to manifest / playlist builders. The original file
names were lost, which made it difficult to remove files outside of
live window.
Now that the input file names are preserved. File system APIs can
operate on the original file names while manifest / playlist generation
functions can operate on URLs.
Issue: #233
Change-Id: I36a64f16e3d1261ce91783a86588f24ad1371662
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
The WebVtt Output Handler did not recognize cue events. This change
allows the handler to accept the events and tell muxer listener
about them.
Issue #362
Change-Id: I7c3318b72e539adc19af587c8e213fdb0af8290b
UTCTiming schemeIdUri and value pairs can be provided to packager using
--utc_timings flag. It should be comma separated list of
schemeIdUri=value pairs.
Note that urn:mpeg:dash:utc:direct:2014 scheme is not supported as it
requires the MPD to be dynamically generated on the fly when MPD is
served to client.
Fixes#311.
Change-Id: Ibc07af8a6d8b2b6261ba3ecd2c02f23809f96614
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
Created "Chain" function to connect a series of handlers together so
that the connection is easier to read.
Changed other calls to use RETURN_IF_ERROR to help make it easier to
read as we no longer need to track the status variable anymore.
Change-Id: Iffb76ca395b6d62f8feb054c09470c77718e8feb
Created a media handler to come after parsers that will handle filling
in gaps between text samples. The padder takes a min duration, and if
the samples do not cover the min duration when flushed, one last empty
sample will be injected so that the samples will go up to the min duration.
Change-Id: I88605059664d09279676edac418ff3d4990d7556
Updated TextChunker to handle incoming CueEvents. Connecting the
text chunker with the cue alignment handler will happen in a later
CL.
Issue: #362
Change-Id: Ib1fa9f457cf4ec0ce413dadcfa7eed5895ecd628