Skip to content

Commit

Permalink
feat: VR4452 - force HLS command-line ordering, upstream 3.2.0 with D…
Browse files Browse the repository at this point in the history
…ovi 8.1 (shaka-project#35)

* fix: BaseURL missing when MPD base path is empty (shaka-project#1380)

The check for `!mpd_dir.empty()` is not needed because MakePathRelative
handles the case where the parent path is empty. As a result of this
check the base url, segment url, or segment template URLs were all
missing in cases where the mpd output was in the current working
directory.

Fixes shaka-project#1378

* chore(main): release 3.0.4 (shaka-project#1377)

:robot: I have created a release *beep* *boop*
---


## [3.0.4](shaka-project/shaka-packager@v3.0.3...v3.0.4) (2024-03-27)


### Bug Fixes

* BaseURL missing when MPD base path is empty ([shaka-project#1380](shaka-project#1380)) ([90c3c3f](shaka-project@90c3c3f)), closes [shaka-project#1378](shaka-project#1378)
* Fix NPM binary selection on ARM Macs ([shaka-project#1376](shaka-project#1376)) ([733af91](shaka-project@733af91)), closes [shaka-project#1375](shaka-project#1375)

---
This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).

* build: turn on integration tests in ctest by default (shaka-project#1381)

They can still be skipped by passing `-DSKIP_INTEGRATION_TESTS=ON` for
the build configuration. Fix integration tests so they run correctly when building out of tree.

Use FindPython3 in CMake to fix build and integration tests on Windows.

* feat: teletext formatting (shaka-project#1384)

This PR adds parsing of teletext styling, and rendering of the styling
in output TTML and WebVTT subtitle tracks.

Beyond unit tests, I've used the sample
https://drive.google.com/file/d/19ZYsoeUfH85gEilQkaAdLbPhC4CxhDEh/view?usp=sharing
which has rather advanced subtitling with two separate rows at the same
time, where one is left aligned and another is right aligned. This
necessitates two parallel cues to be rendered. It also has some colored
text.

Solve shaka-project#1335.

## parse teletext styling and formatting

Extend the teletext parser to parse the teletext styling and formatting.
This includes translating rows into regions, calculating alignment
from start and stop position of the text, and extracting text and
background colors.

The colors are limited to full lines.
Both lines and regions are propagated in the TextSample structures.
This is because the number of lines may differ from different sources.
For teletext, there are 24 rows, but they are essentially always
used with double height, so the number of output lines is 12
from 0 to 11.
There are also corresponding regions are denoted "ttx_R",
where R is an integer row number. A renderer can use either
the line number or the region ID to render the text.

## ttml generation for teletext to EBU-TT-D

Add support to render teletext input in EBU-TT-D (IMSC-1) format.
This includes appropriate regions ttx_0 to ttx_11 signalled
in the TextSamples, alignment and text and background colors.

The general TTML output has been changed to always include
metadata, layout, and styling nodes, even if they are empty.

EBU-TT-D is detected by the presence of "ttx_?" regions in the
samples. If detected, extra TTML elements will be added and
the EBU-TT-D linePadding used as well.

Appropriate styles for background and text colors are generated
depending on the color and backgroundColor attributes in the
text fragments.

## adapt WebVTT output to teletext TextSample.

Teletext input generates both a region with prefix ttx_
and a floating point line number (e.g. 9.5) in the
range 0 to 11.5 (due to input 0-23 as double lines).

The output is adopted to drop such regions
and convert the line number to an integer
since the standard only used floats for percent
values but not for plain line numbers.

* feat: add missing DASH roles from ISO/IEC 23009-1 section 5.8.5.5 (shaka-project#1390)



Fixes shaka-project#1149

---------

Co-authored-by: Joey Parrish <joeyparrish@users.noreply.github.com>

* docs: Fix missing graphviz outputs in generated docs (shaka-project#1392)

Fixes shaka-project#1388

* feat: get start number from muxer and specify initial sequence number (shaka-project#879)

Set the start number in representation to the segment index that is sent by muxer.

With this enhancement, you can now specify the initial sequence number
to be used on the generated segments when calling the packager.
With the old implementation, it was always starting with "1".

---------

Co-authored-by: Cosmin Stejerean <cstejerean@meta.com>

* refactor: merge Period::ProtectedAdaptationSetMap  into AdaptationSet (shaka-project#844)



---------

Co-authored-by: Cosmin Stejerean <cstejerean@meta.com>

* chore(main): release 3.1.0 (shaka-project#1391)

:robot: I have created a release *beep* *boop*
---


##
[3.1.0](shaka-project/shaka-packager@v3.0.4...v3.1.0)
(2024-05-03)


### Features

* add missing DASH roles from ISO/IEC 23009-1 section 5.8.5.5
([shaka-project#1390](shaka-project#1390))
([fe885b3](shaka-project@fe885b3))
* get start number from muxer and specify initial sequence number
([shaka-project#879](shaka-project#879))
([bb104fe](shaka-project@bb104fe))
* teletext formatting
([shaka-project#1384](shaka-project#1384))
([4b5e80d](shaka-project@4b5e80d))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

* fix: adaptation set IDs were referenced by lowest representation ID  (shaka-project#1394)

After change to add forced command line ordering adaptation set IDs in
places were referenced by their sort index (the minimum representation
index they contained).

Instead always refer to adaptation sets by their own ID, and use the
index only as an optional sort key.

Fixes shaka-project#1393

* docs: document --enable_entitlement_license option for Widevine (shaka-project#1399)

The option was never covered to the widevine docs when it was added,
requiring someone to read the source code or the --help to discover this
option.

Fixes shaka-project#983

* fix: escape media URLs in MPD (shaka-project#1395)

Currently `media_info.media_file_url()` is not escaped when placed into
MPD for things like BaseURL. This for example breaks when trying to us a
file name that contains special characters like &. Since these are
supposed to be URLs let's URL encode them.

Fixes shaka-project#1107

---------

Co-authored-by: Joey Parrish <joeyparrish@users.noreply.github.com>

* fix: set yuv full range flag to 1 for VP9 with sRGB (shaka-project#1398)

If color_space is VPX_COLOR_SPACE_SRGB, the specs says that color_range
should be 1 i.e. yuv_full_range = true. 

However, yuv_full_range was initialized as false and wasn't set in the branch for color_space
is VPX_COLOR_SPACE_SRGB.

Fixes shaka-project#990

---------

Co-authored-by: Joey Parrish <joeyparrish@users.noreply.github.com>

* feat: support Dolby Vision profile 8.x (HEVC) and 10.x (AV1) in HLS and DASH  (shaka-project#1396)

Support Dolby Vision profile 8.1, 8.2, 8.4, 10.1, 10.4 signaling in HLS
and DASH.

Adds new option `--use_dovi_supplemental_codecs` (off by default) to use
SUPPLEMENTAL-CODECS in HLS and `scte214:supplementalCodecs` and
`scte214:supplementalProfiles` for DASH.

To maintain compatibility with existing players the current behavior of
using two entries in the manifest remains the default. This will be
changed in a future version where `use_dovi_supplemental_codecs` will
become on by default.

Adds Dolby Vision compatible brands, 'db1p', 'db2g', 'db4g', 'db4h',
'dby1' based on https://mp4ra.org/#/brands

---------

Co-authored-by: Xingzhao Yun <xyun@dolby.com>

* chore(main): release 3.2.0 (shaka-project#1400)

:robot: I have created a release *beep* *boop*
---


##
[3.2.0](shaka-project/shaka-packager@v3.1.0...v3.2.0)
(2024-05-11)


### Features

* support Dolby Vision profile 8.x (HEVC) and 10.x (AV1) in HLS and DASH
([shaka-project#1396](shaka-project#1396))
([a99cfe0](shaka-project@a99cfe0))


### Bug Fixes

* adaptation set IDs were referenced by lowest representation ID
([shaka-project#1394](shaka-project#1394))
([94db9c9](shaka-project@94db9c9)),
closes
[shaka-project#1393](shaka-project#1393)
* escape media URLs in MPD
([shaka-project#1395](shaka-project#1395))
([98b44d0](shaka-project@98b44d0))
* set yuv full range flag to 1 for VP9 with sRGB
([shaka-project#1398](shaka-project#1398))
([f6f60e5](shaka-project@f6f60e5))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

* lint

---------

Co-authored-by: Cosmin Stejerean <cstejerean@gmail.com>
Co-authored-by: Shaka Bot <13107131+shaka-bot@users.noreply.github.com>
Co-authored-by: Torbjörn Einarson <torbjorn@einarssons.se>
Co-authored-by: Joey Parrish <joeyparrish@users.noreply.github.com>
Co-authored-by: sr90 <sr1990003@gmail.com>
Co-authored-by: Cosmin Stejerean <cstejerean@meta.com>
Co-authored-by: Xingzhao Yun <xyun@dolby.com>
  • Loading branch information
8 people authored Jun 12, 2024
1 parent 6b31887 commit e5a0b19
Show file tree
Hide file tree
Showing 189 changed files with 2,127 additions and 738 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
steps:
- name: Install dependencies
run: |
sudo apt install -y doxygen
sudo apt install -y doxygen graphviz
python3 -m pip install \
sphinx==7.1.2 \
sphinxcontrib.plantuml \
Expand Down
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "3.0.3"
".": "3.2.0"
}
31 changes: 31 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,37 @@
# Changelog


## [3.2.0](https://github.com/shaka-project/shaka-packager/compare/v3.1.0...v3.2.0) (2024-05-11)


### Features

* support Dolby Vision profile 8.x (HEVC) and 10.x (AV1) in HLS and DASH ([#1396](https://github.com/shaka-project/shaka-packager/issues/1396)) ([a99cfe0](https://github.com/shaka-project/shaka-packager/commit/a99cfe036f09de51b488f87f4cb126a1bcd3a286))


### Bug Fixes

* adaptation set IDs were referenced by lowest representation ID ([#1394](https://github.com/shaka-project/shaka-packager/issues/1394)) ([94db9c9](https://github.com/shaka-project/shaka-packager/commit/94db9c9db3e73073925205355dd61a6dc9785065)), closes [#1393](https://github.com/shaka-project/shaka-packager/issues/1393)
* escape media URLs in MPD ([#1395](https://github.com/shaka-project/shaka-packager/issues/1395)) ([98b44d0](https://github.com/shaka-project/shaka-packager/commit/98b44d01df6a952466b5a1667818da877502da97))
* set yuv full range flag to 1 for VP9 with sRGB ([#1398](https://github.com/shaka-project/shaka-packager/issues/1398)) ([f6f60e5](https://github.com/shaka-project/shaka-packager/commit/f6f60e5fff8d5c9b13fbf65f494eba651050ccb9))

## [3.1.0](https://github.com/shaka-project/shaka-packager/compare/v3.0.4...v3.1.0) (2024-05-03)


### Features

* add missing DASH roles from ISO/IEC 23009-1 section 5.8.5.5 ([#1390](https://github.com/shaka-project/shaka-packager/issues/1390)) ([fe885b3](https://github.com/shaka-project/shaka-packager/commit/fe885b3ade020b197a04fc63ee41fd90e7e11a14))
* get start number from muxer and specify initial sequence number ([#879](https://github.com/shaka-project/shaka-packager/issues/879)) ([bb104fe](https://github.com/shaka-project/shaka-packager/commit/bb104fef5d745ac3a0a8c1e6fb4f1b1a9b27d8ae))
* teletext formatting ([#1384](https://github.com/shaka-project/shaka-packager/issues/1384)) ([4b5e80d](https://github.com/shaka-project/shaka-packager/commit/4b5e80d02c10fd1ddb8f7e0f2f1a8608782d8442))

## [3.0.4](https://github.com/shaka-project/shaka-packager/compare/v3.0.3...v3.0.4) (2024-03-27)


### Bug Fixes

* BaseURL missing when MPD base path is empty ([#1380](https://github.com/shaka-project/shaka-packager/issues/1380)) ([90c3c3f](https://github.com/shaka-project/shaka-packager/commit/90c3c3f9b3e8e36706b9769e574aa316e8bbb351)), closes [#1378](https://github.com/shaka-project/shaka-packager/issues/1378)
* Fix NPM binary selection on ARM Macs ([#1376](https://github.com/shaka-project/shaka-packager/issues/1376)) ([733af91](https://github.com/shaka-project/shaka-packager/commit/733af9128dfa7c46dd7a9fe3f8361ab50a829afe)), closes [#1375](https://github.com/shaka-project/shaka-packager/issues/1375)

## [3.0.3](https://github.com/shaka-project/shaka-packager/compare/v3.0.2...v3.0.3) (2024-03-12)


Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ option(FULLY_STATIC "Attempt fully static linking of all CLI apps" OFF)
# Enable CMake's test infrastructure.
enable_testing()

option(SKIP_INTEGRATION_TESTS "Skip the packager integration tests" ON)
option(SKIP_INTEGRATION_TESTS "Skip the packager integration tests" OFF)

# Subdirectories with their own CMakeLists.txt
add_subdirectory(packager)
Expand Down
1 change: 1 addition & 0 deletions CONTRIBUTORS
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ Sanil Raut <sr1990003@gmail.com>
Sergio Ammirata <sergio@ammirata.net>
Thomas Inskip <tinskip@google.com>
Tim Lansen <tim.lansen@gmail.com>
Torbjörn Einarsson <torbjorn.einarsson@eyevinn.se>
Vincent Nguyen <nvincen@amazon.com>
Weiguo Shao <weiguo.shao@dolby.com>

4 changes: 4 additions & 0 deletions docs/source/options/chunking_options.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,7 @@ Chunking options

Force fragments to begin with stream access points. This flag implies
*segment_sap_aligned*. Default enabled.

--start_segment_number

Indicates the startNumber in DASH SegmentTemplate and HLS segment name.
7 changes: 5 additions & 2 deletions docs/source/options/dash_stream_descriptors.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@ DASH specific stream descriptor fields

:dash_roles (roles):

Optional semicolon separated list of values for DASH Role element. The
optional semicolon separated list of values for DASH Role element. The
value should be one of: **caption**, **subtitle**, **main**, **alternate**,
**supplementary**, **commentary**, **description**, **dub** and **forced-subtitle** .
**supplementary**, **commentary**, **dub**, **description**, **sign**,
**metadata**, **enhanced-audio- intelligibility**, **emergency**,
**forced-subtitle**, **easyreader**, and **karaoke**.

See DASH (ISO/IEC 23009-1) specification for details.
4 changes: 4 additions & 0 deletions docs/source/options/widevine_encryption_options.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ Widevine encryption options
--protection_systems is not specified. Use --protection_systems to generate
multiple protection systems.

--enable_entitlement_license

Enable entitlement license in the Widevine encryption request.

--enable_widevine_decryption

Enable decryption with Widevine key server. User should provide either
Expand Down
3 changes: 3 additions & 0 deletions include/packager/chunking_params.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ struct ChunkingParams {
/// and mdat atom. Each chunk is uploaded immediately upon creation,
/// decoupling latency from segment duration.
bool low_latency_dash_mode = false;

/// Indicates the startNumber in DASH SegmentTemplate and HLS segment name.
int64_t start_segment_number = 1;
};

} // namespace shaka
Expand Down
2 changes: 1 addition & 1 deletion link-test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ if(BUILD_SHARED_LIBS)

# Custom commands aren't targets, but have outputs.
add_custom_command(
DEPENDS mpd_generator packager libpackager
DEPENDS mpd_generator packager libpackager pssh_box_py
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
OUTPUT ${TEST_INSTALL_DIR}
COMMAND
Expand Down
26 changes: 19 additions & 7 deletions packager/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,11 @@ include("gtest.cmake")
# Include our module for building protos.
include("protobuf.cmake")

# Find Python3 used by integration tests, license notice and version string
if(NOT Python3_EXECUTABLE)
find_package(Python3 COMPONENTS Interpreter REQUIRED)
endif()

# Subdirectories with their own CMakeLists.txt, all of whose targets are built.
add_subdirectory(file)
add_subdirectory(kv_pairs)
Expand Down Expand Up @@ -228,22 +233,29 @@ add_custom_target(packager_test_py_copy ALL

if(NOT SKIP_INTEGRATION_TESTS)
add_test (NAME packager_test_py
COMMAND ${PYTHON_EXECUTABLE} packager_test.py
COMMAND "${Python3_EXECUTABLE}" packager_test.py
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
)

set(test_environment_vars "PACKAGER_SRC_DIR=${CMAKE_SOURCE_DIR}")
list(APPEND test_environment_vars "PACKAGER_BIN=$<TARGET_FILE:packager>")
list(APPEND test_environment_vars "MPD_GENERATOR_BIN=$<TARGET_FILE:mpd_generator>")
if(BUILD_SHARED_LIBS)
list(APPEND test_environment_vars "BUILD_TYPE=shared")
else()
list(APPEND test_environment_vars "BUILD_TYPE=static")
endif()

set_tests_properties(packager_test_py PROPERTIES
ENVIRONMENT "${test_environment_vars}"
)
endif()

configure_file(packager.pc.in packager.pc @ONLY)

# Always install the binaries.
install(TARGETS mpd_generator packager)

# Always install the python tools.
install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/pssh-box.py
DESTINATION ${CMAKE_INSTALL_BINDIR})
install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/pssh-box-protos
DESTINATION ${CMAKE_INSTALL_BINDIR})

# With shared libraries, also install the library, headers, and pkgconfig.
# The static library isn't usable as a standalone because it doesn't include
# its static dependencies (zlib, absl, etc).
Expand Down
6 changes: 6 additions & 0 deletions packager/app/muxer_flags.cc
Original file line number Diff line number Diff line change
Expand Up @@ -73,3 +73,9 @@ ABSL_FLAG(
"If the first sample comes after default_text_zero_bias_ms then the start "
"of the stream will not be padded as we cannot assume the start time of "
"the stream.");

ABSL_FLAG(int64_t,
start_segment_number,
1,
"Indicates the startNumber in DASH SegmentTemplate and HLS "
"segment name.");
1 change: 1 addition & 0 deletions packager/app/muxer_flags.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,6 @@ ABSL_DECLARE_FLAG(std::string, temp_dir);
ABSL_DECLARE_FLAG(bool, mp4_include_pssh_in_stream);
ABSL_DECLARE_FLAG(int32_t, transport_stream_timestamp_offset_ms);
ABSL_DECLARE_FLAG(int32_t, default_text_zero_bias_ms);
ABSL_DECLARE_FLAG(int64_t, start_segment_number);

#endif // APP_MUXER_FLAGS_H_
9 changes: 6 additions & 3 deletions packager/app/packager_main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -126,9 +126,10 @@ const char kUsage[] =
" list of values for DASH Accessibility elements. The value should be\n"
" in the format: scheme_id_uri=value.\n"
" - dash_roles (roles): Optional semicolon separated list of values for\n"
" DASH Role elements. The value should be one of: caption, subtitle,\n"
" forced-subtitle, main, alternate, supplementary, commentary, \n"
" description and dub. See DASH\n"
" DASH Role elements. The value should be one of: caption, subtitle, \n"
" main, alternate, supplementary, commentary, dub, description, sign, \n"
" metadata, enhanced-audio- intelligibility, emergency, \n"
" forced-subtitle, easyreader, and karaoke. See DASH\n"
" (ISO/IEC 23009-1) specification for details.\n"
" - forced_subtitle: Optional boolean value (0|1). If set to 1 \n"
" indicates that this stream is a Forced Narrative subtitle that \n"
Expand Down Expand Up @@ -359,6 +360,8 @@ std::optional<PackagingParams> GetPackagingParams() {
absl::GetFlag(FLAGS_segment_sap_aligned);
chunking_params.subsegment_sap_aligned =
absl::GetFlag(FLAGS_fragment_sap_aligned);
chunking_params.start_segment_number =
absl::GetFlag(FLAGS_start_segment_number);

int num_key_providers = 0;
EncryptionParams& encryption_params = packaging_params.encryption_params;
Expand Down
13 changes: 3 additions & 10 deletions packager/app/test/packager_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,26 +17,19 @@ class PackagerApp(object):
"""Main integration class for testing the packager binaries."""

def __init__(self):
self.packager_binary = os.path.join(test_env.SCRIPT_DIR,
self._GetBinaryName('packager'))
self.mpd_generator_binary = os.path.join(
test_env.SCRIPT_DIR, self._GetBinaryName('mpd_generator'))
self.packager_binary = test_env.PACKAGER_BIN
self.mpd_generator_binary = test_env.MPD_GENERATOR_BIN
# Set this to empty for now in case GetCommandLine() is called before
# Package().
self.packaging_command_line = ''
assert os.path.exists(self.packager_binary), (
'Please run from output directory, e.g. out/Debug/packager_test.py\n'
' Missing: ' + self.packager_binary)

def _GetBinaryName(self, name):
if platform.system() == 'Windows':
name += '.exe'
return name

def GetEnv(self):
env = os.environ.copy()
if (platform.system() == 'Darwin' and
test_env.options.libpackager_type == 'shared_library'):
test_env.BUILD_TYPE == 'shared'):
env['DYLD_FALLBACK_LIBRARY_PATH'] = test_env.SCRIPT_DIR
return env

Expand Down
70 changes: 63 additions & 7 deletions packager/app/test/packager_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -485,8 +485,9 @@ def _GetFlags(self,
use_fake_clock=True,
allow_codec_switching=False,
dash_force_segment_list=False,
force_cl_index=False):

force_cl_index=None,
start_segment_number=None,
use_dovi_supplemental_codecs=None):
flags = ['--single_threaded']

if not strip_parameter_set_nalus:
Expand Down Expand Up @@ -544,6 +545,9 @@ def _GetFlags(self,
if not dash_if_iop:
flags.append('--generate_dash_if_iop_compliant_mpd=false')

if use_dovi_supplemental_codecs:
flags.append('--use_dovi_supplemental_codecs')

if output_media_info:
flags.append('--output_media_info')
if output_dash:
Expand All @@ -570,8 +574,13 @@ def _GetFlags(self,
if allow_codec_switching:
flags += ['--allow_codec_switching']

if force_cl_index:
if force_cl_index is True:
flags += ['--force_cl_index']
elif force_cl_index is False:
flags += ['--noforce_cl_index']

if start_segment_number is not None:
flags += ['--start_segment_number', str(start_segment_number)]

if ad_cues:
flags += ['--ad_cues', ad_cues]
Expand Down Expand Up @@ -754,7 +763,8 @@ def testAudioVideoWithTwoTrickPlay(self):
self._GetStream('video', trick_play_factor=2),
]

self.assertPackageSuccess(streams, self._GetFlags(output_dash=True))
self.assertPackageSuccess(streams, self._GetFlags(output_dash=True,
force_cl_index=False))
self._CheckTestResults('audio-video-with-two-trick-play')

def testAudioVideoWithTwoTrickPlayDecreasingRate(self):
Expand All @@ -765,7 +775,8 @@ def testAudioVideoWithTwoTrickPlayDecreasingRate(self):
self._GetStream('video', trick_play_factor=1),
]

self.assertPackageSuccess(streams, self._GetFlags(output_dash=True))
self.assertPackageSuccess(streams, self._GetFlags(output_dash=True,
force_cl_index=False))
# Since the stream descriptors are sorted in packager app, a different
# order of trick play factors gets the same mpd.
self._CheckTestResults('audio-video-with-two-trick-play')
Expand Down Expand Up @@ -819,6 +830,13 @@ def testForcedSubtitle(self):
output_hls=True))
self._CheckTestResults('forced-subtitle')

def testDashStartNumber(self):
audio_video_streams = self._GetStreams(['audio', 'video'], segmented=True)
streams = audio_video_streams
self.assertPackageSuccess(streams, self._GetFlags(output_dash=True,
start_segment_number=0))
self._CheckTestResults('dash-start-number')

def testAudioVideoWithLanguageOverride(self):
self.assertPackageSuccess(
self._GetStreams(['audio', 'video'], language='por', hls=True),
Expand Down Expand Up @@ -1442,6 +1460,42 @@ def testDolbyVisionProfile8WithEncryption(self):
self.assertPackageSuccess(streams, flags)
self._CheckTestResults('dolby-vision-profile-8-with-encryption')

# TODO(cosmin): shared_library build does not support
# use_dovi_supplemental_codecs
@unittest.skipIf(
test_env.BUILD_TYPE == 'shared',
'libpackager shared_library does not support '
'--use_dovi_supplemental_codecs flag.'
)
def testDolbyVisionProfile8UsingSupplementalCodecs(self):
streams = [
self._GetStream('video', test_file='sparks_dovi_8.mp4')
]
flags = self._GetFlags(output_dash=True,
output_hls=True,
use_dovi_supplemental_codecs=True)

self.assertPackageSuccess(streams, flags)
self._CheckTestResults('dolby-vision-profile-8-supplemental-codecs')

# TODO(cosmin): shared_library build does not support
# use_dovi_supplemental_codecs
@unittest.skipIf(
test_env.BUILD_TYPE == 'shared',
'libpackager shared_library does not support '
'--use_dovi_supplemental_codecs flag.'
)
def testDolbyVisionProfile10UsingSupplementalCodecs(self):
streams = [
self._GetStream('video', test_file='sparks_dovi_10.mp4')
]
flags = self._GetFlags(output_dash=True,
output_hls=True,
use_dovi_supplemental_codecs=True)

self.assertPackageSuccess(streams, flags)
self._CheckTestResults('dolby-vision-profile-10-supplemental-codecs')

def testVp8Mp4WithEncryption(self):
streams = [
self._GetStream('video',
Expand Down Expand Up @@ -1510,8 +1564,8 @@ def testWvmInput(self):

# TODO(kqyang): Fix shared_library not supporting strip_parameter_set_nalus
# problem.
@unittest.skipUnless(
test_env.options.libpackager_type == 'static_library',
@unittest.skipIf(
test_env.BUILD_TYPE == 'shared',
'libpackager shared_library does not support '
'--strip_parameter_set_nalus flag.'
)
Expand Down Expand Up @@ -1690,7 +1744,9 @@ def testLiveStaticProfileWithTimeInSegmentName(self):

def testAllowCodecSwitching(self):
streams = [
self._GetStream('video', test_file='bear-1280x720-hevc.mp4'),
self._GetStream('video', test_file='bear-640x360-hevc.mp4'),
self._GetStream('video', test_file='bear-640x360-vp9.mp4'),
self._GetStream('video', test_file='bear-640x360.mp4'),
self._GetStream('video', test_file='bear-1280x720.mp4'),
self._GetStream('audio', test_file='bear-640x360.mp4'),
Expand Down
Loading

0 comments on commit e5a0b19

Please sign in to comment.