RenderHeads / UnityPlugin-AVProVideo

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

[Android] 4K video is upside down using OES fast path #1935

Closed rrenderr closed 1 week ago

rrenderr commented 3 weeks ago

Some 4k videos are upside down. I investigated a little bit and found next: _videoTrackInfo.Length = 0 and _state.selectedVideoTrack = -1. In this case GetAffineTransform() returns { 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f }. If I change a resolution to another, everything works well. It reproduces only for Android. I logged matrices. For 4K resolution: 1.00000 0.00000 0.00000 0.00000 0.00000 1.00000 0.00000 0.00000 0.00000 0.00000 1.00000 0.00000 0.00000 0.00000 0.00000 1.00000

For other: 1.00000 0.00000 0.00000 0.00000 0.00000 -1.00000 0.00000 1.00000 0.00000 0.00000 1.00000 0.00000 0.00000 0.00000 0.00000 1.00000

Your Setup (please complete the following information):

To Reproduce

  1. Open 4k video - https://deovr.com/ht16vm

Logs FullLog.log

Videos https://deovr.com/ht16vm

Chris-RH commented 2 weeks ago

We don't subscribe to DeoVR, so can't access the files. Can you provide another video in which this occurs please, either here or to unitysupport@renderheads.com

rrenderr commented 2 weeks ago

@Chris-RH I've sent 2 videos via email. Please check it out.

MorrisRH commented 2 weeks ago

Reproduced only when using OES fast path texture mode.

rrenderr commented 2 weeks ago

Can we wait for a fix and when?

MorrisRH commented 2 weeks ago

Unfortunately the video_bugged_4096p.mp4 video exceeds the reported capabilities of the video codec and as a result the media player is flagging the video track as unsupported. This in turn is resulting in the code paths required for correctly handling the produced textures not being executed.

The maximum supported resolution reported by the codec is 7680x4320@60fps (8K). When the video is re-encoded at this resolution it plays back correctly. I was able to push the resolution of your video to 8000x4000@60fps (due to not needing a 16:9 aspect). You could also consider dropping the frame rate to 30fps if you absolutely want to keep the 8192x4096 resolution.

Because we rely on the underlying codec to accurately provide information about what it is capable of decoding we're unable to support resolutions higher than those reported. We're currently investigating how we can better handle this situation however we're unlikely to be able to support it unless the underlying hardware reports that it is capable.

rrenderr commented 2 weeks ago

Intresting. But in this case video plays. Also, this video plays well with AVPro version 2.7.x. I didn't observe upside down issue. We have a look at what we can do with these videos from our side.

rrenderr commented 2 weeks ago

@MorrisRH According to the Meta documentation, our devices should support 8192x4096 60 fps. But issue reprodeces on meta quest 2 and meta quest 3. https://creator.oculus.com/getting-started/media-production-specifications-for-delivery-to-meta-quest-2-headsets/

Anton111111 commented 2 weeks ago

About my closed issue. I've copy my comment here. Why my video works in AVPro v2 in all conditions? And why this video works in AVPro v3 if i disable Low Overhead Mode (GLES) ? I see problem with this video only if i use OES shader and enable Low Overhead Mode (GLES).

Chris-RH commented 1 week ago

AVPro Video version 3.0.7 has been released. Please let us know if it has not fixed your issue.

Anton111111 commented 1 week ago

AVPro Video version 3.0.7 has been released. Please let us know if it has not fixed your issue.

No changes

odh_logs_2024-07-16 14.54.25.527.txt

rrenderr commented 1 week ago

Hi I've deleted the old version and installed a new one from Sctratch, and it seems to work well for me!