RenderHeads / UnityPlugin-AVProLiveCamera

AVPro Live Camera is a Unity plugin for webcams, TV cards and capture cards
https://renderheads.com/products/avpro-live-camera/
11 stars 0 forks source link

RAW_BGRA32 OutputTexture format is not BGRA32 #39

Closed gtk2k closed 2 years ago

gtk2k commented 2 years ago

I am using a Live camera (AVProLiveCamera) component. I unchecked Auto Format in the Inspector and set the specific format to "RAW_BGRA32". However, the format of OutputTexture is R8G8B8A8_UNorm. I want texture format is B8G8R8A8_UNorm.

  1. Why do you want B8G8R8A8? Because the format required by Unity WebRTC is BGRA32.
  2. What are the issues you're seeing?
  3. What type of camera are you using? UVC camera
  4. Which version of AVPro Live Camera are you using? DEMO version.
AndrewRH commented 2 years ago

Hi @gtk2k

You can convert to other texture formats easily in Unity. If you create a RenderTexture in the format that you require then you can call Graphics.Blit(sourceTexture, destTexture); to convert between formats. It's very easy.

We haven't built this functionality into AVPro Live Camera as our plugin's goal is to get video from webcam-type devices into Unity textures as quickly as possible, so we use the texture format that is closest to the webcam device's native format.

I hope that helps.

Thanks,

AndrewRH commented 2 years ago

We will possibly rename the name of the format though so prevent confusion.

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] commented 2 years ago

This issue has been automatically closed because it has not had recent activity. If you wish to continue this issue, then please create a new issue as we do not monitor closed issues.