Skip to content

Syntax for specifying CEA captions characteristics when packaging HLS #986

@Canta

Description

@Canta

System info

Operating System: Ubuntu 18.04.5 LTS (dockerized)
Shaka Packager Version: b7ef11f-release

Issue and steps to reproduce the problem

I'm deploying streams with CEA-608 closed captions.
The captions do reach the players, and are correctly displayed. So far, so good.
However, I can't find any HLS related syntax to tell the players a name for the captions (for example, its language). Therefore, this is what I see when playing:

image

That is not the case with audios, where I can use hls_name, and so this is what the players show:

image

And I would also like to point out that DASH does not have this problem, as part of the closed captions syntax I can specify the language, and that's relevant information for the players, as seen here:

image

That's the same h264 stream, with the same CEA-608 bytes as the previous screenshots, but packaged to DASH instead of HLS.

So, my question: is there any way to set an hls_name, or even language, to closed captions streams, for HLS?

As a side note, don't entirely sure if relevant, I've seen this line of code: https://github.com/google/shaka-packager/blob/master/packager/hls/base/master_playlist.cc#L255
There, it's stated that "cea is not supported as output, as it's just input". I disagree: CEA-608 captions are clearly part of the output, and what we need is a way to manually (it's not even any smart logic) tell shaka how to state captions characteristics in the HLS playlists. That line seem to hardcode "no captions", which is simply not true, without any way to change it. If shaka does not remove the captions, then it's wrong to say there are none, and we should have a way to tell the players what they need in order to manage the user experience correctly.

Packager Command:

packager \
"in=udp://127.0.0.1:12345, stream_selector=0,segment_template=/path/streamname/240_\$$Time%013d\$$_hls.ts,playlist_name=240.m3u8,drm_label=SD,bandwidth=512000,cc_index=0" 
"in=udp://127.0.0.1:12345, stream_selector=1,segment_template=/path/streamname/360_\$$Time%013d\$$_hls.ts,playlist_name=360.m3u8,drm_label=SD,bandwidth=768000,cc_index=0" 
"in=udp://127.0.0.1:12345, stream_selector=3,segment_template=/path/streamname/720_\$$Time%013d\$$_hls.ts,playlist_name=720.m3u8,drm_label=SD,bandwidth=3072000,cc_index=0" 
"in=udp://127.0.0.1:12345, stream_selector=4,segment_template=/path/streamname/audio_\$$Time%013d\$$_hls.ts,playlist_name=audio.m3u8,drm_label=SD,bandwidth=64000,language=spa,hls_name=Español" 
"in=udp://127.0.0.1:12345, stream_selector=5,segment_template=/path/streamname/audio2_\$$Time%013d\$$_hls.ts,playlist_name=audio2.m3u8,drm_label=SD,bandwidth=64000,language=eng,hls_name=English" 
--io_cache_size 10000000 
--hls_master_playlist_output /path/streamname/master.m3u8
--hls_playlist_type LIVE 
--segment_duration 3.2 
--time_shift_buffer_depth 30 
--preserved_segments_outside_live_window 30 
--default_language=spa 

Extra steps to reproduce the problem?

  • You need a stream with CEA608. An easy way to get one is to just loop some VOD (containing cea608) with ffmpeg. Ffmpeg behaves the same way as shaka packager regarding cea608: if it's there, it just does not touch it, and lets it pass.

What is the expected result?

Some way to tell the players a description of the captions for HLS.

What happens instead?

The captions are shown as "unknown", shaka packager does not seem to have a syntax to change that, and also shaka packager seems to compulsively state "there are no captions" (even when that's not the case).

Metadata

Metadata

Assignees

No one assigned

    Labels

    component: textThe issue involves text streams (subtitles or captions)flag: good first issueThis might be a relatively easy issue; good for new contributorsflag: seeking PRWe are actively seeking PRs for this; we do not currently expect the core team will resolve thispriority: P2Smaller impact or easy workaround

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions