I write a script for share video from laptop to laptop though the network. I want to out put my receiving video as the virtual cam. please help me.
import cv2, socket, numpy, pickle
def camera(ip2):
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
ip = ip2
port = 2323 # Server Port Number to identify the process that needs to recieve or send packets
s.bind((ip, port))
while True:
x = s.recvfrom(100000000)
clientip = x[1][0]
data = x[0]
data = pickle.loads(data)
data = cv2.imdecode(data, cv2.IMREAD_COLOR)
cv2.imshow('my pic', data) # Show Video/Stream
if cv2.waitKey(10) == 13:
break
cv2.destroyAllWindows()
def main():
a = input('Enter IP Address')
camera(a)
main()
I want to output my receiving video as the virtual cam.