Skip to content
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

Downloading DASH with external subtitles #8908

Closed
AGasztold opened this issue May 6, 2021 · 2 comments
Closed

Downloading DASH with external subtitles #8908

AGasztold opened this issue May 6, 2021 · 2 comments
Assignees

Comments

@AGasztold
Copy link

Hello,

I need to download external subtitles (VTT format) simultaneously with the video/audio tracks.
I have added subtitles to
MediaItem.PlaybackProperties List<Subtitle> subtitles (This mediaItem is passed to DownloadHelper.forMediaItem(..)), so it is possible to select Text track inside TrackSelectionDialog for download.
Unfortunatelly, streamKeys are empty in this case ->
public DownloadRequest getDownloadRequest(String id, @Nullable byte[] data) { ... streamKeys.addAll(mediaPreparer.mediaPeriods[periodIndex].getStreamKeys(allSelections)); ... } getStreamKeys returns empty list for MergingMediaPeriod (there is no problem for DashMediaPeriod - as it has its own implementation of getStreamKeys).
Download attempt for DASH was OK, but without subtitles.
The question is -> what is the best way to add external subtitles for download?
I will appreciate Your help.

@christosts
Copy link
Contributor

@ojw28 can you take a look?

@ojw28
Copy link
Contributor

ojw28 commented May 7, 2021

This is not something we support directly, so for now you have to download the subtitle file yourself, and also specify it at playback time (presumably using a file:/// URI that points to where the file has been downloaded).

Providing direct support is tracked by #5615, so closing as a duplicate of that issue.

@ojw28 ojw28 closed this as completed May 7, 2021
@ojw28 ojw28 added the duplicate label May 7, 2021
@google google locked and limited conversation to collaborators Jul 7, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants