RenderHeads / UnityPlugin-AVProVideo

AVPro Video is a multi-platform Unity plugin for advanced video playback
https://www.renderheads.com/products/avpro-video/
233 stars 28 forks source link

Android- hls video playing but there's only black screen and dash files are not playing/loading at all. #1971

Closed MJcheonma closed 1 week ago

MJcheonma commented 3 weeks ago

So I am experiencing two issues currently when i use android mediaplayer as the video api,

  1. When I play a hls file, only a black screen is visible i.e., my video is playing as I can hear the audio and interestingly, this is only happening in older devices. In newer devices, videos are playing perfectly fine and are visible.
  2. My dash file is not playing. It is giving an error "[AVProVideo] Error: Loading failed. File not found, codec not supported, video resolution too high or insufficient system resources."

Note:- The url is working when i play it in browser or using exoplayer video api but using it gives another issue that is the mediaplayer is not loading no matter what file format i use (dash/hls) in older devices or devices with mediatek processor i assume as It is working completely fine in samsung devices which has snapdragon processors. This is what i assume thats why i shifted from exoplayer to android media player.

My Setup

My Project Settings

To Reproduce

  1. You may try using this url in the demo scene "https://viewcon360.s3.eu-north-1.amazonaws.com/TestVideo200MB.mpd" with the settings above.

Logs I am attaching two logcat files for android mediaplayer, one is from the older device and the other one is from the newer device and one logcat file for exoplayer.

android media player mlogcat_dev build_older device.txt android media player mlogcat_dev build_newer device.txt exoplayer_release build_older device.txt

AVpro mediaplayer settings Screenshot 2024-08-17 030140

I am sending the project file url as well to the email address.

Chris-RH commented 3 weeks ago

Dash format is only supported in Exoplayer

  1. What devices have you tested? Which work and which don't work?
  2. What is the URL for your HLS stream?
  3. Which resolution/codecs/FPS/bitrate are your streams using?
  4. Can you reproduce this in a new project running only the AVPro Vide mediaplayer demo scene and your streams please and then please can you provide full, unfiltered logcat from the moment you app opens until after you have started playing the stream.
MJcheonma commented 3 weeks ago

Dash format is only supported in Exoplayer

  1. What devices have you tested? Which work and which don't work?
  2. What is the URL for your HLS stream?
  3. Which resolution/codecs/FPS/bitrate are your streams using?
  4. Can you reproduce this in a new project running only the AVPro Vide mediaplayer demo scene and your streams please and then please can you provide full, unfiltered logcat from the moment you app opens until after you have started playing the stream.

Thanks for replying! Alright then I want to set aside the exoplayer for now and check the issue with the android media player. I'll be generating a new issue for the exoplayer i think.

  1. I have tested on multiple android devices which are android 13. In newer devices the hls videos are working, in older devices hls videos are playing as I can hear the audio but it's a black screen. My current testing models are Samsung s20fe 5g and Samsung M32 prime.

  2. https://viewcon360.s3.eu-north-1.amazonaws.com/output/Startraum.m3u8 - hls video link

  3. hls video info

5.demoscene android mediaplayer mlogcat_older device.txt demoscene android mediaplayer mlogcat_newer device.txt

Screenshots of the older device and newer device. Samsung s20 fe Samsung M32 prime

Chris-RH commented 3 weeks ago

The Samsung Galaxy M32 has a Mediatek MT6769V/CU Helio G80 chipset, which has a maximum display resolution of 2520x1080. Your HLS only has a single stream of 4320x2160. Encode your HLS so that it has streams of lower resolutions so that they fit within the phone's capability.

Chris-RH commented 2 weeks ago

Have you had any luck with that?

MJcheonma commented 2 weeks ago

Yes that resolved my issue. I had totally ignored that part of adaptive streaming. Thanks!!