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

setPreferredVideoMimeType/setPreferredVideoRoleFlags don't work for adaptive playbacks #9519

Closed
ojw28 opened this issue Oct 1, 2021 · 3 comments
Assignees
Labels

Comments

@ojw28
Copy link
Contributor

ojw28 commented Oct 1, 2021

As per title, the preferred video MIME type(s) don't seem to be used when making adaptive video track selections.

I found this when investigating #9463, where it would have been useful to provide the following as a viable workaround to prefer the H264 adaptation set:

trackSelector.setParameters(
    trackSelector
        .getParameters()
        .buildUpon()
        .setPreferredVideoMimeType(MimeTypes.VIDEO_H264));
@ojw28 ojw28 added the bug label Oct 1, 2021
@tonihei
Copy link
Collaborator

tonihei commented Oct 7, 2021

[Solution tracked internally by b/202380939]

kim-vde pushed a commit that referenced this issue Nov 26, 2021
And also tweak existing role flag logic to strictly prefer perfect
matches over partial matches.

Caveat: Video role flags only supported for fixed track selections
(same issue as Issue: #9519).

Issue: #9402
PiperOrigin-RevId: 412292835
@tonihei tonihei changed the title setPreferredVideoMimeType doesn't work for adaptive playbacks setPreferredVideoMimeType/setPreferredVideoRoleFlags don't work for adaptive playbacks Nov 29, 2021
@tonihei
Copy link
Collaborator

tonihei commented Nov 29, 2021

Note: The problem occurs for preferred video role flags, which are also only applied when making a fixed video track selection at the moment.

tonihei added a commit to androidx/media that referenced this issue Dec 2, 2021
And also tweak existing role flag logic to strictly prefer perfect
matches over partial matches.

Caveat: Video role flags only supported for fixed track selections
(same issue as Issue: google/ExoPlayer#9519).

Issue: google/ExoPlayer#9402
PiperOrigin-RevId: 412292835
tonihei added a commit that referenced this issue Jan 17, 2022
This change moves the video track selection to the generic
selection method introcuced for audio and text. This ensures
we can apply the same criteria for fixed and adaptive video
track selections. Implicitly, this reorders the preferences
for adaptive tracks to give non-quality preferences (like
preferred MIME type or preferred role flags) a higher priority
than number of tracks in the selection.

Issue: #9519
PiperOrigin-RevId: 422310902
@tonihei tonihei closed this as completed Jan 17, 2022
icbaker pushed a commit to androidx/media that referenced this issue Jan 26, 2022
This change moves the video track selection to the generic
selection method introcuced for audio and text. This ensures
we can apply the same criteria for fixed and adaptive video
track selections. Implicitly, this reorders the preferences
for adaptive tracks to give non-quality preferences (like
preferred MIME type or preferred role flags) a higher priority
than number of tracks in the selection.

Issue: google/ExoPlayer#9519
PiperOrigin-RevId: 422310902
@rohitninawe

This comment was marked as off-topic.

@google google locked and limited conversation to collaborators Mar 19, 2022
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

3 participants