video-dev / hls.js

HLS.js is a JavaScript library that plays HLS in browsers with support for MSE.
https://hlsjs.video-dev.org/demo
Other
14.97k stars 2.59k forks source link

hls.js seems not support 708 closed captions but 608 only #6754

Open featheast opened 1 month ago

featheast commented 1 month ago

What do you want to do with Hls.js?

I'd like to ask if 708 captions are actually supported by hls.js.

The main reason I'm asking here is comparing to 708, 608 is not able to display non-Latin based languages. And I did find hls.js is not the only one having this issue, Bitmovin player seems not able to show the same 708 captions as well. But since it's displaying fine for VHS (VideoJS), I am more wondering if there is a reason for 708 getting ignored, or any specific configs controls the behavior here.

Plus 708 captions can support more than 4, but there is no such configuration within hls.js similar to captionsTextTrack1Label , which is up to 4 only and seems only applied to 608 captions, even though the Doc is showing for CEA-708 caption tracks.

I can share the source link separately if that is helpful. But below are things I have tried:

With HLS sources (both Vod & Live) where both 608 and 708 caption tracks are embedded, it appears only 608 captions will be able to select and display on the player, while 708 ones will be ignored.

For the same sources, if I load into VHS (VideoJS) page: https://videojs-http-streaming.netlify.app/, I am able to see the captions for both 608s and 708s.

Attached a couple screenshots for the closed caption selector to show the difference: VHS: Screenshot 2024-10-06 at 7 19 19 PM Hls.js Screenshot 2024-10-06 at 7 19 52 PM

Here is an output from the MediaInfo to outlining the Text Tracks:

Screenshot 2024-10-06 at 7 21 35 PM

And I have also tried to use ccextractor to confirm those captions are able to be extracted and exported into srt files separately.

What have you tried so far?

No response

robwalch commented 1 month ago

HLS.js only supports 608 captions tracks with some support for 708 characters.

featheast commented 1 month ago

Hi @robwalch, thanks for the reply. Is this something on the roadmap for hls.js to support? Also I'm a bit confused about the concept of "support for 708 characters", and how does the flag enableCEA708Captions from the API.md mean here, if 708 caption tracks are not supported?

robwalch commented 1 month ago

It's not on the HLS.js roadmap but we'd gladly accept a contribution that adds support.