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

Couldn't adaptive different codecs in HLS stream #3500

Closed
ntminh90 opened this issue Nov 25, 2017 · 6 comments
Closed

Couldn't adaptive different codecs in HLS stream #3500

ntminh90 opened this issue Nov 25, 2017 · 6 comments
Labels

Comments

@ntminh90
Copy link

ntminh90 commented Nov 25, 2017

Reproduction steps
We built the V2 exoplayer for our app.
We transcoded our stream into HLS stream with 2 profiles with different codec video in mainifest file.

  1. 1080p H264
  2. 2160p HEVC
    We tried to test our HLS link on Exoplayer, but we couldn't adaptive between two profiles in good network environment. Only playing 1080p profile.
    Then we tried to transcode our stream into HLS stream with 2 profiles with the same codec H264 or HEVC video in mainifest file. We could adaptive between two profiles.

HLS mainifest file link description to test content

#EXTM3U
#EXT-X-VERSION:3
#EXT-X-INDEPENDENT-SEGMENTS
#EXT-X-STREAM-INF:BANDWIDTH=5605600,AVERAGE-BANDWIDTH=5605600,CODECS="avc1.640028,mp4a.40.2",RESOLUTION=1920x1080,FRAME-RATE=30.000
1080p.m3u8
#EXT-X-STREAM-INF:BANDWIDTH=13340800,AVERAGE-BANDWIDTH=13340800,CODECS="hev1.1.6.L153.B0,mp4a.40.2",RESOLUTION=3840x2160,FRAME-RATE=30.000
2160p.m3u8

Version of ExoPlayer being used
Release-V2

Device(s) and version(s) of Android being used
I used the Android 4K UHD TV Sony 6.0 and V3 Wechip STB for testing.

A full bug report captured from the device

[X] Track:0, id=1, mimeType=video/avc, bitrate=5605600, res=1920x1080, supported=YES
[ ] Track:0, id=0, mimeType=video/hevc, bitrate=13340800, res=3840x2160, supported=NO_EXCEEDS_CAPABILITIES
@ojw28
Copy link
Contributor

ojw28 commented Nov 27, 2017

You can enable cross-mime adaptiveness by creating your DefaultTrackSelector as follows:

trackSelector = new DefaultTrackSelector(adaptiveTrackSelectionFactory);
trackSelector.setParameters(trackSelector.getParameters().withAllowMixedMimeAdaptiveness(true));

Note that cross-mime adaptive switches may be less seamless than those that use the same codec, since the allocated decoder cannot be re-used. Ideally you'd provide HEVC transcodes at the lower resolutions too, so that devices that support HEVC can use only the HEVC transcodes (hence either getting a big bandwidth saving over what you're doing currently, or getting better quality).

@ojw28 ojw28 closed this as completed Nov 27, 2017
@ojw28 ojw28 added the question label Nov 27, 2017
@AquilesCanta
Copy link
Contributor

I think it is worth mentioning that the hevc 4k stream is not supported by the device so, even if you enable allowMixedMimeAdaptiveness, it will not be adapted to, as it cannot be rendered according to device capability advertising. If the device does not support it, there is not much exoplayer can do about it. You could try lower quality profile/level configurations, if you control the media generation.

@ntminh90
Copy link
Author

Hi AquilesCanta.
Our device under testing could decode and adaptive HEVC stream if the playlist has 1 HEVC profile or 2 HEVC profiles.
Our problem here is the different codecs in the mainifest file .m3u8 which could not adaptive between profiles.
Thanks

@AquilesCanta
Copy link
Contributor

The stream is reported as NO_EXCEEDS_CAPABILITIES. This does not mean that the device cannot play hevc, but that this particular stream exceeds capabilities. It is likely that other hevc streams with lower resolution are supported. Sometimes, devices under-report their capabilities. You could try forcing its playback and see what happens.

The comment by @ojw28 above still applies, though.

@OrenMe
Copy link

OrenMe commented Dec 31, 2017

@nyminh90 are you able to get codec data per variant?
I have a mixed playlist with both h264 and hevc and I a device which supports hevc and I get all tracks supported but all of them are flagged as hevc codec, even the h264 ones.

@ojw28
Copy link
Contributor

ojw28 commented Jan 2, 2018

@OrenMe - I think the behavior you're observing is a bug. We're tracking the issue in #3653.

@google google locked and limited conversation to collaborators Apr 10, 2018
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

4 participants