Commit Graph

1532 Commits

Author SHA1 Message Date
Shaka Bot a26e6623d6
chore: Sync common workflows (#1456)
This is an automated sync of common workflows for this organization.
The upstream source is:

11128e0985

Co-authored-by: Shaka Bot <shaka-bot@users.noreply.github.com>
2024-12-10 09:56:59 -08:00
Shaka Bot 1f0a4d1959
chore(main): release 3.4.0 (#1450) 2024-11-11 11:05:51 -08:00
Joey Parrish 3fdc807ed3
feat: Add option to ignore HTTP output failures (#1449)
When uploading a live stream, if a single segment upload fails, we shouldn't give up.

This adds an option to ignore HTTP output failures so that a single failed upload does not result in a hung stream.  See https://github.com/shaka-project/shaka-streamer/issues/195 for details.
2024-11-11 10:00:09 -08:00
Joey Parrish 0857653338
ci: Fix workflow events (#1446)
This was found by auditing workflows based on research published here:

https://github.com/joeyparrish/workflow-cheat-sheet

The research was prompted by a workflow bug in Shaka Streamer
2024-11-05 14:34:47 -08:00
Shaka Bot cca6cc096f
chore(main): release 3.3.0 (#1444)
🤖 I have created a release *beep* *boop*
---


##
[3.3.0](https://github.com/shaka-project/shaka-packager/compare/v3.2.1...v3.3.0)
(2024-10-25)


### Features

* Add IAMF support
([#1416](https://github.com/shaka-project/shaka-packager/issues/1416))
([dc6196d](dc6196d3d1)),
closes
[#1415](https://github.com/shaka-project/shaka-packager/issues/1415)
* EXT-X-SESSION-KEY support
([#1427](https://github.com/shaka-project/shaka-packager/issues/1427))
([d88ed27](d88ed2798c)),
closes [#36](https://github.com/shaka-project/shaka-packager/issues/36)
* **http:** Add DELETE method support
([#1442](https://github.com/shaka-project/shaka-packager/issues/1442))
([ddeacb2](ddeacb2525))


### Bug Fixes

* **http:** Fix "Failed sending data to the peer" errors
([#1443](https://github.com/shaka-project/shaka-packager/issues/1443))
([2c9d100](2c9d100d44))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
2024-10-28 10:55:24 -07:00
Joey Parrish 0957309dc2
chore: Fix "potentially uninitialized variable" errors in IAMF (#1445)
These errors were specifically coming up in Windows builds and in Linux release builds.  This initializes those variables.

This also fixes errors in IAMF tests like "offset 2 out of bounds", which some compilers raise when you try to statically initialize a vector, then add to it later.
2024-10-25 16:36:16 -07:00
Felicia Lim dc6196d3d1
feat: Add IAMF support (#1415) (#1416) 2024-10-25 09:56:28 -07:00
SteveR-PMP d88ed2798c
feat: EXT-X-SESSION-KEY support (#36) (#1427) 2024-10-25 09:55:27 -07:00
Joey Parrish ddeacb2525
feat(http): Add DELETE method support (#1442)
When we try to remove an old segment from a live stream we uploaded via HTTP, we need to send DELETE requests.
2024-10-24 20:13:04 -07:00
Joey Parrish 2c9d100d44
fix(http): Fix "Failed sending data to the peer" errors (#1443)
Upgrading curl fixes errors like "Failed sending data to the peer" flooding the log.  This is described upstream in https://github.com/curl/curl/issues/10591 and fixed in curl 8.2.0.  Here we upgrade to curl 8.9.1 (latest as of today).

This required updating the way we attach c-ares to libcurl and updating CURLOPT_PUT (deprecated) to CURLOPT_UPLOAD (compatible equivalent AFAICT).
2024-10-24 13:53:39 -07:00
Shaka Bot ed68e69584
chore(main): release 3.2.1 (#1408)
🤖 I have created a release *beep* *boop*
---


##
[3.2.1](https://github.com/shaka-project/shaka-packager/compare/v3.2.0...v3.2.1)
(2024-10-02)


### Bug Fixes

* Add Missing Dash Roles to RoleFromString function
([#1418](https://github.com/shaka-project/shaka-packager/issues/1418))
([#1419](https://github.com/shaka-project/shaka-packager/issues/1419))
([9cb00e9](9cb00e91ab))
* Break header installation for the shared library
([#1407](https://github.com/shaka-project/shaka-packager/issues/1407))
([b5c2cb8](b5c2cb8b73)),
closes
[#1406](https://github.com/shaka-project/shaka-packager/issues/1406)
* Embed full python protobuf library
([#1438](https://github.com/shaka-project/shaka-packager/issues/1438))
([f07fd0d](f07fd0d997)),
closes
[#1436](https://github.com/shaka-project/shaka-packager/issues/1436)

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
2024-10-23 21:49:45 -07:00
Joey Parrish f07fd0d997
fix: Embed full python protobuf library (#1438)
This embeds the full python protobuf library into the output in pssh-box-protos, which is used by installation targets and Docker images.  Without this, the installed pssh-box.py tool would depend on a separate installation of the python protobuf library.

Closes #1436
2024-10-02 08:31:04 -07:00
Wojciech Tyczyński 4bf8b5ef5e
chore: Update README.md (#1435) 2024-09-30 08:37:17 -07:00
John Laurin 9cb00e91ab
fix: Add Missing Dash Roles to RoleFromString function (#1418) (#1419)
As per issue #1418, several Dash roles are missing from the
RoleFromString function, making them unusable in practice. This update
should enable them for use.

---------

Co-authored-by: John Laurin <john.laurin@svt.se>
2024-08-28 18:59:57 -07:00
zaki699 b5c2cb8b73
fix: Break header installation for the shared library (#1407)
include/file.h is breaking header installation for the shared library build.  macros/classes.h must be included to the public headers.

Closes #1406

Co-authored-by: Zaki Ahmed <zaki.ahmed.perso@gmail.com>
Co-authored-by: Joey Parrish <joeyparrish@users.noreply.github.com>
2024-05-30 21:16:05 -07:00
Shaka Bot 53b866886f
chore(main): release 3.2.0 (#1400)
🤖 I have created a release *beep* *boop*
---


##
[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](a99cfe036f))


### Bug Fixes

* adaptation set IDs were referenced by lowest representation ID
([#1394](https://github.com/shaka-project/shaka-packager/issues/1394))
([94db9c9](94db9c9db3)),
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](98b44d01df))
* set yuv full range flag to 1 for VP9 with sRGB
([#1398](https://github.com/shaka-project/shaka-packager/issues/1398))
([f6f60e5](f6f60e5fff))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
2024-05-11 23:18:05 -07:00
Cosmin Stejerean a99cfe036f
feat: support Dolby Vision profile 8.x (HEVC) and 10.x (AV1) in HLS and DASH (#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>
2024-05-10 17:42:34 -07:00
Cosmin Stejerean f6f60e5fff
fix: set yuv full range flag to 1 for VP9 with sRGB (#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 #990

---------

Co-authored-by: Joey Parrish <joeyparrish@users.noreply.github.com>
2024-05-10 17:41:30 -07:00
Cosmin Stejerean 98b44d01df
fix: escape media URLs in MPD (#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 #1107

---------

Co-authored-by: Joey Parrish <joeyparrish@users.noreply.github.com>
2024-05-10 17:27:13 -07:00
Cosmin Stejerean b7e96f7d93
docs: document --enable_entitlement_license option for Widevine (#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 #983
2024-05-10 17:25:00 -07:00
Cosmin Stejerean 94db9c9db3
fix: adaptation set IDs were referenced by lowest representation ID (#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 #1393
2024-05-10 17:24:04 -07:00
Shaka Bot 52647b900c
chore(main): release 3.1.0 (#1391)
🤖 I have created a release *beep* *boop*
---


##
[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](fe885b3ade))
* get start number from muxer and specify initial sequence number
([#879](https://github.com/shaka-project/shaka-packager/issues/879))
([bb104fe](bb104fef5d))
* teletext formatting
([#1384](https://github.com/shaka-project/shaka-packager/issues/1384))
([4b5e80d](4b5e80d02c))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
2024-05-03 17:32:27 -07:00
sr90 a54e745cf8
refactor: merge Period::ProtectedAdaptationSetMap into AdaptationSet (#844)
---------

Co-authored-by: Cosmin Stejerean <cstejerean@meta.com>
2024-05-02 19:11:04 -07:00
sr90 bb104fef5d
feat: get start number from muxer and specify initial sequence number (#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>
2024-05-02 13:25:49 -07:00
Cosmin Stejerean 62f861c9c2
docs: Fix missing graphviz outputs in generated docs (#1392)
Fixes #1388
2024-05-01 14:20:35 -07:00
Cosmin Stejerean fe885b3ade
feat: add missing DASH roles from ISO/IEC 23009-1 section 5.8.5.5 (#1390)
Fixes #1149

---------

Co-authored-by: Joey Parrish <joeyparrish@users.noreply.github.com>
2024-04-30 14:10:23 -07:00
Torbjörn Einarson 4b5e80d02c
feat: teletext formatting (#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 #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.
2024-04-29 10:33:03 -07:00
Cosmin Stejerean 84009d82ef
build: turn on integration tests in ctest by default (#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.
2024-04-19 07:56:49 -07:00
Shaka Bot ceeb378a85
chore(main): release 3.0.4 (#1377)
🤖 I have created a release *beep* *boop*
---


## [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](90c3c3f9b3)), 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](733af9128d)), closes [#1375](https://github.com/shaka-project/shaka-packager/issues/1375)

---
This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
2024-03-27 13:39:26 -07:00
Cosmin Stejerean 90c3c3f9b3
fix: BaseURL missing when MPD base path is empty (#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 #1378
2024-03-27 12:03:10 -07:00
Cosmin Stejerean b7dd8562cf
test: fix TTML integration test where ordering was changed by #1364 (#1379) 2024-03-25 12:31:21 -07:00
Vitaly Gashkov 733af9128d
fix: Fix NPM binary selection on ARM Macs (#1376)
Fixes #1375
2024-03-20 20:22:29 -07:00
Shaka Bot a87a0e0559
chore(main): release 3.0.3 (#1372) 2024-03-12 13:14:38 -07:00
Joey Parrish 4cb6536060
fix: Fix NPM binary publication (#1371)
The default .npmignore would disallow bin/, which contains binaries for
our NPM release. Every release before v3.0.3 was missing .npmignore, and
therefore had no binaries. These were unusable in NPM, and have been
marked as deprecated because of it.

Closes #1369
2024-03-12 13:09:56 -07:00
Joey Parrish d83c7b1d45
fix: Fix tags in official Docker images and binaries (#1370)
The release workflows did not run checkout with `fetch-tags: true`, so
the builds were unable to compute the correct release version number. I
audited all instances of `actions/checkout` to add `fetch-tags` where
needed and clean up unneeded options.

I also had to fix options to `docker/build-push-action`, which by
default ignores `actions/checkout` and tries to pull from git itself.
This led to the Docker build running in a context without the new tag.

Finally, to make verification easier and provide version info in the
build logs, this adds debugging info to the version-generation script
via stderr.

Closes #1366
2024-03-12 13:09:38 -07:00
Shaka Bot 5ee2b7f0de
chore(main): release 3.0.2 (#1365)
🤖 I have created a release *beep* *boop*
---


##
[3.0.2](https://github.com/shaka-project/shaka-packager/compare/v3.0.1...v3.0.2)
(2024-03-07)


### Bug Fixes

* duplicate representation id for TTML when forced ordering is on
([#1364](https://github.com/shaka-project/shaka-packager/issues/1364))
([0fd815a](0fd815a160)),
closes
[#1362](https://github.com/shaka-project/shaka-packager/issues/1362)

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
2024-03-11 10:59:23 -04:00
Cosmin Stejerean 0fd815a160
fix: duplicate representation id for TTML when forced ordering is on (#1364)
Fixes #1362
2024-03-07 10:32:09 -08:00
Shaka Bot 6bff14f359
chore(main): release 3.0.1 (#1361) 2024-03-05 10:19:21 -08:00
Joey Parrish ebd608ae68
ci: Update actions (#1360)
This silences warnings about outdated node runtimes in CI jobs.

 - Trivial upgrades:
   - actions/checkout@v3 => v4
   - actions/deploy-pages@v2 => v4
   - actions/upload-pages-artifact@v2 => v3
   - mxschmitt/action-tmate@v3.6 => v3.17
   - mikepenz/action-junit-report@v3.8.0 => v4
 - Upgrades that required small changes or deeper testing:
   - actions/download-artifact@v3 => v4
   - actions/upload-artifact@v3 => v4
   - google-github-actions/release-please-action@v3 => v4
 - Replaced:
   - svenstaro/upload-release-action@v2 => gh CLI

See also:
- https://github.com/actions/upload-artifact/blob/main/docs/MIGRATION.md
2024-03-05 09:28:51 -08:00
Joey Parrish c456ad64d1
fix(CI): Add Mac-arm64 to build matrix (#1359)
Support for this came out in January, 2024. Explicit macos versions seem
to be necessary for now, until GitHub offers "latest" labels targeting
specific architectures.
2024-03-04 14:02:39 -08:00
Joey Parrish 9c033b9d40
ci: Add missing arm64 (self-hosted) builds on release (#1358)
The build invocation from the release workflow needs settings to trigger
self-hosted builds, including Linux arm64.
2024-03-04 11:06:43 -08:00
Shaka Bot 34dcf3bd34
chore(main): release 3.0.0 (#1312)
## [3.0.0](https://github.com/shaka-project/shaka-packager/compare/v2.6.1...v3.0.0) (2024-02-28)

### ⚠ BREAKING CHANGES

* Update all dependencies
* Drop Python 2 support in all scripts
* Replace glog with absl::log, tweak log output and flags
* Replace gyp build system with CMake

### Features & Bug Fixes

Too many to list... See CHANGELOG.md for a full accounting!

---
This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
2024-03-04 09:13:52 -08:00
Anthony Lu 56440413aa
fix: use a better estimate of frame rate for cases with very short first sample durations (#838)
Use the second sample in mp4 and webm formats. #835 had issues with
merging due to golden file conflicts. Because we cannot make dependent
pull requests, this is a replica of #835.

---------

Signed-off-by: Cosmin Stejerean <cstejerean@meta.com>
Co-authored-by: Cosmin Stejerean <cstejerean@meta.com>
2024-02-28 15:53:06 -08:00
Cosmin Stejerean 4d22e99f8e
fix: Restore support for legacy FairPlay system ID (#1357)
Fixes #1356 which was caused by the fix in #1281 which updated this to
use the correct FairPlay system ID. However since old versions
recognized the previous system ID this restores support for it to avoid
breaking clients.
2024-02-28 15:45:03 -08:00
Joey Parrish 9be7c2b1ac
feat: Portable, fully-static release executables on Linux (#1351)
This adds the option FULLY_STATIC to create fully-static executables.

To create portable, fully-static release executables on Linux, we need
to use musl instead of glibc. Static executables from glibc are not
portable.

The popular musl-gcc wrapper does not support C++, so instead we use a
full musl cross-compiler toolchain in the build workflow.

To build FULLY_STATIC, the user must point to the appropriate
cross-compiler, as we do in the workflow. On systems where musl is the
native libc (such as Alpine Linux), this is not necessary.

I have also read that musl's allocator is not very fast in
multi-threaded applications. So when FULLY_STATIC is enabled, we will
also enable mimalloc, a replacement allocator that is very fast.

I tested a very basic packaging command to compare speeds of dynamic
glibc, static musl, and static musl+mimalloc:

dynamic glibc:
runs: 2.527, 2.798, 2.703, 2.756, 2.959
avg = 2.749, std dev = 0.156s

static musl:
runs: 2.813, 2.920, 3.129, 3.003, 2.738
avg = 2.921s, std dev = 0.154s

static musl+mimalloc:
runs: 2.291, 2.034, 2.415, 2.303, 2.265
avg = 2.262s, std dev = 0.140s

The mimalloc build is 82% faster than musl default allocator, 77% faster
than glibc, and has more consistent runtime characteristics (lower
standard deviation).
2024-02-27 10:47:04 -08:00
Cosmin Stejerean 615720e7dd
fix: AudioSampleEntry size caluations due to bad merge (#1354)
from ALAC pull request
2024-02-27 08:57:48 -08:00
Joey Parrish 673e49d2bb
build: Disable warnings in third-party code (#1353)
We already disabled warnings-as-errors in third-party code, but this
goes futher to completely disable third-party warnings. They are mostly
noise, and distracting. If they aren't errors, we shouldn't have our
build logs flooded with them.
2024-02-26 19:57:13 -08:00
Joey Parrish 6276584de7
fix: Fix missing newline at the end of usage (#1352)
Without this, the command prompt will not appear on its own line after
running `packager` with no arguments.
2024-02-26 19:56:16 -08:00
wjywbs b68ec87f6a
feat: Add support for ALAC codec (#1299)
Co-authored-by: Cosmin Stejerean <cstejerean@meta.com>
2024-02-26 13:39:30 -08:00
Joey Parrish 35c2f46428
fix: Always log to stderr by default (#1350)
This tweaks the default config for stderrthreshold from absl/log so that
we always get logs to stderr by default, as we did in v2. The --quiet
and --v flags that existed in v2 can still be used to modify the log
level, as well as the new --minloglevel from absl/log.

Issue #1325
2024-02-23 16:16:29 -08:00