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

Selecting multiple video tracks for a video renderer #2658

Closed
Endmaril opened this issue Apr 7, 2017 · 1 comment
Closed

Selecting multiple video tracks for a video renderer #2658

Endmaril opened this issue Apr 7, 2017 · 1 comment
Labels

Comments

@Endmaril
Copy link

Endmaril commented Apr 7, 2017

Hi,

I know that DASH-SRD support is not provided and not planned, thus i'm currently trying to implement it in a decent way into exoplayer 2. The purpose of the implementation is to be able to playback a tiled video described with DASH-SRD.

I am currently struggling to find a proper way to render the video. I'd like to avoid instantiating one renderer per tile because each of them will in turn instantiate a codec and things might get messy as stated in other issues (#273 for exemple for limitations on having too many codec instances).
The plan is to use a single renderer which is fed with several video tracks (one per tile) and manages the decoding and construction of the final frame.

I would like to know if you have any advice on how to handle the selection of multiple video tracks for one renderer ?

My guess is by implementing my own version of a TrackSelector, which would select one track for each TrackGroup of type TRACK_TYPE_VIDEO but that means returning more tracks than the number of active renderers (several tracks are returned for only one video renderer), which doesn't seem to be the expected behavior of the track selector. Should I then grow the list of active renderers by adding my video renderers as many times as there are tiles in the video to make it comply with the framework expectations ?

I would really appreciate to have your thoughts and some advice on the subjects.
Thanks.

@ojw28 ojw28 added the question label Apr 7, 2017
@ojw28
Copy link
Contributor

ojw28 commented Aug 4, 2017

Feeding multiple video streams into a single decoder isn't a valid thing to do. Video decoders are stateful, since decoding a frame often depends on the result of having decoded the frames that come before it. Decoders also re-order frames from decode order into presentation order. Hence there needs to be a 1:1 relationship between video streams and decoders.

Hence if you want to decode multiple video streams in parallel, there is no option but to instantiate multiple decoders. Given this, there's no reason not to use multiple renderers to do so. You're correct to say that you might hit issues such as there only being a limited number of decoder instances.

@ojw28 ojw28 closed this as completed Aug 4, 2017
@google google locked and limited conversation to collaborators Dec 3, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants