You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
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:
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.
When will this fix be available for use?
#2372
I'm currently using version 1.6.0. Do you have any information about the
next release that includes the closed captioning issue fix?
* Is there any other way I can test the fix in the meantime?*
#2372
Hi Media3 Team,
Hope you're doing well.
I wanted to check if there's any estimated timeline for the *Release
Candidate (RC)* of *Media3 version 1.8.0-alpha01*. We’re actively planning
some upcoming features and would like to align our integration timeline
accordingly.
Appreciate any insights you can share.
Activity
icbaker commentedon 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
CeaUtilhere without reordering it:media/libraries/extractor/src/main/java/androidx/media3/extractor/ts/UserDataReader.java
Line 79 in 4d7046c
If I change this to use
ReorderingSeiMessageQueuewith 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: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 commentedon Apr 29, 2025
@icbaker Is there any workaround or fix to solve the cc mispelled issue.
Rename `ReorderingSeiMessageQueue` to remove reference to SEI
Use `ReorderingBufferQueue` in H.262 `UserDataReader`
icbaker commentedon Apr 29, 2025
This is fixed by the commits linked above.
amit12kumardish commentedon Apr 30, 2025
icbaker commentedon 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
mainbranch to get all the latest code changes: https://github.com/androidx/media/blob/release/README.md#locallyamit12kumardish commentedon May 13, 2025
icbaker commentedon May 20, 2025
1.8.0-alpha01 was released yesterday (there was a problem with the 1.7.0-alpha01 release, hence skipping to 1.8): https://github.com/androidx/media/releases/tag/1.8.0-alpha01
amit12kumardish commentedon May 20, 2025
icbaker commentedon May 20, 2025
No and no :)
amit12kumardish commentedon May 20, 2025
amit12kumardish commentedon Jun 2, 2025