Commit f8539531 authored by nextime's avatar nextime

Windows debug

parent 63af5e61
...@@ -96,18 +96,22 @@ class RemoteProcessFLVWriter: ...@@ -96,18 +96,22 @@ class RemoteProcessFLVWriter:
with pyvirtualcam.Camera(1920, 1080, 30, fmt=PixelFormat.BGR, device=args.device, print_fps=30) as cam: with pyvirtualcam.Camera(1920, 1080, 30, fmt=PixelFormat.BGR, device=args.device, print_fps=30) as cam:
frame="" frame=""
donedone=False frames=0
last=time.time()
while not stream.at_eof(): while not stream.at_eof():
frame = await stream.readexactly(1920*1080*3) frame = await stream.readexactly(1920*1080*3)
if len(frame) >= 1920*1080*3: if len(frame) >= 1920*1080*3:
if not donedone: if time.time()-last >= 1:
print("STARTING") last=time.time()
donedone=True print(frames, 'fps')
rframe=np.fromstring(frame, dtype='uint8').reshape((1080,1920,3,)) frames=0
#cam.send(np.fromstring(frame[:1920*1080*3], dtype='uint8').reshape((1080,1920,3,))) #cam.send(np.fromstring(frame[:1920*1080*3], dtype='uint8').reshape((1080,1920,3,)))
#cam.send(np.frombuffer(frame, dtype='uint8').reshape((1080, 1920, 3,))) #cam.send(np.frombuffer(frame, dtype='uint8').reshape((1080, 1920, 3,)))
cam.send(rframe) #cam.send(rframe)
cam.sleep_until_next_frame() #cam.sleep_until_next_frame()
frames=frames+1
time.sleep(.01)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment