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

Audio Tracks FORMAT_EXCEEDS_CAPABILITIES #5145

Closed
andrewger157 opened this issue Nov 26, 2018 · 4 comments
Closed

Audio Tracks FORMAT_EXCEEDS_CAPABILITIES #5145

andrewger157 opened this issue Nov 26, 2018 · 4 comments

Comments

@andrewger157
Copy link

Issue description

Hi,
I'm implementing the audio track selection on my app using 'TrackSelectionView' as done in the demo app.
Everything works correctly except on some devices where the control to make the audio track selectable or not "trackInfo.getTrackSupport (rendererIndex, groupIndex, trackIndex)" returns me 2 (that is FORMAT_EXCEEDS_CAPABILITIES).

I specify that the default audio track is played correctly on these devices too.

I tried to customize the 'TrackSelectionView' class by removing this control and leaving all the audio tracks selectable; the result was that even on devices that previously did not allow to select audio tracks, these are now played correctly without apparent errors.

I wanted to ask you:
1 - Because leaving the standard implementation I can not select these audio tracks that are reproducible by the device?

2- Using my workaround, what problems could I encounter?

Version of ExoPlayer being used

2.9.1

Device(s) and version(s) of Android being used

Samsung A3 with Android 6.0
Samsung S3 Neo Android 4.4.2

@ojw28 ojw28 self-assigned this Nov 27, 2018
@ojw28
Copy link
Contributor

ojw28 commented Nov 27, 2018

The problem you could encounter is playback failure, if the user selects a format that genuinely isn't supported by the device.

It sounds like a case of these two devices under-reporting their true capabilities. If you're able to provide us with sample media that reproduces the issue, and ideally a bug report captured from one of the affected devices, then we can look at adding a workaround in ExoPlayer.

@cyrillrx
Copy link

cyrillrx commented Dec 5, 2018

Hi,

We experience the same issue since we migrated from ExoPlayer v2.8.4 to v2.9.1.

The problem occurs on several devices: Samsung Galaxy J5, Honor 5X, Xiaomi Redmi 4A, Amazon Fire Stick.

In the case of the Amazon Fire Stick, the problem is that "decoder.isCodecSupported(format.codecs)" returns false

decoder.name = "OMX.google.aac.decoder"
decoder.mimeType = "audio/mp4a-latm"
format.codecs = "mp4a.40.2"

If I override the method to return true, it works perfectly...

@ojw28 , are the audio capabilities more strict in the new ExoPlayer version?

@andrewlewis andrewlewis assigned andrewlewis and unassigned ojw28 Dec 5, 2018
@andrewlewis
Copy link
Collaborator

andrewlewis commented Dec 5, 2018

@cyrillrx I think this might be caused by 80f5b7e, which added a check on the CodecProfileLevels reported by the decoder for audio. Either capabilities are being underreported (we have seen this for video decoders too) or the profile/level check is buggy. It would be interesting to see what capabilities are reported on these devices (MediaCodecInfo.getProfileLevels()).

@andrewger157
Copy link
Author

I confirm that even on my devices (Samsung A3 with Android 6.0, Samsung S3 Neo Android 4.4.2) I have no problems with the version ExoPlayer v2.8.4

ojw28 added a commit that referenced this issue Dec 19, 2018
ojw28 pushed a commit that referenced this issue Dec 20, 2018
Issue: #5145
PiperOrigin-RevId: 226297129
@ojw28 ojw28 closed this as completed Dec 20, 2018
@google google locked and limited conversation to collaborators May 16, 2019
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

4 participants