Commit Graph

1024 Commits

Author SHA1 Message Date
Aaron Vaage 56caecd073 Rename WebVttSegmenter To TextChunker
Renamed the webvtt segmenter to text chunker as there is nothing
webvtt specific in the code.

Change-Id: I0111c50d545fa168d945b39bc8a78c46c62678be
2018-03-26 17:58:56 +00:00
Aaron Vaage 2dd198a9d2 Move WebVtt Segmenter To Chunking Directory
Move the webvtt segmenter to the chunking directory so that it
can be converted to a general purpose text chunker.

Change-Id: I9ecd7ee39cb73070dab07b64f65ef24af1404813
2018-03-26 17:58:38 +00:00
KongQun Yang 4e57259d2a Integrate CueAlignmentHandler
Also changed ChunkingHandler to be one-one handler.

Issue: #355

Change-Id: Ie98a96bcc0ddded347699c9f333f604826976d11
2018-03-26 17:58:30 +00:00
Aaron Vaage 2b337e29f6 Removed WebVTT Pipeline Tests
Now that we have the end-to-end tests, we no longer need the webvtt pipeline
tests to verify that it is working.

Change-Id: I4ebec34e66eda67c40999d8802b447e2551e1fa6
2018-03-26 17:57:47 +00:00
Aaron Vaage a191c25f57 Clean Up WebVtt Parser
There were a couple of bad practices in WebVtt that needed to
be cleaned-up.

Change-Id: I0fe21e26f11141709d8d855077805fc625e6dad5
2018-03-23 14:19:52 -07:00
KongQun Yang 6ffa344553 Moves AdaptationSet@id management out of Period class
It is now managed in SimpleMpdNotifier.

This avoids unnecessary increment in AdaptationSet id counter.

Also makes sure the AdaptationSet is sorted by id in XML output.

Change-Id: Ibcd0b047a71c19cd30ad7d8af9a2ed0bb05e043e
2018-03-22 12:15:43 -07:00
Aaron Vaage 3b5b2bccca Implements SyncPointQueue and CueAlignmentHandler
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
2018-03-22 18:21:40 +00:00
KongQun Yang 587de5be30 [Doc] Make UDP file options clearer
Issue #332.

Change-Id: I3a2b1e1e0525eaba5bb657ce0481d96ceafb4e89
2018-03-17 00:36:06 +00:00
Aaron Vaage 833b8165f1 Change Scte35 to use double for time
Change-Id: I2588d3c86d48dc2d9f3692aa0aab28b9de63d109
2018-03-15 18:11:00 -07:00
Aaron Vaage 834ceffd18 Change CueEvent to use time in seconds
Change-Id: I03527db76905f25f0a142940f5fcf73e2a92d42f
2018-03-16 01:10:10 +00:00
Aaron Vaage 631bbdc883 Update Encrypted Tests to Use DiffDir
This changes almost all encrypted tests to use DiffDir. The remaining
un-updated tests are tests that won't match every time.

Change-Id: I858bbaa0beea34887cc3100eb784aa2aecd5a0a5
2018-03-13 16:37:10 +00:00
Aaron Vaage fb2dfe129c Update CheckTestResults to sanitize media info
Change MediaInfo media paths in test output to only use the filename so
that they can be compared between test runs.

