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

Better API for the track variants #758

Closed
Ross-cz opened this issue Apr 25, 2017 · 5 comments
Closed

Better API for the track variants #758

Ross-cz opened this issue Apr 25, 2017 · 5 comments
Assignees
Labels
flag: good first issue This might be a relatively easy issue; good for new contributors status: archived Archived and locked; will not be updated type: enhancement New feature or request
Milestone

Comments

@Ross-cz
Copy link
Contributor

Ross-cz commented Apr 25, 2017

  • What version of Shaka Player are you using? 395cc17

I would like to know easily, whether the track variants has video, audio or subtitle track. Now I have to check for a comma inside codecs. Here is sample output from the method getVariantTracks():
{"id":7,"active":false,"type":"variant","bandwidth":1799135,"language":"en","kind":null,"width":1920,"height":1080,"frameRate":23.976023976023978,"mimeType":"video/mp4","codecs":"avc1.640032, mp4a.40.2","primary":false}

It would be nice to have properties grouped instead of merged.
Btw, is it necessary to output constant property type = 'variant'?

Thanks!

@joeyparrish joeyparrish added the type: question A question from the community label Apr 25, 2017
@joeyparrish
Copy link
Member

Text tracks are separate from variants. Look for type == 'text'.

The combined codecs in variants is another side-effect of our HLS support, but I think we can probably change it. Would you prefer to see audioCodec and videoCodec in separate fields?

@Ross-cz
Copy link
Contributor Author

Ross-cz commented Apr 26, 2017

Hi Joey!

Thanks for the type clarification. We need to do the simple audio detection. If there aren't any audio tracks, we could somehow let users know about it.
I think its a great idea to just split codecs. Could you add audioChannelsCount too?

@joeyparrish
Copy link
Member

Counting audio channels in DASH is complex. There is another issue filled for that already (#424). I'll update that issue soon with more details.

I'm fairly sure we can split up the codecs, though.

@joeyparrish joeyparrish added type: enhancement New feature or request and removed type: question A question from the community labels Apr 26, 2017
@joeyparrish joeyparrish added this to the v2.2.0 milestone Apr 26, 2017
@joeyparrish joeyparrish self-assigned this Apr 26, 2017
@ismena ismena assigned ismena and unassigned joeyparrish May 1, 2017
@ismena ismena added the flag: good first issue This might be a relatively easy issue; good for new contributors label May 2, 2017
@ismena ismena assigned michellezhuogg and unassigned ismena May 3, 2017
@joeyparrish
Copy link
Member

This is now fixed in master, and I intend to cherry-pick it for v2.1.1 in the near future. You can see it now in our nightly build. Please let us know if this meets your needs.

joeyparrish pushed a commit that referenced this issue May 8, 2017
The audio and video codecs were combined in Track, so it's hard to
detect whether the track variant has video or audio track.
Changing the combined codec to two separate fields.

Closes #758.

Change-Id: I9fbd0b85830cac306dc09db2d71cf96f77146cbe
@joeyparrish
Copy link
Member

Cherry-picked to v2.1.1.

@shaka-project shaka-project locked and limited conversation to collaborators Mar 22, 2018
@shaka-bot shaka-bot added the status: archived Archived and locked; will not be updated label Apr 15, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
flag: good first issue This might be a relatively easy issue; good for new contributors status: archived Archived and locked; will not be updated type: enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants