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

Redmi Note-4 is under-reporting video playback capabilities #5991

Closed
GouravSna opened this issue Jun 4, 2019 · 8 comments
Closed

Redmi Note-4 is under-reporting video playback capabilities #5991

GouravSna opened this issue Jun 4, 2019 · 8 comments

Comments

@GouravSna
Copy link

Question: On Redmi Note-4, getTrackSupport in TrackSelectionView class does not return the device capability result properly.

I added all the tracks available for the following media, then I could see that device is capable enough to play the 10.29 Mbps(4k) media.

Issue: getTrackSupport should return the proper device capable tracks. Is there some issue in this method or should i use any other method to get the results correct.

@GouravSna
Copy link
Author

One more question:

Can we achieve this by checking the track codec with the deviceSupported codec types ?

Ex:

MediaCodecList.getCodecCount() // Total codec count

Then by looping over all the codec counts,


final MediaCodecInfo codecInfo = MediaCodecList.getCodecInfoAt(i);
     for (String supportedType : codecInfo.getSupportedTypes()) {

then if codec is supported then shall we decide that the device is capable to play the video/audio ?

@GouravSna
Copy link
Author

@ojw28 , please suggest.

@AquilesCanta AquilesCanta self-assigned this Jun 5, 2019
@AquilesCanta AquilesCanta changed the title Demo app is not showing the tracks even though the device is capable to play the track Redmi Note-4 is under-reporting video playback capabilities Jun 5, 2019
@AquilesCanta
Copy link
Contributor

I am assuming the track is reported as "NO_EXCEEDS_CAPABILITIES". If that's the case it's possible that the device is under-reporting capabilities. I don't think we work around these issues on the ExoPlayer side. You can implement a custom Track Selector that does overrides this selection for you. You can also contact the device manufacturer about this issue. Any input on this @ojw28?

@ojw28
Copy link
Contributor

ojw28 commented Jun 5, 2019

Without proper, complete and precise reproduction steps, there's nothing we can do to efficiently look at this issue. Please provide some.

@GouravSna
Copy link
Author

GouravSna commented Jun 6, 2019

Steps to reproduce:
Media Stream URL: https://bitdash-a.akamaihd.net/content/sintel/hls/playlist.m3u8
Branch: dev-v2

Steps:

  1. In TrackSelectionView class, line ~274

Replace:
if (mappedTrackInfo.getTrackSupport(rendererIndex, groupIndex, trackIndex) == RendererCapabilities.FORMAT_HANDLED) { trackView.setFocusable(true); trackView.setTag(Pair.create(groupIndex, trackIndex)); trackView.setOnClickListener(componentListener); } else { trackView.setFocusable(false); trackView.setEnabled(false); }

with this,
/* if (mappedTrackInfo.getTrackSupport(rendererIndex, groupIndex, trackIndex) == RendererCapabilities.FORMAT_HANDLED) {*/ trackView.setFocusable(true); trackView.setTag(Pair.create(groupIndex, trackIndex)); trackView.setOnClickListener(componentListener); /*} else { trackView.setFocusable(false); trackView.setEnabled(false); }*/

  1. In Select tracks dialog, select the bottom video track,

4096 * 1744, 10.29 Mbps

  1. Press OK.

Result:

On Moto G6, it fails with decoder init failed, which is fine because device is not capable enough to play this.

Caused by: com.google.android.exoplayer2.mediacodec.MediaCodecRenderer$DecoderInitializationException: Decoder init failed: OMX.qcom.video.decoder.avc, Format(7, null, null, video/avc, avc1.4D4033, 10285391, null, [4096, 1744, -1.0], [-1, -1])

On Redmi Note-4 Snapdragron, it plays this video tracks although if (mappedTrackInfo.getTrackSupport(rendererIndex, groupIndex, trackIndex) == RendererCapabilities.FORMAT_HANDLED) return false; so by this means this device should not be capable enough.

GouravSna added a commit to kaltura/playkit-android that referenced this issue Jun 6, 2019
Relying on Exoplayer for track selection
@google-oss-bot

This comment has been minimized.

@ojw28

This comment has been minimized.

@ojw28 ojw28 removed the question label Jun 24, 2019
giladna pushed a commit to kaltura/playkit-android that referenced this issue Jul 15, 2019
* - AndroidX migration
- Upgraded gson to 2.8.5
- Upgraded okhttp to 3.14.2
- Upgraded ExoPlayer to 2.10.1

* - API change for 2.10.1 for roleFlag in Subtitles
- Refactored MediaPlayerWrapper

* - Updated CustomVideoCodecRenderer class.
- Keeping the old file for the track.

* - Removed CustomVideoCodecRendererOld
- Added CustomMediaCodecRenderer

* - Decoder re-usability on change media.
https://exoplayer.dev/doc/reference/com/google/android/exoplayer2/ExoPlayer.html#setForegroundMode-boolean-

* - API Change : Added listener to bandwidth meter.

* - clean up

* - Restrict max supported bitrate to 5 Gbps
- ADAPTIVE support having -1 value is not supported in Exoplayer now, so changed the logic accordingly.

* - Issue Resolved: Lowest bitrate tracks was not being added.
- Now the isAdaptiveTrack is being analysed based on the flag present in the track.
- Removed the restriction of 5Gbps track. Logic is solely dependent on exoplayer now.

* - ExtractorMediaSource is deprecated.
- Code cleanup

* - Removed unused imports

* - Reverted track selection code
- google/ExoPlayer#5971

* - google/ExoPlayer#5991

Relying on Exoplayer for track selection

* - Role Flag was not being used
- Version updates for gson and okhttp
*     @TargetApi(Build.VERSION_CODES.JELLY_BEAN_MR2)
@ojw28
Copy link
Contributor

ojw28 commented Jun 11, 2021

Closing as an obsolete device specific issue.

@ojw28 ojw28 closed this as completed Jun 11, 2021
@google google locked and limited conversation to collaborators Aug 11, 2021
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