Change-Id: I26bb3f5ce79a83400b8a162c61cf5b54e41f9c70
2018-03-13 16:37:10 +00:00
Darío Hereñú d7ddf593c5 [Doc] Minor clean up on linux_profiling.md (#281) 2018-03-12 10:15:47 -07:00
Aaron Vaage 5fee0391fb Change all HLS tests to generate iframe playlists
iframe playlists will be given a name based on the output name of
the main stream. This is done to ensure unique filenames between
different video output streams.

Change-Id: Id0de9c5834599e9d896243e30569c55f34e7cd68
2018-03-07 17:29:47 -08:00
Aaron Vaage b2ce6322b6 Remove Test File Index in packager_test.py
Instead of using the test file's index in a list to create the output
name, use the original filename and the descriptor.

This caused some problems with file name collisions when some tests
were using the same name. That was fixed by changing the names. This
will go away once they are transitioned to use DiffDir like the other
tests.

Change-Id: I0a4c480406705ca63fcea61c86c67d4a5f739295
2018-03-06 21:38:04 +00:00
fatpelt 6a8d2aa443 Add Source Specific Multicast (SSM) support
SSM can be enabled using "source" option in UDP options. Previously, "source" is considered the same as "interface", which is incorrect. 

Fixes #332.
2018-03-06 10:09:28 -08:00
KongQun Yang f2e9c95628 CHANGELOG for v2.0.1
Change-Id: I7e509f4a8b23b956d76cc93907361bd737995737
2018-03-06 01:45:53 +00:00
KongQun Yang b24a95b1aa Rewrite init segment in MultiSegmentSegmenter::DoFinalize
This is called when reaching end of the file of the media. The duration
of the media is updated.

Fixes #340.

Change-Id: I446f2d341b02125d4a7d8c958bda269b5403cb9c
2018-03-05 14:25:08 -08:00
Haoming Chen 76d68de6c1 Implement multi DRM support. (Part 1)
- Refactoring current clearkey DRM support for Widevine key source.
- Add playready pssh box in Widevine key source encrypted content.

Partially addresses issue #245

Change-Id: Id30ef02ff9f8dc0e2c58d62479e07896452919cc
2018-03-03 01:39:16 +00:00
KongQun Yang 62bfc1c6c1 Recognize m4s as a valid extension for mp4
Closes #331.

Change-Id: Ic4aaa02245b31a0aa4fdfe08212fa3b242cd9262
2018-03-02 23:22:45 +00:00
Aaron Vaage 7dd88ca5b2 Create CheckLiveTestResults
Created a method to compare test output for live tests. This wraps
CheckTestResults but first replaces the times that would diff between
manifests.

Change-Id: Iafb51a28a9bcb9f32b210c6d76bf23e2b9a3e0d6
2018-03-02 21:00:03 +00:00
Aaron Vaage 033fa65105 Removed Old WebVtt Code
Now that we have the new webvtt code in place, we don't need to keep the
old solution.

Change-Id: I20540ba3adf93f535f0ed011acb8e2555653522a
2018-03-02 20:59:23 +00:00
Aaron Vaage 74c53239dd Updated Nested Directories Test
This require a change to the update gold method as it would not
create nested directories. Instead it deletes the old directory
and copies the whole new directory over. This made the code simplier
and far-less error prone.

Change-Id: I1da5d9bda171b0f106d1425b204139dfbcb39b42
2018-03-02 12:21:39 -08:00
Aaron Vaage 4ace2754fd Avoid Full Path until Needed in packager_test.py
To make working with file names easier in packager_test.py _GetStream
the full path is not created until needed so that multiple paths can
use the same root filename.

Change-Id: I23a9231433b22ab5cef9b88bd6359f351da56eda
2018-03-02 10:27:35 -08:00
Aaron Vaage cd16e95d79 Make All Output Filenames Similar
Changed all output file names (not paths) to follow the pattern that
any qualifier (e.g. trick play) will be join the current name using '-'
but will use '_' within itself (e.g. trick_play_1).

Change-Id: Ib0247bf1ca6d94815fedaaf73d3a400d31c20c40
2018-03-02 10:27:34 -08:00
Aaron Vaage 7dd80884c3 WebVtt Ignore Zero Duration Cues
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
2018-03-02 01:25:41 +00:00
KongQun Yang de716a6544 Skip reading meta box as it may not be well formed
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
2018-03-01 20:21:37 +00:00
KongQun Yang ee9b7f6392 Calculate presentationTimeOffset and Period@duration from segments
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
2018-03-01 08:55:10 -08:00
Aaron Vaage 30b5fdf19f Add Text Codec To Codec String
This change has the hls master playlist add the text codec string
to the list of codecs in a variant.

Bug: 72942756

Change-Id: Ib25bb2064a291d10d7b1d261a4307991df62220c
2018-02-28 19:23:36 +00:00
Aaron Vaage c7929b1505 Remove "with" from test names
Remove the leading "with" from test directories.

Bug: 73830478
Change-Id: I45a0914b5a0e56ec9d3340ec81eb5048c1d653a3
2018-02-27 17:43:16 -08:00
Aaron Vaage bbdcf5ee91 Fix Wrong Remove Function in Packager Test
Change-Id: I58350c2041abfd3b9c533003d408d447b9213123
2018-02-27 22:30:30 +00:00
Aaron Vaage a097aa4d3b Update Many Tests to Use CheckTestResults
Updated as many tests as we easily could. The tests that were not updated
all use live manifests or encryption that all require some "help", either
by dealing with times differing or with verifying decryption.

Bug: 73830478
Change-Id: I6803c2d960b71b459eb57b7a5e562164bb713e2a
2018-02-27 13:32:32 -08:00
Aaron Vaage 60160fe602 Change Old Test Names to Current Standard
Change-Id: Ib74b1726f6515ec562fdb82a2af390e43c36b94f
2018-02-27 13:32:32 -08:00
Aaron Vaage 6e0088c4c0 Change "AudioVideo" test to use DiffDir
Changed the end-to-end test "AudioVideo" to use diff dir
instead of manually checking each file.

Change-Id: Ic1ce1e3664cde7b2b2db262a9fde0cbe2f5b400a
2018-02-27 17:12:50 +00:00
KongQun Yang b81b832522 Create GetStream
Created GetStream, a function used to get the stream descriptor for a
single stream. This allows for finer control over the stream compared
to the batch GetStreams.

Added "trick_play_factor" to GetStream so that the trick play factor
did not have to be added the stream descriptor value and "injected"
into the stream.

Change-Id: Ifbde64b961a673aafa5f6d21f33a68d02fb46610
2018-02-27 17:12:36 +00:00
Aaron Vaage 9547000eb6 Fix Update Golden With DiffDir
Change-Id: I30c79a2acaae2d3066982d84776aaa922e183515
2018-02-27 17:12:28 +00:00
Aaron Vaage 387fe8e33b Isolated OnMediaSample in Chunker
Change-Id: I3af45543a1da1d1cf0b0741dd732dc71b2c30abe
2018-02-23 23:16:35 +00:00
Aaron Vaage 21acb41e63 Isolate OnScte35Event in ChunkerHandler
Change-Id: I9b34f959c22df498a338eb49c87b67003617ead2
2018-02-23 23:12:11 +00:00
Aaron Vaage d9d2cb3e1f Isolate OnStreamInfo in Chunking Handler
Change-Id: If35b9f545f96237095177438a5f95f964cbbfe3d
2018-02-23 23:12:00 +00:00
Aaron Vaage a82ac20dbb Updated "testFirstStream" to use DiffDir
Change-Id: I8c279ba0c208f1e56d53460ae134b3ed8c5f552c
2018-02-23 10:10:34 -08:00
Aaron Vaage 7096ca8998 HLS WebVtt End-to-End Tests
Created end-to-end tests for the segmented webvtt text in HLS. The
text stream is longer than both audio and video, so there are more
text segments than video/audio.

Change-Id: Ib860ccd3f2ac0048983fdeebe3847a0b9dcbc160
2018-02-23 16:55:50 +00:00
Aaron Vaage 393f989839 Create DiffDir in packager_test.py
Created a method to diff the output dir against the golden copy
of the output dir. The goal with this is to simplify our end-to-end
test structure by removing the need to track the output files within
the test runner.

With all the golden output in one directory, this makes it easier to
setup end-to-end tests and even allows the golden files to be playable.

This should not affect the repo size too much as duplicate files will
only be stored in the git object store once.

Tests will migrate to this in separate CLs.

Change-Id: Id1be9f8f60c9e362b9b615445dd8ca7da996af4c
2018-02-20 11:09:06 -08:00
KongQun Yang 74f6cefb82 Change "live" setting to be "segmented"
Changed the "live" setting in _GetStreams to be "segmented" so that it
make sense in a more general sense.

Change-Id: I2ceaad67653e1e2237533b68fccbc9fe3fabfc9b
2018-02-17 00:24:24 +00:00
KongQun Yang 1d6a2de5ab Update the date in CHANGELOG
Change-Id: Ifd39435013e296f71e8b48ca9ac1869324f8cd0d
2018-02-10 23:30:18 +00:00
KongQun Yang 4bf5bfb204 CHANGELOG for v2.0.0
Change-Id: Ia72f9f427aed40bbe05249668c86dc9944e37adf
2018-02-10 23:17:47 +00:00
KongQun Yang 594d1f0de4 Copy over parameter sets in the sample if different to sample entry
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
2018-02-09 15:43:00 -08:00
KongQun Yang 11cbbd86fb Fix fMP4 'cbcs' playback issue in Safari
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
2018-02-08 23:40:46 -08:00
KongQun Yang aa4bb49b2f Fix language option not honored on text streams
Change-Id: I9034b779e9b193c39201a5f2d142ec390927e5f7
2018-02-08 03:48:46 +00:00
KongQun Yang 0401d62a3f Update documentation on Widevine DRM with more examples
Change-Id: I5230e8b138c4abda44c2fb54bc2f8b2d7d3e3b85
2018-02-08 02:35:53 +00:00
KongQun Yang 3606f313d6 Updated documentation with webvtt and iframe playlist examples
Closes #205, #287

Change-Id: I77ca15f63e262eb0eaff7b6d74d259d30da9f823
2018-02-08 02:35:39 +00:00