-
Notifications
You must be signed in to change notification settings - Fork 6k
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
Full screen bitmap smpte-tt subtitle not rendered correctly #5633
Comments
Example: Two problems causing this issue: 1. Incorrect height calculation Height calculation in
The This logic is OK for non-full screen subtitles, but for a full screen one it doesn't force the bitmap to fit the parent size. This results incorrect positioning. Inside Proposed solution: Pass the height from 2. Incorrect position anchor Inside Again, because the
Proposed solution: Change the default position anchor to @ojw28 |
Can someone have a look on this please? |
@szaboa, have you shared a stream with us? We will need sample media before we look into this. If you think the solution is straightforward, you might want to send a pull request directly: But most likely, we will still need a sample stream. |
I will try to get a sample stream as soon as I can. Actually, I was who implemented the support for image based subtitles (smpte-tt) and I didn't pay enough attention to this use case. That's why I proposed the fix. |
Sorry, accidentally closed the issue, miss click :) |
@AquilesCanta, sorry for the late response :) Updated ticket's description with sample streams. During testing make sure you pick the second Norwegian subtitle track and note that you might need to wait a little for the subs to show up (probably not synced correctly in this test content). I've also created a pull request with the proposed solution (#5711). And to make sure nothing changed for regular (not full screen) image based subtitles, I've also tested with this sample stream (which I used as a reference when I implemented support for image based subs at first place): https://livesim.dashif.org/dash/vod/testpic_2s/img_subs.mpd @ojw28, you might want to have a look too on the proposed solution, as we have discussed this feature quite a lot at the beginning :) |
Any update on this? :) |
@ojw28, I would really appreciate if someone could take a look on this. |
I'll look into it this week. |
Thank you! |
Hi, I'm getting a 404 now. Can you please make sure the streams are available? |
Hi, will send the new ones via email shortly. |
Ok. Please post below once you do. I suppose I'll get to this on Tuesday. |
@AquilesCanta Which contains a cue that is full screen (big red rectangle) and it should cover the whole screen, as it has a region 1280px 720px and the root tt value is also 1280px 720px (which gives the window reference). Please side load this subtitle to any of the streams inside the exo's demo application. Before fix: After fix: |
We will be pushing a fix soon. Please try it out once a commit appears referenced below so that you can make sure it works before it reaches a release version. |
Alright, thanks. |
According to Cue's constructor (for bitmaps) documentation: + cuePositionAnchor does horizontal anchoring. + cueLineAnchor does vertical anchoring. Usage is currently inverted. Issue:#5633 PiperOrigin-RevId: 250253002
+ Use start for anchoring, instead of center. + Add the height to the TTML bitmap cue rendering layout. Issue:#5633 PiperOrigin-RevId: 250519710
@AquilesCanta |
Glad to hear that. Let me know if you run into any other issues. |
According to Cue's constructor (for bitmaps) documentation: + cuePositionAnchor does horizontal anchoring. + cueLineAnchor does vertical anchoring. Usage is currently inverted. Issue:#5633 PiperOrigin-RevId: 250253002
+ Use start for anchoring, instead of center. + Add the height to the TTML bitmap cue rendering layout. Issue:#5633 PiperOrigin-RevId: 250519710
[REQUIRED] Issue description
Support for image based SMPTE-TT subtitles was implemented in #1583, however it's not working quite well for "full screen" subtitles as it renders these out of the screen and with wrong height. By full screen I mean when the subtitle should take size of the surface. This is the case when tt tts:extent = region tts:extent in case of pixel based regions.
[REQUIRED] Reproduction steps
It can be reproduced with the ExoPlayer demo app, just needs a stream with image based SMPTE-TT subtitle track where the Base64 encoded bitmap is "full screen".
[REQUIRED] Link to test content
Email
[REQUIRED] A full bug report captured from the device
No logs required.
[REQUIRED] Version of ExoPlayer being used
ExoPlayer 2.9.3 - 2.9.6
[REQUIRED] Device(s) and version(s) of Android being used
It can be reproduced every time and not device dependent.
In my tests, I've used Pixel 1.
The text was updated successfully, but these errors were encountered: