Does OBS support RGBA camera?

99 Views Asked by At

I was playing around with the module "pyvirtualcam". In this demo, I created a virtual cam with RGBA, but the OBS couldn't display it properly. Does anyone know how to use it?

import pyvirtualcam
import cv2
import numpy  
from PIL import Image

im = Image.new("RGBA", (1920,1080), (0,0,0,0))
i = 0
with pyvirtualcam.Camera(width=1920, height=1080, fmt=pyvirtualcam.PixelFormat('ABGR'), fps=30) as cam:
    print(f'Using virtual camera: {cam.device}')
    while True:
        img = cv2.cvtColor(numpy.asarray(im),cv2.COLOR_RGBA2BGRA)
        cam.send(img)
        im.putpixel((i,i),(i,i,i,i))
        i+=1
        if i == 255:
            break
        cam.sleep_until_next_frame()

screencapture

It should be only the white line, but I didn't manage to make it work as expected.

0

There are 0 best solutions below