-
Notifications
You must be signed in to change notification settings - Fork 432
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
New subtitle transcoding feature loads all subtitles when initialising #1721
Comments
This is due to the new subtitle handling using
Lines 102 to 104 in c35a9d6
And only loads data inside Lines 149 to 157 in c35a9d6
Whereas media/libraries/exoplayer/src/main/java/androidx/media3/exoplayer/source/ProgressiveMediaPeriod.java Lines 241 to 245 in c35a9d6
I agree this is unexpected, it's an unintended side-effect of using |
@icbaker Are there any intentions to change and fix this? |
Yes, I'm working on this at the moment. |
This means we can complete preparation (and trigger track selection) before opening a `DataSource`, which then means we only end up loading the data for a selected subtitle track (instead of all tracks as currently happens). By making preparation trivial in this case (with no reasonable cause of error), we can also remove the `suppressPrepareError` option added in b3290ef. This change also fixes the implementation of `ProgressiveMediaPeriod.maybeStartDeferredRetry` to only short-circuit return `false` if the chosen track is not audio or video **and** there is at least one audio or video track in this period. Issue: #1721 PiperOrigin-RevId: 702275968
Version
Media3 1.4.1
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
With the version
1.4.1
theexperimentalSetTextTrackTranscodingEnabled
feature is enabled by default and it introduces behaviour that is not expected and was not there before. With it enabled the player loads each and every subtitle configuration that is defined for theMediaItem
even if it is not selected. There can be uses cases where these subtitles configuration are remote urls and there can be many of them for different languages, so loading all of them when initialising the media item is not efficient and introduces delay when the item is played. Ideally only the selected subtitle should be transcoded, as was the behaviour before with remote urls - it would get downloaded only when it was selected.Expected result
Not all subtitle configuration are loaded when
MediaItem
is initializedActual result
All subtitles configuration are loaded (and in case of remote urls - are downloaded)
Media
Any
Bug Report
adb bugreport
to android-media-github@google.com after filing this issue.The text was updated successfully, but these errors were encountered: