You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the issue
I have a simple setup of playing a video on a 3D quad having a RenderTexture on an Unlit Material. Now, I am looking to recreate all the scaling modes of fitting the video inside a RenderTexture as available with Unity's VideoPlayer component. For this, I extract each frame of the video using MediaPlayer.ExtractFrame() and blit it onto a RenderTexture preserving its aspect ratio using a custom shader.
Now, this works fine with both MP4 and MOV videos on Android devices. While on iPhone this works well for MP4 videos but turns the whole screen red as soon as I play an HEVC (.MOV) video which was shot using the same iPhone's camera.
Your Setup (please complete the following information):
Unity version: 2022.3.4f1
AVPro Video version (number and edition (trial/core/ultra/enterprise)): AVPro Core 2.8.4
Operating system version: iOS 16.6
Device model: iPhone 14 Pro Max
Video specs (resolution, frame-rate, codec, file size):
Codec: HEVC (.MOV)
Resolution: 1920 x 1080
FPS: 59.94
To Reproduce
Create a 3D quad with RenderTexture on an Unlit Material.
Create a script to add a media player at runtime with HEVC video in streaming assets and set auto-play and auto-start to true
Start a coroutine to get MediaPlayer.ExtractFrame() and blit it onto the RenderTexture used above
Build and Deploy on iPhone
The whole screen will turn red as soon as the video starts playing
ExtractFrame works perfectly for me here with the video you provided so I suspect there is something awry with your custom code. Both H.264 and HEVC mov files work fine.
A sample project would be very helpful in pinpointing what is going wrong. If you can please send one to unitysupport@renderheads.com
I have submitted a sample Unity and Xcode project in the email with the issue. Kindly help me identify what could be going wrong. It somehow plays both MP4 and MOV videos on Android devices normally, while on iPhone it works for MP4 but not for MOV.
Awesome, I look forward to it. I will test it once and then close this. Thanks.
MorrisRH
changed the title
iPhone screen turns red while playing HEVC (MOV) video when using MediaPlayer.ExtractFrame() for blitting on a RenderTexture
iPhone screen turns red while playing video that requires rotation when using MediaPlayer.ExtractFrame()
Aug 30, 2023
Describe the issue
I have a simple setup of playing a video on a 3D quad having a RenderTexture on an Unlit Material. Now, I am looking to recreate all the scaling modes of fitting the video inside a RenderTexture as available with Unity's VideoPlayer component. For this, I extract each frame of the video using MediaPlayer.ExtractFrame() and blit it onto a RenderTexture preserving its aspect ratio using a custom shader.
Now, this works fine with both MP4 and MOV videos on Android devices. While on iPhone this works well for MP4 videos but turns the whole screen red as soon as I play an HEVC (.MOV) video which was shot using the same iPhone's camera.
Your Setup (please complete the following information):
Codec: HEVC (.MOV)
Resolution: 1920 x 1080
FPS: 59.94
To Reproduce
Logs
No error was thrown in the logs.
Screenshots
Videos
https://drive.google.com/file/d/1tn9Vf5F3w9obYR_mtlo2h5xG7SUejTCz/view?usp=sharing
The text was updated successfully, but these errors were encountered: