shaka-packager/packager/app
KongQun Yang 40ea1286b9 Add support for EditLists in ISO-BMFF
- EditLists in input files are parsed and applied to sample timestamps.
- An EditList will be inserted in the ISO-BMFF output if
  - There is an offset between the initial presentation timestamp (pts)
    and decoding timestamp (dts). Chrome, as of M67, still uses dts in
    buffered range API [1], which creates various problems when buffered
    range by pts does not align with buffered range by dts. There is
    another bug in Chrome that applies EditList to pts only [2]. This
    means that we can insert an EditList to align pts range and dts range.
  - MediaSamples have negative timestamps (e.g. for Audio Priming).

You may notice the below change on some contents:
- Some media duration is reduced by one or two frames. This is because
  EditList in the input file was ignored in the previous code, so video
  streams start with a zero dts and a non-zero pts; the smaller of dts
  and pts was used as the starting timestamp (related to the earlier
  workaround for Chrome's dts bug), so the calculated duration was
  actually a bit larger than the actual duration. Now with EditList
  applied, the initial pts is reduced to zero, so the media duration is
  also reduced to reflect the actual and correct media duration.

It may also result in negative timestamps in TS/HLS Packed Audio, which
will be addressed in a follow up CL.

Fixes #112.
Partially address b/110782437.

[1] https://crbug.com/718641, fixed but behind MseBufferByPts.
[2] https://crbug.com/354518. Chrome is planning to enable the fix for
    [1] before addressing this bug, so we are safe.

Change-Id: I59317740ad3807ca66fa74b3a18fdf7f32c96aeb
2018-07-26 23:20:21 +00:00
..
test Add support for EditLists in ISO-BMFF 2018-07-26 23:20:21 +00:00
ad_cue_generator_flags.cc Defined Scte35Event struct and out of band cue marker flags 2017-11-16 00:13:29 +00:00
ad_cue_generator_flags.h Defined Scte35Event struct and out of band cue marker flags 2017-11-16 00:13:29 +00:00
crypto_flags.cc Rename webm_subsample_encryption flag to vp9_subsample_encryption 2017-03-30 20:36:43 +00:00
crypto_flags.h Rename webm_subsample_encryption flag to vp9_subsample_encryption 2017-03-30 20:36:43 +00:00
gflags_hex_bytes.cc Move hex string out of packager.h 2017-06-20 22:33:47 +00:00
gflags_hex_bytes.h Move hex string out of packager.h 2017-06-20 22:33:47 +00:00
hls_flags.cc Add --hls_key_uri to allow setting fairplay/identity key uri 2017-11-14 15:49:27 +00:00
hls_flags.h Add --hls_key_uri to allow setting fairplay/identity key uri 2017-11-14 15:49:27 +00:00
job_manager.cc Allow SyncPointQueue to be cancelled 2018-03-27 19:14:37 +00:00
job_manager.h Allow SyncPointQueue to be cancelled 2018-03-27 19:14:37 +00:00
libcrypto_threading.cc Integrate packager top level library 2017-06-13 13:40:26 -07:00
libcrypto_threading.h Rename top level namespace to shaka 2016-05-24 21:55:55 +00:00
manifest_flags.cc Enable segment auto removal for live packaging 2018-05-02 00:18:42 +00:00
manifest_flags.h Enable segment auto removal for live packaging 2018-05-02 00:18:42 +00:00
mpd_flags.cc Support approximate SegmentTimeline 2018-04-30 17:15:47 -07:00
mpd_flags.h Support approximate SegmentTimeline 2018-04-30 17:15:47 -07:00
mpd_generator.cc Update MpdGenerator to allow inject version for testing 2018-05-30 13:16:33 -07:00
mpd_generator_flags.h Move source code into packager directory 2014-10-02 12:32:14 -07:00
muxer_factory.cc Integrate PackedAudioWriter 2018-05-16 18:12:42 -07:00
muxer_factory.h Moved MuxerFactory to own file 2018-01-10 17:51:26 +00:00
muxer_flags.cc Drepcate --num_subsegments_per_sidx 2018-07-02 21:59:14 +00:00
muxer_flags.h Drepcate --num_subsegments_per_sidx 2018-07-02 21:59:14 +00:00
packager_main.cc [HLS] Support AVERAGE-BANDWIDTH 2018-07-12 10:43:49 -07:00
packager_util.cc Support entitlement license with Widevine key server 2018-05-17 21:03:05 +00:00
packager_util.h Support approximate SegmentTimeline 2018-04-30 17:15:47 -07:00
playready_key_encryption_flags.cc Implement multi DRM support. (Part 3) 2018-04-26 18:14:22 +00:00
playready_key_encryption_flags.h Implement multi DRM support. (Part 3) 2018-04-26 18:14:22 +00:00
protection_system_flags.cc Rename Playready to PlayReady. 2018-04-26 11:38:31 -07:00
protection_system_flags.h Implement multi DRM support. (Part 1) 2018-03-03 01:39:16 +00:00
raw_key_encryption_flags.cc Rename fixed_key to raw_key 2017-10-24 21:52:01 +00:00
raw_key_encryption_flags.h Rename fixed_key to raw_key 2017-10-24 21:52:01 +00:00
retired_flags.cc Drepcate --num_subsegments_per_sidx 2018-07-02 21:59:14 +00:00
retired_flags.h Drepcate --num_subsegments_per_sidx 2018-07-02 21:59:14 +00:00
stream_descriptor.cc Cleanup packager_test.py 2018-07-16 19:13:02 +00:00
stream_descriptor.h Integrate packager top level library 2017-06-13 13:40:26 -07:00
validate_flag.cc Add multi-key support in fixed/raw keys 2017-10-24 21:04:49 +00:00
validate_flag.h Add multi-key support in fixed/raw keys 2017-10-24 21:04:49 +00:00
vlog_flags.cc Enable verbose logging through --v or --vmodule 2015-10-28 22:15:50 +00:00
vlog_flags.h Enable verbose logging through --v or --vmodule 2015-10-28 22:15:50 +00:00
widevine_encryption_flags.cc Support entitlement license with Widevine key server 2018-05-17 21:03:05 +00:00
widevine_encryption_flags.h Support entitlement license with Widevine key server 2018-05-17 21:03:05 +00:00