RenderHeads / UnityPlugin-AVProVideo

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

Hap / Hap Alpha not loading #1241

Closed paulorenanmelo closed 2 years ago

paulorenanmelo commented 2 years ago

Describe the issue Hap videos are not loading. Using the provided Demo_MediaPlayer scene and assigning the hap video file, it logs an error, and the player remains black/blank.

Your Setup (please complete the following information):

To Reproduce

  1. Open a unity project, import avpro ultra edition
  2. Download videos (links below)
  3. Place the video in StreamingAssets
  4. Open Demo_MediaPlayer scene and assign the test video to the MediaReference linked in the MediaPlayer component in the scene
  5. Play in the editor - and see console for error

Error Log

[AVProVideo] Error: Loading failed. File not found, codec not supported, video resolution too high or insufficient system resources. UnityEngine.Debug:LogError (object) RenderHeads.Media.AVProVideo.MediaPlayer:UpdateErrors () (at Assets/AVProVideo/Runtime/Scripts/Components/MediaPlayer.cs:1277) RenderHeads.Media.AVProVideo.MediaPlayer:Update () (at Assets/AVProVideo/Runtime/Scripts/Components/MediaPlayer.cs:705)

Screenshots It works on media player classic, as per screenshot avpro not playing hap videos

Videos https://s3.amazonaws.com/vidvox/hap/Hap_Test_Odd_Dimensions.zip

Alternatively, if link above doesn't work, check their github and download "Odd Dimensions" https://github.com/Vidvox/hap

Even normal resolution videos without alpha are not loading either. Please download all samples from their github page https://s3.amazonaws.com/vidvox/hap/Hap_Test_FFmpeg.zip

Chris-RH commented 2 years ago

Hi @paulorenanmelo

In the Media Player component Visual -> Platform Specific -> Windows Make sure the Video API is set to Media Foundation and that you have ticked the "Use Hap/NotchLC" box

hap

paulorenanmelo commented 2 years ago

Thanks Chris! That works like a charm. My bad. So much to do I didn't look for the existence of such toggle.

I can confirm both hap alpha and hap Q alpha working.

Chris-RH commented 2 years ago

Ah, its easy to overlook a small checkbox.
Awesome, I'm glad that its got sorted so quickly :)