shaka-packager/packager/app/test/testdata
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
..
acc-he feat: add startwithSAP/subsegmentstartswithSAP for audio tracks (#1346) 2024-02-23 15:45:46 -08:00
audio-alac feat: Add support for ALAC codec (#1299) 2024-02-26 13:39:30 -08:00
audio-video feat: add startwithSAP/subsegmentstartswithSAP for audio tracks (#1346) 2024-02-23 15:45:46 -08:00
audio-video-with-accessibilities-and-roles feat: add startwithSAP/subsegmentstartswithSAP for audio tracks (#1346) 2024-02-23 15:45:46 -08:00
audio-video-with-codec-switching feat: add startwithSAP/subsegmentstartswithSAP for audio tracks (#1346) 2024-02-23 15:45:46 -08:00
audio-video-with-codec-switching-and-forced-commandline_order feat: add startwithSAP/subsegmentstartswithSAP for audio tracks (#1346) 2024-02-23 15:45:46 -08:00
audio-video-with-codec-switching-encryption-trick-play feat: add startwithSAP/subsegmentstartswithSAP for audio tracks (#1346) 2024-02-23 15:45:46 -08:00
audio-video-with-language-override feat: add startwithSAP/subsegmentstartswithSAP for audio tracks (#1346) 2024-02-23 15:45:46 -08:00
audio-video-with-language-override-with-subtag feat: add startwithSAP/subsegmentstartswithSAP for audio tracks (#1346) 2024-02-23 15:45:46 -08:00
audio-video-with-trick-play feat: add startwithSAP/subsegmentstartswithSAP for audio tracks (#1346) 2024-02-23 15:45:46 -08:00
audio-video-with-trick-play-and-forced-commandline-order feat: add startwithSAP/subsegmentstartswithSAP for audio tracks (#1346) 2024-02-23 15:45:46 -08:00
audio-video-with-two-trick-play build: turn on integration tests in ctest by default (#1381) 2024-04-19 07:56:49 -07:00
av1-mp4 fix: duration formatting and update mpd testdata to reflect new format (#1320) 2024-02-08 09:48:14 -08:00
av1-mp4-to-webm fix: duration formatting and update mpd testdata to reflect new format (#1320) 2024-02-08 09:48:14 -08:00
av1-mp4-with-encryption fix: duration formatting and update mpd testdata to reflect new format (#1320) 2024-02-08 09:48:14 -08:00
av1-webm fix: duration formatting and update mpd testdata to reflect new format (#1320) 2024-02-08 09:48:14 -08:00
av1-webm-with-encryption fix: duration formatting and update mpd testdata to reflect new format (#1320) 2024-02-08 09:48:14 -08:00
avc-aac-ts feat: add startwithSAP/subsegmentstartswithSAP for audio tracks (#1346) 2024-02-23 15:45:46 -08:00
avc-aac-ts-language chore: Update URLs after moving projects (#1042) 2022-03-07 11:56:34 -08:00
avc-ac3-ts fix: hls, set the DEFAULT explicitly to NO. Supports native HLS players. (#1170) 2023-07-05 14:18:41 -07:00
avc-ac3-ts-to-mp4 fix: hls, set the DEFAULT explicitly to NO. Supports native HLS players. (#1170) 2023-07-05 14:18:41 -07:00
avc-ac3-ts-with-encryption fix: hls, set the DEFAULT explicitly to NO. Supports native HLS players. (#1170) 2023-07-05 14:18:41 -07:00
avc-ts-aac-packed-audio-with-encryption fix: hls, set the DEFAULT explicitly to NO. Supports native HLS players. (#1170) 2023-07-05 14:18:41 -07:00
avc-ts-ac3-packed-audio-with-encryption fix: hls, set the DEFAULT explicitly to NO. Supports native HLS players. (#1170) 2023-07-05 14:18:41 -07:00
avc-ts-dash-dynamic-with-segment-deletion chore: Update URLs after moving projects (#1042) 2022-03-07 11:56:34 -08:00
avc-ts-event-playlist fix: hls, set the DEFAULT explicitly to NO. Supports native HLS players. (#1170) 2023-07-05 14:18:41 -07:00
avc-ts-live-playlist fix: hls, set the DEFAULT explicitly to NO. Supports native HLS players. (#1170) 2023-07-05 14:18:41 -07:00
avc-ts-live-playlist-dash-dynamic-with-segment-deletion feat: add startwithSAP/subsegmentstartswithSAP for audio tracks (#1346) 2024-02-23 15:45:46 -08:00
avc-ts-live-playlist-with-key-rotation fix: hls, set the DEFAULT explicitly to NO. Supports native HLS players. (#1170) 2023-07-05 14:18:41 -07:00
avc-ts-live-playlist-with-segment-deletion fix: hls, set the DEFAULT explicitly to NO. Supports native HLS players. (#1170) 2023-07-05 14:18:41 -07:00
avc-ts-with-encryption fix: hls, set the DEFAULT explicitly to NO. Supports native HLS players. (#1170) 2023-07-05 14:18:41 -07:00
avc-ts-with-encryption-and-fairplay fix: hls, set the DEFAULT explicitly to NO. Supports native HLS players. (#1170) 2023-07-05 14:18:41 -07:00
avc-ts-with-encryption-exercise-emulation-prevention chore: Update URLs after moving projects (#1042) 2022-03-07 11:56:34 -08:00
bandwidth-override feat: add startwithSAP/subsegmentstartswithSAP for audio tracks (#1346) 2024-02-23 15:45:46 -08:00
dash-label feat: add startwithSAP/subsegmentstartswithSAP for audio tracks (#1346) 2024-02-23 15:45:46 -08:00
dash-with-bandwidth-override fix: duration formatting and update mpd testdata to reflect new format (#1320) 2024-02-08 09:48:14 -08:00
dolby-vision-profile-5-with-encryption fix: duration formatting and update mpd testdata to reflect new format (#1320) 2024-02-08 09:48:14 -08:00
dolby-vision-profile-8-with-encryption feat: order streams in manifest based on command-line order (#1329) 2024-02-14 09:21:11 -08:00
dtsx-dash feat: This patch adds support for DTS:X Profile 2 audio in MP4 files. (#1303) 2024-02-14 23:03:03 -08:00
ec3-and-hls-single-segment-mp4-encrypted fix: use a better estimate of frame rate for cases with very short first sample durations (#838) 2024-02-28 15:53:06 -08:00
ec3-packed-audio-encrypted fix: hls, set the DEFAULT explicitly to NO. Supports native HLS players. (#1170) 2023-07-05 14:18:41 -07:00
encryption feat: add startwithSAP/subsegmentstartswithSAP for audio tracks (#1346) 2024-02-23 15:45:46 -08:00
encryption-and-ad-cues feat: add startwithSAP/subsegmentstartswithSAP for audio tracks (#1346) 2024-02-23 15:45:46 -08:00
encryption-and-ad-cues-and-dash-trick-play feat: add startwithSAP/subsegmentstartswithSAP for audio tracks (#1346) 2024-02-23 15:45:46 -08:00
encryption-and-ad-cues-split-content feat: add startwithSAP/subsegmentstartswithSAP for audio tracks (#1346) 2024-02-23 15:45:46 -08:00
encryption-and-no-clear-lead feat: add startwithSAP/subsegmentstartswithSAP for audio tracks (#1346) 2024-02-23 15:45:46 -08:00
encryption-and-no-pssh-in-stream feat: add startwithSAP/subsegmentstartswithSAP for audio tracks (#1346) 2024-02-23 15:45:46 -08:00
encryption-and-non-dash-if-iop feat: add startwithSAP/subsegmentstartswithSAP for audio tracks (#1346) 2024-02-23 15:45:46 -08:00
encryption-and-output-media-info chore: Update URLs after moving projects (#1042) 2022-03-07 11:56:34 -08:00
encryption-and-output-media-info-and-mpd-from-media-info fix: duration formatting and update mpd testdata to reflect new format (#1320) 2024-02-08 09:48:14 -08:00
encryption-and-output-media-info-and-mpd-from-media-info-segmentlist feat: add startwithSAP/subsegmentstartswithSAP for audio tracks (#1346) 2024-02-23 15:45:46 -08:00
encryption-and-trick-play feat: add startwithSAP/subsegmentstartswithSAP for audio tracks (#1346) 2024-02-23 15:45:46 -08:00
encryption-and-two-trick-plays fix: use a better estimate of frame rate for cases with very short first sample durations (#838) 2024-02-28 15:53:06 -08:00
encryption-cbc-1 feat: add startwithSAP/subsegmentstartswithSAP for audio tracks (#1346) 2024-02-23 15:45:46 -08:00
encryption-cbcs feat: add startwithSAP/subsegmentstartswithSAP for audio tracks (#1346) 2024-02-23 15:45:46 -08:00
encryption-cbcs-with-full-protection feat: add startwithSAP/subsegmentstartswithSAP for audio tracks (#1346) 2024-02-23 15:45:46 -08:00
encryption-cens feat: add startwithSAP/subsegmentstartswithSAP for audio tracks (#1346) 2024-02-23 15:45:46 -08:00
encryption-multi-keys feat: add startwithSAP/subsegmentstartswithSAP for audio tracks (#1346) 2024-02-23 15:45:46 -08:00
encryption-multi-keys-with-stream-label feat: add startwithSAP/subsegmentstartswithSAP for audio tracks (#1346) 2024-02-23 15:45:46 -08:00
encryption-of-only-video-stream feat: add startwithSAP/subsegmentstartswithSAP for audio tracks (#1346) 2024-02-23 15:45:46 -08:00
encryption-using-explicit-pssh feat: add startwithSAP/subsegmentstartswithSAP for audio tracks (#1346) 2024-02-23 15:45:46 -08:00
encryption-using-fixed-key feat: add startwithSAP/subsegmentstartswithSAP for audio tracks (#1346) 2024-02-23 15:45:46 -08:00
encryption-with-multi-drms feat: add startwithSAP/subsegmentstartswithSAP for audio tracks (#1346) 2024-02-23 15:45:46 -08:00
first-stream fix: duration formatting and update mpd testdata to reflect new format (#1320) 2024-02-08 09:48:14 -08:00
flac-with-encryption fix: duration formatting and update mpd testdata to reflect new format (#1320) 2024-02-08 09:48:14 -08:00
forced-commandline-ordering feat: add startwithSAP/subsegmentstartswithSAP for audio tracks (#1346) 2024-02-23 15:45:46 -08:00
forced-commandline-ordering-ttml fix: duplicate representation id for TTML when forced ordering is on (#1364) 2024-03-07 10:32:09 -08:00
forced-subtitle feat: add startwithSAP/subsegmentstartswithSAP for audio tracks (#1346) 2024-02-23 15:45:46 -08:00
hdr10-with-encryption fix: duration formatting and update mpd testdata to reflect new format (#1320) 2024-02-08 09:48:14 -08:00
hevc-with-encryption fix: duration formatting and update mpd testdata to reflect new format (#1320) 2024-02-08 09:48:14 -08:00
hls-audio-video-text-with-ad-cues fix: hls, set the DEFAULT explicitly to NO. Supports native HLS players. (#1170) 2023-07-05 14:18:41 -07:00
hls-multi-segment-mp4-with-custom-path fix: hls, set the DEFAULT explicitly to NO. Supports native HLS players. (#1170) 2023-07-05 14:18:41 -07:00
hls-only-dash-only feat: add startwithSAP/subsegmentstartswithSAP for audio tracks (#1346) 2024-02-23 15:45:46 -08:00
hls-only-dash-only-captions feat: add startwithSAP/subsegmentstartswithSAP for audio tracks (#1346) 2024-02-23 15:45:46 -08:00
hls-segmented-webvtt fix: hls, set the DEFAULT explicitly to NO. Supports native HLS players. (#1170) 2023-07-05 14:18:41 -07:00
hls-single-segment-mp4-encrypted fix: hls, set the DEFAULT explicitly to NO. Supports native HLS players. (#1170) 2023-07-05 14:18:41 -07:00
hls-single-segment-mp4-encrypted-and-ad-cues fix: hls, set the DEFAULT explicitly to NO. Supports native HLS players. (#1170) 2023-07-05 14:18:41 -07:00
hls-single-segment-ts feat: Add support for single file TS for HLS (#934) 2024-02-23 15:28:11 -08:00
hls-with-bandwidth-override fix: hls, set the DEFAULT explicitly to NO. Supports native HLS players. (#1170) 2023-07-05 14:18:41 -07:00
live-profile feat: add startwithSAP/subsegmentstartswithSAP for audio tracks (#1346) 2024-02-23 15:45:46 -08:00
live-profile-and-encryption feat: add startwithSAP/subsegmentstartswithSAP for audio tracks (#1346) 2024-02-23 15:45:46 -08:00
live-profile-and-encryption-and-mult-files feat: add startwithSAP/subsegmentstartswithSAP for audio tracks (#1346) 2024-02-23 15:45:46 -08:00
live-profile-and-encryption-and-non-dash-if-iop feat: add startwithSAP/subsegmentstartswithSAP for audio tracks (#1346) 2024-02-23 15:45:46 -08:00
live-profile-and-key-rotation feat: add startwithSAP/subsegmentstartswithSAP for audio tracks (#1346) 2024-02-23 15:45:46 -08:00
live-profile-and-key-rotation-and-no-pssh-in-stream feat: add startwithSAP/subsegmentstartswithSAP for audio tracks (#1346) 2024-02-23 15:45:46 -08:00
live-profile-and-key-rotation-and-non-dash-if-iop feat: add startwithSAP/subsegmentstartswithSAP for audio tracks (#1346) 2024-02-23 15:45:46 -08:00
live-profile-and-key-rotation-cbcs feat: add startwithSAP/subsegmentstartswithSAP for audio tracks (#1346) 2024-02-23 15:45:46 -08:00
live-profile-with-webm fix: use a better estimate of frame rate for cases with very short first sample durations (#838) 2024-02-28 15:53:06 -08:00
live-static-profile feat: add startwithSAP/subsegmentstartswithSAP for audio tracks (#1346) 2024-02-23 15:45:46 -08:00
live-static-profile-and-ad-cues fix: duration formatting and update mpd testdata to reflect new format (#1320) 2024-02-08 09:48:14 -08:00
live-static-profile-with-time-in-segment-name feat: add startwithSAP/subsegmentstartswithSAP for audio tracks (#1346) 2024-02-23 15:45:46 -08:00
mp4-trailing-moov feat: add startwithSAP/subsegmentstartswithSAP for audio tracks (#1346) 2024-02-23 15:45:46 -08:00
opus-vp9-mp4-with-encryption fix: use a better estimate of frame rate for cases with very short first sample durations (#838) 2024-02-28 15:53:06 -08:00
segmented-ttml-mp4 feat: teletext formatting (#1384) 2024-04-29 10:33:03 -07:00
segmented-ttml-text feat: teletext formatting (#1384) 2024-04-29 10:33:03 -07:00
segmented-webvtt-mp4 fix: hls, set the DEFAULT explicitly to NO. Supports native HLS players. (#1170) 2023-07-05 14:18:41 -07:00
segmented-webvtt-text fix: hls, set the DEFAULT explicitly to NO. Supports native HLS players. (#1170) 2023-07-05 14:18:41 -07:00
segmented-webvtt-with-language-override fix: hls, set the DEFAULT explicitly to NO. Supports native HLS players. (#1170) 2023-07-05 14:18:41 -07:00
single-file-webvtt-text fix: duration formatting and update mpd testdata to reflect new format (#1320) 2024-02-08 09:48:14 -08:00
text chore: Update URLs after moving projects (#1042) 2022-03-07 11:56:34 -08:00
video-audio-text fix: duration formatting and update mpd testdata to reflect new format (#1320) 2024-02-08 09:48:14 -08:00
video-audio-ttml test: fix TTML integration test where ordering was changed by #1364 (#1379) 2024-03-25 12:31:21 -07:00
video-audio-webvtt feat: add startwithSAP/subsegmentstartswithSAP for audio tracks (#1346) 2024-02-23 15:45:46 -08:00
video-no-edit-list fix: duration formatting and update mpd testdata to reflect new format (#1320) 2024-02-08 09:48:14 -08:00
video-non-square-pixel fix: duration formatting and update mpd testdata to reflect new format (#1320) 2024-02-08 09:48:14 -08:00
vorbis-webm fix: duration formatting and update mpd testdata to reflect new format (#1320) 2024-02-08 09:48:14 -08:00
vp8-mp4-with-encryption fix: use a better estimate of frame rate for cases with very short first sample durations (#838) 2024-02-28 15:53:06 -08:00
vp8-webm fix: use a better estimate of frame rate for cases with very short first sample durations (#838) 2024-02-28 15:53:06 -08:00
vp9-webm fix: use a better estimate of frame rate for cases with very short first sample durations (#838) 2024-02-28 15:53:06 -08:00
vp9-webm-with-blockgroup fix: use a better estimate of frame rate for cases with very short first sample durations (#838) 2024-02-28 15:53:06 -08:00
vtt-text-to-mp4-with-ad-cues feat: add startwithSAP/subsegmentstartswithSAP for audio tracks (#1346) 2024-02-23 15:45:46 -08:00
webm-subsample-encryption fix: use a better estimate of frame rate for cases with very short first sample durations (#838) 2024-02-28 15:53:06 -08:00
webm-vp9-full-sample-encryption fix: use a better estimate of frame rate for cases with very short first sample durations (#838) 2024-02-28 15:53:06 -08:00
webm-with-encryption fix: use a better estimate of frame rate for cases with very short first sample durations (#838) 2024-02-28 15:53:06 -08:00
wvm-input feat: add startwithSAP/subsegmentstartswithSAP for audio tracks (#1346) 2024-02-23 15:45:46 -08:00
wvm-input-without-stripping-parameters-set-nalus feat: add startwithSAP/subsegmentstartswithSAP for audio tracks (#1346) 2024-02-23 15:45:46 -08:00
bear-640x360-av-cenc-golden.mpd fix: duration formatting and update mpd testdata to reflect new format (#1320) 2024-02-08 09:48:14 -08:00
bear-640x360-v-trick-2-golden.mp4 Add support for EditLists in ISO-BMFF 2018-07-26 23:20:21 +00:00