Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support PNG subtitles in SMPTE-TT #1583

Closed
fguinet opened this issue Jun 8, 2016 · 13 comments
Closed

Support PNG subtitles in SMPTE-TT #1583

fguinet opened this issue Jun 8, 2016 · 13 comments
Assignees

Comments

@fguinet
Copy link

fguinet commented Jun 8, 2016

Currently the ExoPlayer code assumes subtitles/text-tracks are always receive in text format (TTML).
The metadata stream of the transport stream may contain SMPTE-TT data, an extension of TTML that extends TTML with binary blobs, encoded in base64.
The base64 data are part of the TTML xml structure and may for example contain bitmap subtitles or be used to tunnel other formats.
Is it plan to implements SMPTE-TT + PNG support including the display of the base64-decoded bitmap subtitles in the player ?

@rvergara1
Copy link

Same issue #179

@AquilesCanta
Copy link
Contributor

As stated above, this is a duplicate of #179. Thanks, @rvergara1.

@ojw28
Copy link
Contributor

ojw28 commented Apr 19, 2017

Re-opening specifically to track support for bitmaps inside of SMPTE-TT. Marking as an enhancement. Realistically, I don't think we'll be looking at this any time soon, so if someone wants to work on a pull request please feel free. It's probably not too hard to add support now that plumbing of bitmaps through Cue and SubtitlePainter is in place.

@ojw28 ojw28 reopened this Apr 19, 2017
@ojw28 ojw28 changed the title Subtitles/Text-tracks: Support of SMPTE-TT + PNG Support PNG subtitles in SMPTE-TT Apr 19, 2017
@ghost
Copy link

ghost commented Apr 19, 2017

Hi @ojw28

Just to weigh in on the use-cases here.

Many of the source channels for live TV ONLY deliver subtitles in image based DVB-SUB format.

Since we don't have the luxury of being able to deliver a text based format on many channels and it cannot be be guaranteed that there will be capability in the head end to provide OCR based conversion from image rendering to text - thus SMPTE-TT is considered a 'must have' for OTT/MPEG-DASH delivery of live TV in Scandinavia and Eastern Europe.

In saying that, If we were to have a go at implementing this, I guess we would need to add extraction /decoding of TTML metadata to TtmlDecoder? Any other gotchas in there?

@ojw28
Copy link
Contributor

ojw28 commented Apr 19, 2017

Yes, I think it's just a case of adding support in TtmlDecoder (and related classes in the text/ttml package). I don't think there are any gotchas, and you shouldn't need to change anything outside of that package.

@nigelmegitt
Copy link

SMPTE-TT is considered a 'must have' for OTT/MPEG-DASH delivery of live TV in Scandinavia and Eastern Europe

A valid and possibly more current alternative would be IMSC's Image Profile, which is similarly a variant of TTML and includes some SMPTE-TT concepts. It is also under consideration for CMAF.

@google google deleted a comment from rossinior Jun 30, 2017
@JerCodeWhisperer
Copy link

Hi, we are looking to use this feature. At the present time is it being worked on or is it planned?

@szaboa
Copy link
Contributor

szaboa commented Oct 19, 2018

@ojw28 @AquilesCanta

I intend to work on this, is it all right for you?

What I see after quickly checking the code that the image attribute from the header needs to be parsed, then I need to create a bitmap from the base64 string and just pass forward to the cue.

Am I missing something perhaps?

@ojw28
Copy link
Contributor

ojw28 commented Oct 22, 2018

@szaboa - Feel free to give this a go!

Re your question, I'm not sure as we haven't had time to properly investigate, but what you describe sounds plausible! The main thing I'm not sure on is how the implementation will fit into the existing TTML code, which is relatively complex (e.g. TtmlNode). Figuring that out is probably the main challenge.

@szaboa
Copy link
Contributor

szaboa commented Oct 24, 2018

I think I am on the right track, the sub is already displayed. But need to research a bit the TTML specs, because I am not sure if image based subs can have regions, and also I would like to extend the TTML decoder unit test cases.

szaboa added a commit to szaboa/ExoPlayer that referenced this issue Nov 6, 2018
szaboa added a commit to szaboa/ExoPlayer that referenced this issue Nov 6, 2018
szaboa added a commit to szaboa/ExoPlayer that referenced this issue Nov 8, 2018
Look for "div" tags when generating the set of times.
szaboa added a commit to szaboa/ExoPlayer that referenced this issue Nov 10, 2018
@nicusorflorin
Copy link

Will this allow IMSC subs to be rendered as well?

szaboa added a commit to szaboa/ExoPlayer that referenced this issue Nov 22, 2018
@ojw28
Copy link
Contributor

ojw28 commented Dec 14, 2018

@szaboa has implemented support for this (thanks!), which is now available in the dev-v2 branch. @szaboa - Can this issue be closed, or is there more work still to be done?

@szaboa
Copy link
Contributor

szaboa commented Dec 14, 2018

@ojw28
Np, looking forward to contribute more.

From my side this issue can be closed. If there is a demand for IMSC image subs then I can do it under another issue in the future.

@ojw28 ojw28 closed this as completed Dec 14, 2018
@google google locked and limited conversation to collaborators May 16, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

8 participants