[Android] Not all resolutions are returned from the HLS stream. <Add override flag to add all variants to an HLS adaptive group whether supported or not by the playback device>
Unity version
6000.1.14f1
Unity editor platform
macOS
AVPro Video edition
Ultra
AVPro Video version
3.2.9
Device hardware
Quest2, Pico4Ultra
Which Android OS version are you using?
14
Unity Graphics API
OpenGLES 3
Video API
media3/ExoPlayer
Texture format
Y Cb Cr 420_OES
Audio output
System Direct
Any other Media Player component configuration required to reproduce the issue.
No response
Which output component(s) are you using?
Apply to Mesh
Any other component configuration required to reproduce the issue.
No response
The issue
We have HLS stream that contains several resolution (3840x1920, 5400x2700, 6912x3456, 8192x4096).
But when i start app on Quest2/3 or Pico4Ultra Variants doesn't contain 8192x4096 resolution. When i start app in UnityEditor (mac) 8192x4096 resolution is here.
Also i have HLS stream for this video with only one resolution 8192x4096 and it works good and play. Based on this, we can conclude that the devices support video with this resolution and codec.
It's difficult for me to provide a link to this HLS stream because it has a short TTL. However, I can provide a link upon request via any messenger.
Info with video with only one resolution:
Duration: 00:02:14.31, start: 0.000000, bitrate: 0 kb/s
Program 0
Metadata:
variant_bitrate : 47450846
Stream #0:0(eng): Video: hevc (Main) (hev1 / 0x31766568), yuv420p(tv, bt709, progressive), 8192x4096 [SAR 1:1 DAR 2:1], 845 kb/s, 59.94 fps, 59.94 tbr, 90k tbn (default)
Metadata:
variant_bitrate : 47450846
handler_name : VideoHandler
vendor_id : [0][0][0][0]
major_brand : isom
minor_version : 1
compatible_brands: isomavc1
Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 7 kb/s (default)
Metadata:
variant_bitrate : 47450846
handler_name : SoundHandler
vendor_id : [0][0][0][0]
Info about video with several resolutions:
Duration: 00:02:14.31, start: 0.000000, bitrate: 0 kb/s
Program 0
Metadata:
variant_bitrate : 24271350
Stream #0:0(eng): Video: hevc (Main) (hev1 / 0x31766568), yuv420p(tv, bt709, progressive), 3840x1920 [SAR 1:1 DAR 2:1], 524 kb/s, 59.94 fps, 59.94 tbr, 90k tbn (default)
Metadata:
variant_bitrate : 24271350
handler_name : VideoHandler
vendor_id : [0][0][0][0]
major_brand : isom
minor_version : 1
compatible_brands: isomavc1
Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 7 kb/s (default)
Metadata:
variant_bitrate : 24271350
handler_name : SoundHandler
vendor_id : [0][0][0][0]
Program 1
Metadata:
variant_bitrate : 32479463
Stream #0:2(eng): Video: hevc (Main) (hev1 / 0x31766568), yuv420p(tv, bt709, progressive), 5400x2700 [SAR 1:1 DAR 2:1], 705 kb/s, 59.94 fps, 59.94 tbr, 90k tbn (default)
Metadata:
variant_bitrate : 32479463
handler_name : VideoHandler
vendor_id : [0][0][0][0]
major_brand : isom
minor_version : 1
compatible_brands: isomavc1
Stream #0:3(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 7 kb/s (default)
Metadata:
variant_bitrate : 32479463
handler_name : SoundHandler
vendor_id : [0][0][0][0]
Program 2
Metadata:
variant_bitrate : 42713012
Stream #0:4(eng): Video: hevc (Main) (hev1 / 0x31766568), yuv420p(tv, bt709, progressive), 6912x3456 [SAR 1:1 DAR 2:1], 855 kb/s, 59.94 fps, 59.94 tbr, 90k tbn (default)
Metadata:
variant_bitrate : 42713012
handler_name : VideoHandler
vendor_id : [0][0][0][0]
major_brand : isom
minor_version : 1
compatible_brands: isomavc1
Stream #0:5(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 7 kb/s (default)
Metadata:
variant_bitrate : 42713012
handler_name : SoundHandler
vendor_id : [0][0][0][0]
Program 3
Metadata:
variant_bitrate : 47450846
Stream #0:6(eng): Video: hevc (Main) (hev1 / 0x31766568), yuv420p(tv, bt709, progressive), 8192x4096 [SAR 1:1 DAR 2:1], 845 kb/s, 59.94 fps, 59.94 tbr, 90k tbn (default)
Metadata:
variant_bitrate : 47450846
handler_name : VideoHandler
vendor_id : [0][0][0][0]
major_brand : isom
minor_version : 1
compatible_brands: isomavc1
Stream #0:7(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 7 kb/s (default)
Metadata:
variant_bitrate : 47450846
handler_name : SoundHandler
vendor_id : [0][0][0][0]
Media information
No response
Logcat output
The issue with this is that the information supplied from the device is telling Exoplayer that 8k is unsupported, hence it not being played. We have previously set it to force playback of a single resolution, which is why the single stream worked. Not quite sure how to resolve at this point.
The issue with this is that the information supplied from the device is telling Exoplayer that 8k is unsupported, hence it not being played. We have previously set it to force playback of a single resolution, which is why the single stream worked. Not quite sure how to resolve at this point.
For HLS, is it also possible to ignore the 8K unsupported status and force play? If so, it might be wise to add a parameter to indicate that 8K is unsupported should be ignored?
@Chris-RH , Or, if you receive a list of variants from exoplayer and some of them are marked unsupported, return the full list with just the unsupported flag. So we can decide what to do with them.
@Chris-RH , Could you add the ability to get a full list of tracks with the unsupported flag? As far as I can see, Exoplayer allows you to get such a list, and as far as I understand, you're simply filtering it.
We're looking at this
@Chris-RH , do you have any news about this?
No news on this one yet. If we ignore the 'supported' flag then we will get a lot of bugs reported that videos do not playback as expected. So that is not really an option. I guess we could add a flag to get a list of all variants back and mark as supported/unsupported, but what use is that really? You won't be able to have the track as part of the adaptive track set such that it will play. I guess it could be forced to be played as a single variant...but that is quite edge case, and you are just going to get users complain that their selected variant is not playing.
What is your use case here @Anton111111 ?
@Ste-RH , We play videos from our server, which are 100% playable in the app. We tested them as single tracks. However, when using HLS, our users currently can't watch videos in the maximum 8K quality. We need to force the 8k video to play as an adaptive track.
Are your users always using the same device hardware?
Are your users always using the same device hardware?
Yes our app works on Meta Quest 2/3 and Pico4/Pico4U
The problem here is that it is all a bit black box. From our understanding, ExoPlayer asks the device (at driver level) if the codec can support the requested resolution/framerate/bitrate combination. Best case, there is a bug in ExoPlayer...but I suspect it is actually the device layer itself that is saying the variants are not supported. So at AVPro Video level, our hands are completely tied - by default. We do have code in the plugin to build up a limited adaptive group of variants. We will look to add a flag that overrides all of this and adds all variants to the adaptive group. This may allow playback of the 8k video variant on some, possibly all of your devices...but we cannot be held accountable and will not be able to fix any negative fallout that comes about from the use of this override flag. I will report back if/when we get this implemented.
@Ste-RH , Thank you. I understand perfectly well that in this case, we bear full responsibility for any track that may not play.