Commit Graph

115 Commits

Author SHA1 Message Date
KongQun Yang 4b97a6d8a2 Add support for --default_text_language
It allows users to override the default language for text tracks.

If not specified, --default_language applies to both audio and text
tracks.

Issue #430.

Change-Id: I86a9baba2072be27b6661fa7b65a8bc8b6adb3cc
2018-11-26 13:42:58 -08:00
KongQun Yang 273ab09f05 Support HLS characteristics
Add hls_characteristics stream descriptor, which is a colon or semi-colon
separated list of strings. It is optional.

Fixes #430.

Change-Id: Ifcf79316e68768ff065891933de565cd0ff32ec4
2018-11-26 20:02:43 +00:00
KongQun Yang 1aeabc10f1 Use -x264-params instead of -x264opts in the docs
-x264opts is deprecated: https://trac.ffmpeg.org/wiki/Encode/H.264.

Fixes #507.

Change-Id: Idb6cda03fbdfb88804e2297df4b9986ea87e4e64
2018-11-19 21:11:47 +00:00
KongQun Yang 70dfced819 Fix incorrect spelling of utc_timings in the doc
Should be utc_timings but was spelled as utc_timing.

Fixes #496.

Change-Id: I77aeb3caf54493ff8c1367f6f078de192860c39a
2018-11-08 14:08:12 -08:00
KongQun Yang 8d11e5ea64 Support Marlin DRM signaling in DASH
Only Marlin Adaptive Streaming Specification – Simple Profile is
supported.

Two additional updates:
- Remove FairPlay ContentProtection element from DASH mpd as FairPlay
  does not define a signaling in DASH.
- Updated end to end test to include all DRMs we support.

Closes #381.

Change-Id: Id12269b471ea34983b782cbd92f687332292ef59
2018-10-01 20:22:58 +00:00
KongQun Yang 9b655189cf Disable bundled_binutils and bundled_gold on Linux
Keep bundled binutil scripts but not downloading actual binaries by default.

Automatic downloading of binutils has been causing problems for some users:
see #164, #412, #440.

Using bundled binutils helps reduce linking time, but packager codebase is
relatively small, so the gain is not significant.

Local testing shows that the full build time increases from 1m42s to 1m50s, i.e.
an increase of about 8s, or ~8%.

User can still enable the usage of bundled binutils by running
'python src/packager/third_party/binutils/download.py' and set
'linux_use_bundled_binutils' and 'linux_use_bundled_gold' to 1 in GYP_DEFINES.

Change-Id: I7ecae2333861f41054f957d0a6081dae948167bd
2018-08-24 21:14:19 +00:00
KongQun Yang f49b89280c Support STYLE and REGION in WebVTT
Note that STYLE and REGION are not supported in mp4 container due to
spec limitation as 14496-30:2014 does not specify a way to signal
styles/regions inside mp4.

Closes #344.

Change-Id: I05c14df916f7b2c7ca4364ee9407e0eda4dc7a3f
2018-08-20 14:12:07 -07:00
KongQun Yang 715ed939f1 Add instructions to build on Alpine Linux
- Also fixed compilations in Alpine Linux and other flavors of Linux.
- Added container versions in docker files to always use a verified
  version.

Closes #164.

Change-Id: I949a8709e4d70c49129c9c2e8608dd78193d964c
2018-08-17 20:46:11 +00:00
KongQun Yang 59cc6ad511 Clean up in documentation
Bug: 112707139

Change-Id: Ifae98ad3dc94562918c8fdd254c5bbeb7a444586
2018-08-16 20:08:03 +00:00
KongQun Yang 451406ad3f Update DRM documentations
Fixes: #245.
Fixes: #306.

Change-Id: Ib847f5cfbf01b98f7a7e088dfcbc4d25cbbc15f2
2018-08-15 17:18:57 -07:00
KongQun Yang 9c08808c7f Add documentation for Ad Insertion
Change-Id: Ia001a0a624c49854a31fd26008b2c7b3e81012f7
2018-08-16 00:14:07 +00:00
KongQun Yang 8612798de1 Change --additional_protection_systems to --protection_systems
Issue: #245.

Change-Id: Ib7da3b874207623e3ee0b1a942ecb2509e750669
2018-08-14 22:12:55 +00:00
KongQun Yang c503db8e4d Add instructions for missing curl CA bundle on mac
Change-Id: I39f36cb08cd816a0373713b21ed1f8bad0d86124
2018-08-14 21:30:45 +00:00
KongQun Yang db076d6892 Support Fairplay in --additional_protection_systems
Issue: #245.

Change-Id: I15187c1d3463534bf5e11ff97032311bb1d0c3bf
2018-08-09 23:59:40 +00:00
KongQun Yang 0fe31423cb Multi-DRM flag refactoring
- Added flag --additional_protection_systems to specify multi-DRM
  options.
- Deprecated old multi-DRM flags: --generate_widevine_pssh
                                  --generate_playready_pssh
                                  --generate_common_pssh

Issue: #245.

Change-Id: If926bc9d481e941aa2269b6672bf2ba5411c3a50
2018-08-09 22:01:46 +00:00
KongQun Yang a47f79a014 Update pssh sample to remove provider
provider has been deprecated from Widevine PSSH.

Bug: 110944320

Change-Id: Ib8223a63a6379e46d9cdc33eff901b92ee54acca
2018-08-02 14:25:36 -07:00
KongQun Yang 51d39d96a1 Add offset to tranport streams (MPEG2-TS, HLS Packed Audio)
Configurable with --transport_stream_offset_ms.

This is needed to compensate for possible negative timestamps in
inputs, which could happen on ISO-BMFF with EditLists.

Issue #112.

Change-Id: I0fce8766c9df2911b9bb859c1e54052a8ed2abfb
2018-07-26 23:20:21 +00:00
Haoming Chen d15ee877cb Add an example command for using trick play.
Change-Id: Ibf1f455355f72f703e7732833a7a11d99874ce31
2018-07-25 23:58:07 -07:00
Haoming Chen 03e69f1b85 Update the tutorial and documentation for multi-DRM support.
Change-Id: I61061583f44dec1a44e4021a9d78affcaeb903d0
2018-07-26 06:13:37 +00:00
Dennis E. Mungai 8cb365034a Fix typo for ARM cross-compile instructions (#437) 2018-07-23 10:39:08 -07:00
KongQun Yang 99a2ad03af [HLS] Support AVERAGE-BANDWIDTH
Issue #361

Change-Id: Id8eb8283675cba5ec7234d13c4ac235f34e3bec9
2018-07-12 10:43:49 -07:00
KongQun Yang 1742e03471 Drepcate --num_subsegments_per_sidx
This flag was designed for two purpose:
- Grouping fragments into subsegments, achieving three level hierarchy:
  segment < subsegment < fragment.
- Indicate whether to generate 'sidx' box in media segments (when the
  value is set to a negative number).

There are no practical use case for the first purpose. Removing it to
simplify the code and reduce the confusion.

Introduce another flag --generate_sidx_in_media_segments for the second
purpose.

Change-Id: I4be7cd42662fb324c1158b978e05768ee49dd048
2018-07-02 21:59:14 +00:00
KongQun Yang f089d1d0d4 Deprecate --mp4_use_decoding_timestamp_in_timeline
It was implemented to workaround Chromium's DTS
https://crbug.com/398130, but the workaround does not really work in
all situations.

Remove it now as we already have another workaround available.

Change-Id: I291f559d78120fb743a6679b7d927e5bbc5b6b4e
2018-07-02 21:59:01 +00:00
KongQun Yang d3903fad19 Add buffer_size UDP file options
This allows UDP receive buffer size to be increased to avoid potential
packet loss result from receive buffer overrun.

Another related flag is --io_cache_size. buffer_size in UDP options
defines the UDP buffer size of the underlying system while
io_cache_size defines the size of the internal circular buffer managed
by Shaka Packager.

Closes #411

Change-Id: I57c843a88f13da546417dadc2a78df2bee0a00f3
2018-06-29 00:19:30 +00:00
KongQun Yang e5863f1e0e Warns if HLS type is not set to LIVE for UDP inputs
- Also fixed documentation missing --hls_playlist_type LIVE for HLS
  live examples.
- Also updated packager.cc to use RETURN_IF_ERROR macro for
  consistency.

Fixes #347
Fixes #403

Change-Id: Idbccd7137b873170cd54e2c780bd554d25031a0b
2018-06-07 20:47:57 +00:00
KongQun Yang 951fedaf41 Make docs/udpate_docs.sh executable
Including a misc clean-up in the script.

Change-Id: I7bda3ac52e15712356cc286caba08e1fd9db68e1
2018-05-25 20:43:43 +00:00
KongQun Yang dd68b3e386 Update HLS examples to use elementary audio with TS output
Issue: #342.

Change-Id: Idd173c76d67d20d9c88be5ef2d6bfc1ce85b5523
2018-05-18 20:35:43 +00:00
KongQun Yang 0b2e1a6b40 Add update_docs.sh script for docs generation
Change-Id: I6195dc84cf0ecf69680d857b35320b068a9c54fb
2018-05-03 18:35:44 +00:00
KongQun Yang 764c7077a2 Fix documentation syntaxes for RST option-list
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
2018-05-03 18:08:12 +00:00
KongQun Yang 2d919b5a31 Fix potential partial DASH segments during live packaging
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
2018-05-03 09:26:23 -07:00
KongQun Yang a7463f60c1 Enable segment auto removal for live packaging
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
2018-05-02 00:18:42 +00:00
KongQun Yang 224b597b48 Support approximate SegmentTimeline
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
2018-04-30 17:15:47 -07:00
Haoming Chen dddbb19701 Rename Playready to PlayReady.
Change-Id: I11e0b0a0cc32aec574804e7cb02291dc3174357c
2018-04-26 11:38:31 -07:00
KongQun Yang 222737d5b5 Support UTCTiming
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
2018-04-04 01:37:01 +00:00
KongQun Yang 587de5be30 [Doc] Make UDP file options clearer
Issue #332.

Change-Id: I3a2b1e1e0525eaba5bb657ce0481d96ceafb4e89
2018-03-17 00:36:06 +00:00
Darío Hereñú d7ddf593c5 [Doc] Minor clean up on linux_profiling.md (#281) 2018-03-12 10:15:47 -07: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 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
KongQun Yang 570a2d1a15 Support 'iframe_playlist_name' stream descriptor
Issue: #287

Change-Id: I484761dfacadce05175d16c4c12454f0ed932579
2018-02-02 22:00:18 +00:00
KongQun Yang d8e3ca344c Added example with DASH+HLS
Also fixed a few documentation problems.

Change-Id: I52cfda8f04635235fabef617af482a0ce66970ea
2018-01-29 23:17:10 +00:00
KongQun Yang d9871330e7 Move common manifest flags out of mpd_flags.cc
Also updated documentations.

Fixes #304

Change-Id: I5e8e87b005ebfa9dc78d47e2501585b083120f6c
2018-01-19 21:02:54 +00:00
KongQun Yang fcc334d652 [Doc] Fix a few problems
- Add --time_shift_buffer_depth to HLS doc.
- Fix a problem in HLS tutorial

Partially address #304, fixes #305

Change-Id: I60bc1eb659a30beb0a6ab73433f4cc99a7deab07
2017-12-21 23:07:59 +00:00
Michael Stillwell a8f46fcd2e Update playlist_name docs (#307)
Make it clear that shaka packager will create the playlist file.

#305
2017-12-20 10:25:58 -08:00
KongQun Yang d089a36ca9 [Doc] Replace basic_usage.md with basic_usage.rst
Change-Id: I0b1284041000174809365659631985bcaf9db3f7
2017-12-12 00:24:36 +00:00
KongQun Yang 82e0fd2095 Default multicast interface address to "0.0.0.0" if absent
It aligns with what a lot of other apps are doing, e.g. tsplay.

Also added notes in docker to adjust network setting if wants to use
multicast in docker container.

Change-Id: I666a8979cc041c904f7ff8e3e022f800c0830d5d
2017-12-04 19:21:52 +00:00
KongQun Yang 75e1fc3175 Added architecture diagram
Also remove outdated design.md.

Change-Id: I237b374a2fffe348b1daf5f8d1c37c57b4898fde
2017-12-01 00:29:50 +00:00
KongQun Yang 5cf2b17ade Add --hls_key_uri to allow setting fairplay/identity key uri
Change-Id: I52e0f56cd10390faf515170f407ea488a6b3c9fc
2017-11-14 15:49:27 +00:00
KongQun Yang d66d307fc2 Rename fixed_key to raw_key
Change-Id: I1ee9398387b54aa685a5bef5b8704849e62ebae3
2017-10-24 21:52:01 +00:00
KongQun Yang 7c38963c29 [doc] Update raw key tutorial
Change-Id: Ife841975c036cf8042c9775583c409e0daa089c7
2017-10-24 21:51:39 +00:00
KongQun Yang 1bf1ec2445 Add multi-key support in fixed/raw keys
The keys can be specified in --keys option, with the form of
  label=<label>:key_id=<32-digit hex string>:key=<32-digit hex string>,label=...

There can be multiple "label=..." block. The DRM label can be one
of "AUDIO, SD, HD, UHD1, UHD2" or a custom label.

Mark --key and --key_id as deprecated. We can achieve the same result
with --keys=label=:key_id=<key_id>:key=<key>.

Also add a new optional field in stream descriptor: drm_label, which
is used to overwrite the internally generated DRM label for the stream.
If not provided, the DRM label is generated automatically based on
audio/video information, e.g. resolution.

Code changes:
- Merged RawKeyEncryptionParams and RawKeyDecryptionParams into
  RawKeyParams.
- Make FixedKeySource accepts RawKeyParams as input.

Change-Id: Ic8c2f071cc71188e13f14bc6396fc2b3ffa5cac6
2017-10-24 21:04:49 +00:00
Joey Parrish e2bb22c633 Update docs for HLS descriptor fields
These fields are no longer required, and have sensible defaults.

Change-Id: I35bd489c8e6058f3272210cb6f3b0f504819e7c0
2017-10-17 11:37:44 -07:00
KongQun Yang df6878ee6d Update ffmpeg piping with udp and rtp
Also updated the tutorial for live and added ffmpeg_piping to toc.

Change-Id: I5596723cbd709e742ceab0f0789801f58606b932
2017-09-22 15:28:59 -07:00
KongQun Yang 4e7f7ac04b Fix README rendering problems
Change-Id: I3e2b592eef99ea1895cf32a86e135932730a0b82
2017-09-19 20:30:30 -07:00
KongQun Yang 21b0ca6ea5 Cleanup README
Moved build instructions and docker instructions to separate docs.

Removed command samples which are no longer needed as we have better
tutorials now.

Change-Id: I340c5653a6553158325970dd86d76fa11e69bcbd
2017-09-19 18:44:39 -07:00
KongQun Yang fcf2873211 Updated style for option list and field list
This makes them looking better.

Change-Id: Icf3827a779bda470ed6a6ac8e56d2daa19e773a5
2017-09-19 14:52:25 -07:00
KongQun Yang c64b92bf8f Sphinxdoc configure and other main pages
Build sphinx docs in docs/ directory:

$ make html

The outputs are created in out/sphinx directory.

Change-Id: I040915a30aa52d41b18e04741e45622fa61244f6
2017-09-19 14:48:52 -07:00
KongQun Yang 6e2b4a28e1 Tutorials for Sphinxdoc
Change-Id: I3d43205b81d168c60f7ab2b7f246bd8a07e68e43
2017-09-19 21:45:33 +00:00
KongQun Yang 7627871428 Update Doxygen config file
Doxygen should run under src/ directory:

$ doxygen docs/Doxyfile

Outputs are created in out/doxygen.

Change-Id: I9dd1a9aa158851d37ff9a2e37f701757eb3e577c
2017-09-15 22:02:32 +00:00
KongQun Yang 0adf0492ab Move command line options to Sphinxdoc
Change-Id: Ia043612012ff3d101afcf3366d95f9001f0dc8f4
2017-09-13 00:09:55 +00:00
KongQun Yang 18cdbd4121 Deprecate availability_time_offset MPD flag
'availability_time_offset' is not an attribute in MPD specification,
but used to calculate availability_start_time to adjust segment
availability time. A similar effect can be achieved with standard
blessed suggested_presentation_delay flag.

If suggested_presentation_delay is not set, player is expected to
choose a suitable value.

Change-Id: I1d540bd4347b4f04b6cc5ec0778e1a5392009b09
2017-05-22 23:14:16 +00:00
Kongqun Yang 6e8aa27e74 Update README and LICENSE
1. Add Windows support in README.
2. Add a useful links section in README.
3. Set line length to 80 characters in README; if exceeded,
   will wrap to a new line. This won't affect the presentation
   for the markdown.
4. Include the content of Chromium.License in License file.

Change-Id: I67f6d5935b46bc05fbcbf0a608aca9b0ae167173
2016-09-07 19:22:41 +00:00
Kongqun Yang 06654da35a Rename edash-packager to shaka-packager in markdown files
Issue #103

Change-Id: I2d9b4985ca4046972e35ef3006691ca7017f78be
2016-05-24 21:55:07 +00:00
KongQun Yang 7869d509a2 Release 1.3.0
Change-Id: Ia6707938d539888de5178df79e1088fdbedcdd73
2016-01-15 16:00:37 -08:00
KongQun Yang 9c95309c12 Pull profiling dependency from Chromium
Profiling can be enabled by setting profiling=1 in gyp, e.g.
  GYP_DEFINES="profiling=1" gclient runhooks

To turn on heap profiling, use the HEAPPROFILE environment variable
to specify a filename for the heap profile dump, e.g.
  HEAPPROFILE=/tmp/heapprofile out/Release/packager ...

To turn on cpu profiling, use the CPUPROFILE environment variable
to specify a filename for the cpu profile dump, e.g.
  CPUPROFILE=/tmp/cpuprofile out/Release/packager ...

Note that profiling may not work for debug builds, so use release
build if possible.

See docs/linux_profiling.md for details.

This change will help identify and resolve problem behind Issue #61.

Change-Id: I6f85a04ed82dd0cb3588e6b38e8ceb68dac6c436
2015-12-29 17:14:02 -08:00