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

Add detection of 10bit video decoding #828

Open pilzinho opened 3 years ago

pilzinho commented 3 years ago

We also created a forum post for our issue that wasn't replied to: Forum Post We are currently testing 10bit support with the Ultra Edition on Windows10 x64 and are able to play 10bit NotchLC and h265 (with installed extension) using Media Foundation and 10bit h264 and h265 using DirectShow and LAV filters. We have 'use10BitTextures' and 'useCustomMovParser' enabled as well as 10bit swap chain in the Unity project settings. The format of the created texture is always RGBA8 UNORM. So I would think that the 10bit videos are still decoded to 8bit internally. How do I verify that the video is decoded to a 10bit texture? Which format should the texture have? Are you able to decode to 10bit textures in Unity? If so, would it be possible to provide us with a test video of yours that works for you? Tested on a MacBook Pro with dedicated AMD graphics and a Workstation with Quadro M6000, Unity 2020.2.5f1 and AVPro Ultra 2.1.1

AndrewRH commented 3 years ago

Yes the textures are created externally, but in Unity we just label all the textures as being 8-bit as it doesn't make any difference to Unity. Internally we create 10-bit textures when the option is selected, and that texture is given to Unity for display.

We've actually seen the best results when using the WinRT API. I'm not sure why there is a difference though.

We have a few test videos....I will have a look for a suitable one.

Does that answer your question?

pilzinho commented 3 years ago

Hi, thanks for the reply! Ok, I see. That basically answers my question. But is there any way to still get the information via the API if the video is decoded with 10bit color? I can imagine that there can still be cases where a 10bit video cannot be decoded correctly and is decoded to 8bit? Or can you rule that out 100%? This is very crucial information for our customers to guarantee a 10bit pipeline. Because detecting the 10bit/8bit decoding visually is not really feasible. WinRT is for UWP Apps only, right?

AndrewRH commented 3 years ago

WinRT is for Desktop and UWP apps - you can run the WinRT API in the Unity editor or make standalone desktop builds with it.

Currently there is no method to return whether the video is decoded as 10-bit or 8-bit. We can look into how easily we can add this.

I will change this to a feature request to help improve this detection.

We may have new 10-bit support coming to macOS soon too - it's being worked on.

Thanks,

pilzinho commented 3 years ago

Ok, thank you! Knowing that a video is really decoded to 10bit is definitely something we would need for our 10bit workflow/pipeline.

radekgrz commented 2 years ago

@AndrewRH I have run into the same issue, where I am trying to verify that the videos are decoded into 10-bit textures. You mention above that you have a 'few test video'. Where can I find them? Also, could you elaborate on what texture format are you actually using internally to represent 10-bit textures?