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

Support selecting a specific stream #31

Open
EvysGarden opened this issue Dec 29, 2023 · 1 comment
Open

Support selecting a specific stream #31

EvysGarden opened this issue Dec 29, 2023 · 1 comment

Comments

@EvysGarden
Copy link

Problem

I am using your crate for a pixelflut and am trying to livestream from a m3u8 file. It has several video streams with different resolutions and i want to be able to select a specific stream.

What I have done so far

I've looked into your reader and you are perfectly able to query for streams but there is currently no way to make use of that info as the stream is always selected with best_video_stream_index().

Feature request

It would be nice to expose the stream selection to the user. Something like this:

Best selection

let source = Locator::Url(...);
let decoder = Decoder::new(&source, StreamSelection::Best)?;

Manual selection

let source = Locator::Url(...);
let decoder = Decoder::new(&source, StreamSelection::Index(2))?;
@gerwin3
Copy link
Contributor

gerwin3 commented Apr 16, 2024

This is quite trivial to implement now since #37 has been merged with builder pattern everywhere.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants