webcamoid / akvcam

akvcam, virtual camera for Linux
GNU General Public License v2.0
616 stars 86 forks source link

Creating Virtual Camera #48

Closed csverma610 closed 3 years ago

csverma610 commented 3 years ago

Hello,

I want to reproduce the functionality of FakeWebcam as import numpy as np import cv2 import pyfakewebcam

file = 'obama.mp4'

cap = cv2.VideoCapture(file) width = int(cap.get(cv2.CAP_PROP_FRAME_WIDTH)) height = int(cap.get(cv2.CAP_PROP_FRAME_HEIGHT))

LINE 1

camera = pyfakewebcam.FakeWebcam('/dev/video1', width, height)

while(True): ret, frame = cap.read() frame = cv2.cvtColor(frame, cv2.COLOR_BGR2RGB)

Line 2

**camera.schedule_frame(frame)**

When everything done, release the capture

cap.release() cv2.destroyAllWindows()

As in the Line#1, I wish to create a virtual Camera. Like Line 2, I want to dump some images to the device and I want to see them using Virtual Camera in different window.

Could anyone explain how to di Line#1 and Line webcamoid/webcamoid#243

hipersayanX commented 3 years ago

I imagine you are referring on using akvcam if that the case you can read the wiki and the output example. I you are looking for support in that specific library you must ask for support in their repository, which is unrelated to Webcamoid project.