8000 Closed Captions are mispelled in Media3 · Issue #2372 · androidx/media · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Closed Captions are mispelled in Media3 #2372

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

Closed
1 task
amit12kumardish opened this issue Apr 24, 2025 · 5 comments
Closed
1 task

Closed Captions are mispelled in Media3 #2372

amit12kumardish opened this issue Apr 24, 2025 · 5 comments
Assignees
Labels

Comments

@amit12kumardish
Copy link

Version

Media3 main branch

More version details

im using:
private val extractorsFactory = DefaultExtractorsFactory().apply { setTsSubtitleFormats( ImmutableList.of( Format.Builder().setSampleMimeType(MimeTypes.APPLICATION_CEA608).build() ) ) }
check the attached stream for reference.
media3 version 1.6.0
Closed captions (CC) are being displayed with spelling errors or garbled/malformed text in Media3, whereas they appear correctly in vlc player.

Devices that reproduce the issue

Android box with media3

Devices that do not reproduce the issue

No response

Reproducible in the demo app?

Yes

Reproduction steps

play the attached media and see cc are coming misspelled

Expected result

closed captions should come properly

Actual result

Closed captions are coming mispelled

Media

vlc-record-2025-04-24-11h38m32s-udp___239.255.50.81_7000-.ts.zip

Bug Report

@icbaker
Copy link
Collaborator
icbaker commented Apr 28, 2025

Thanks for the media, I can reproduce the issue. This is supposed to be handled by ReorderingSeiMessageQueue, but adding some logging it seems that component is completely skipped in this case.

That is happening because when playing H.262 like your stream we pass the CEA data directly to CeaUtil here without reordering it:

CeaUtil.consumeCcData(pesTimeUs, userDataPayload, outputs);

If I change this to use ReorderingSeiMessageQueue with an arbitrary reorder size of 5, the subtitles display correctly.

In H.264 and H.265 we parse the max re-ordering queue size from the bitstream, and use this to configure ReorderingSeiMessageQueue - but looking at the H.262 spec I can't see an equivalent piece of metadata we can easily use. It says:

When the sequence contains coded B-frames, the number of consecutive coded B-frames is variable and unbounded

Which suggests that there isn't a 'reordering queue size' number we can read.

I'm going to try setting it to 3 arbitrarily...

@amit12kumardish
Copy link
Author

@icbaker Is there any workaround or fix to solve the cc mispelled issue.

copybara-service bot pushed a commit that referenced this issue Apr 29, 2025
In a follow-up change I am going to use this class in a non-SEI context
for H.262 'user data'.

Issue: #2372
PiperOrigin-RevId: 752683541
copybara-service bot pushed a commit that referenced this issue Apr 29, 2025
Issue: #2372
PiperOrigin-RevId: 752721649
@icbaker
Copy link
Collaborator
icbaker commented Apr 29, 2025

This is fixed by the commits linked above.

@icbaker icbaker closed this as completed Apr 29, 2025
@amit12kumardish
Copy link
Author
amit12kumardish commented Apr 30, 2025 via email

@icbaker
Copy link
Collaborator
icbaker commented Apr 30, 2025

The fix will be included in the 1.7.0-alpha01 release, which will likely happen in the next 2-3 weeks.

In the meantime, you can build the library locally from the main branch to get all the latest code changes: https://github.com/androidx/media/blob/release/README.md#locally

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants
0