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
Play SmoothStreaming media with subtitles in demo application.
Problem exists only in case of extraction phase subtitle parsing path - which is now default.
SmoothStreaming media source (DefaultSsChunkSource) uses FragmentedMp4Extractor with non-null sideloadedTrack which seems to be incorrecly handled in FragmentedMp4Extractor.init() which in turn causes subtitles to be decoded by CueDecoder without being first encoded.
Following change causes stream to play correctly:
diff --git a/libraries/extractor/src/main/java/androidx/media3/extractor/mp4/FragmentedMp4Extractor.java b/libraries/extractor/src/main/java/androidx/media3/extractor/mp4/FragmentedMp4Extractor.java
--- a/libraries/extractor/src/main/java/androidx/media3/extractor/mp4/FragmentedMp4Extractor.java
+++ b/libraries/extractor/src/main/java/androidx/media3/extractor/mp4/FragmentedMp4Extractor.java (date 1728030664226)
@@ -417,7 +417,7 @@
if (sideloadedTrack != null) {
TrackBundle bundle =
new TrackBundle(
- output.track(0, sideloadedTrack.type),
+ extractorOutput.track(0, sideloadedTrack.type),
new TrackSampleTable(
sideloadedTrack,
/* offsets= */ new long[0],
Expected result
Media plays with subtitles rendered
Actual result
Playback error with following exception:
playerFailed [eventTime=1.12, mediaPos=0.00, window=0, period=0, errorCode=ERROR_CODE_FAILED_RUNTIME_CHECK
androidx.media3.exoplayer.ExoPlaybackException: Unexpected runtime error
at androidx.media3.exoplayer.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:720)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loopOnce(Looper.java:201)
at android.os.Looper.loop(Looper.java:288)
at android.os.HandlerThread.run(HandlerThread.java:67)
Caused by: java.lang.IllegalStateException: Bad magic number for Bundle: 0x6576206c
at android.os.BaseBundle.readFromParcelInner(BaseBundle.java:1659)
at android.os.BaseBundle.<init>(BaseBundle.java:143)
at android.os.Bundle.<init>(Bundle.java:96)
at android.os.Parcel.readBundle(Parcel.java:2658)
at androidx.media3.extractor.text.CueDecoder.decode(CueDecoder.java:63)
at androidx.media3.exoplayer.text.TextRenderer.readAndDecodeCuesWithTiming(TextRenderer.java:336)
at androidx.media3.exoplayer.text.TextRenderer.renderFromCuesWithTiming(TextRenderer.java:295)
at androidx.media3.exoplayer.text.TextRenderer.render(TextRenderer.java:263)
at androidx.media3.exoplayer.ExoPlayerImplInternal.doSomeWork(ExoPlayerImplInternal.java:1136)
at androidx.media3.exoplayer.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:561)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loopOnce(Looper.java:201)
at android.os.Looper.loop(Looper.java:288)
at android.os.HandlerThread.run(HandlerThread.java:67)
Thanks for the report and the suggested fix, it looks like this 'direct' usage of the output parameter was missed in da724c8 - I'll send a fix internally and it will be linked here when it's published.
This change is a no-op, because
`SubtitleTranscodingExtractorOutput.seekMap` forwards directly to the
delegate implementation, but it seems clearer to always use the
wrapper.
Also remove a no-op assignment in `MatroskaExtractor`.
This is a follow-up to Issue: #1779 where I manually checked every
implementation of `Extractor.init` for a similar mistake.
#cherrypick
PiperOrigin-RevId: 683607090
This was missed in da724c8
I tried to write a test for this, but got stuck crafting valid test
data. I was able to create a new fragmented MP4 file containing only a
TTML track:
```shell
$ MP4Box -add simple.ttml -frag 2000 sample_fragmented_ttml.mp4
```
Then I tried naively removing the `ftyp` and `moov` boxes with a hex
editor, but using this in `FragmentedMp4ExtractorNoSniffingTest` gave
me an `EOFException` that I didn't get to the root cause of.
Issue: #1779
#cherrypick
PiperOrigin-RevId: 683667850
Version
Media3 1.4.1
More version details
No response
Devices that reproduce the issue
AndroidTV STB with AndroidTV 12
Devices that do not reproduce the issue
No response
Reproducible in the demo app?
Yes
Reproduction steps
Play SmoothStreaming media with subtitles in demo application.
Problem exists only in case of extraction phase subtitle parsing path - which is now default.
SmoothStreaming media source (
DefaultSsChunkSource
) usesFragmentedMp4Extractor
with non-nullsideloadedTrack
which seems to be incorrecly handled inFragmentedMp4Extractor.init()
which in turn causes subtitles to be decoded byCueDecoder
without being first encoded.Following change causes stream to play correctly:
Expected result
Media plays with subtitles rendered
Actual result
Playback error with following exception:
Media
https://demo.unified-streaming.com/k8s/features/stable/video/tears-of-steel/tears-of-steel-multiple-subtitles.ism/Manifest
Bug Report
adb bugreport
to android-media-github@google.com after filing this issue.The text was updated successfully, but these errors were encountered: