Repository navigation
Error when textTrackTranscodingEnabled is set to true #836
Copy link
Copy link
Closed
Labels
Description
Version
Media3 1.2.0
More version details
No response
Devices that reproduce the issue
Any device
Devices that do not reproduce the issue
No response
Reproducible in the demo app?
Yes
Reproduction steps
When playing a mkv video with embedded subtitles and with the setTextTrackTranscodingEnabled feature enabled an exception occurrs when trying to play the video.
Without the feature enabled the file plays fine.
Expected result
Video should play fine with setTextTrackTranscodingEnabled feature enabled
Actual result
Playback error
androidx.media3.exoplayer.ExoPlaybackException: Source error
at androidx.media3.exoplayer.ExoPlayerImplInternal.handleIoException(ExoPlayerImplInternal.java:701)
at androidx.media3.exoplayer.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:677)
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: androidx.media3.exoplayer.upstream.Loader$UnexpectedLoaderException: Unexpected RuntimeException: Tried to marshall a Parcel that contained Binder objects.
at androidx.media3.exoplayer.upstream.Loader$LoadTask.run(Loader.java:438)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1137)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:637)
at java.lang.Thread.run(Thread.java:1012)
Caused by: java.lang.RuntimeException: Tried to marshall a Parcel that contained Binder objects.
at android.os.Parcel.nativeMarshall(Native Method)
at android.os.Parcel.marshall(Parcel.java:747)
at androidx.media3.extractor.text.CueEncoder.encode(CueEncoder.java:45)
at androidx.media3.extractor.text.SubtitleTranscodingTrackOutput.outputSample(SubtitleTranscodingTrackOutput.java:161)
at androidx.media3.extractor.text.SubtitleTranscodingTrackOutput.lambda$sampleMetadata$0$androidx-media3-extractor-text-SubtitleTranscodingTrackOutput(SubtitleTranscodingTrackOutput.java:152)
at androidx.media3.extractor.text.SubtitleTranscodingTrackOutput$$ExternalSyntheticLambda0.accept(Unknown Source:8)
at androidx.media3.extractor.text.pgs.PgsParser.parse(PgsParser.java:88)
at androidx.media3.extractor.text.SubtitleTranscodingTrackOutput.sampleMetadata(SubtitleTranscodingTrackOutput.java:147)
at androidx.media3.extractor.mkv.MatroskaExtractor.commitSampleToOutput(MatroskaExtractor.java:1454)
at androidx.media3.extractor.mkv.MatroskaExtractor.endMasterElement(MatroskaExtractor.java:799)
at androidx.media3.extractor.mkv.MatroskaExtractor$InnerEbmlProcessor.endMasterElement(MatroskaExtractor.java:1970)
at androidx.media3.extractor.mkv.DefaultEbmlReader.read(DefaultEbmlReader.java:88)
at androidx.media3.extractor.mkv.MatroskaExtractor.read(MatroskaExtractor.java:530)
at androidx.media3.extractor.text.SubtitleTranscodingExtractor.read(SubtitleTranscodingExtractor.java:76)
at androidx.media3.exoplayer.source.BundledExtractorsAdapter.read(BundledExtractorsAdapter.java:133)
at androidx.media3.exoplayer.source.ProgressiveMediaPeriod$ExtractingLoadable.load(ProgressiveMediaPeriod.java:1063)
at androidx.media3.exoplayer.upstream.Loader$LoadTask.run(Loader.java:417)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1137)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:637)
at java.lang.Thread.run(Thread.java:1012)
Media
Bug Report
- You will email the zip file produced by
adb bugreportto android-media-github@google.com after filing this issue.
Reactions are currently unavailable
Activity
Make `CueSerializationTest` more realistic
Make `CueSerializationTest` more realistic
icbaker commentedon Nov 27, 2023
Thanks for testing out this new feature - and reporting that it's broken :)
From this part of the stack trace, I suspect something is going wrong when serializing a bitmap subtitle (PGS is a bitmap-only format):
I thought we had a test for serializing a
Bitmapto bytes (viaBundle), but a bit of experimentation showed this was 'incorrectly' passing for two reasons:Parcel'ed without using aBinder. Switching to instantiating an image from a byte array allowed me to trigger the same failure you're seeing.I've updated the test to be more realistic in 63062a9, and disabled it for now (because it's failing). I'll work on fixing the logic and re-enabling the test in a follow-up change.
Split `Cue.toBundle` into serializable and binder-based variants
Split `Cue.toBundle` into serializable and binder-based variants