fiblan / webcam-virtual-background

Enjoying web conference with virtual backgrounds on linux
11 stars 2 forks source link

[Suggestion] video as a background #7

Closed ianni67 closed 4 years ago

ianni67 commented 4 years ago

(this is easy!) adding the possibility to use a video file (in "loop") or a video from a second camera as the background. Loop-ing a (background) video can be obtained by adding a simple control when retrieving each frame from the (background) video. Something like:

ret, frame = cap.read() 
    if ret:
        cv2.imshow("Image", frame)
    else:
       print('no video')
       cap.set(cv2.CAP_PROP_POS_FRAMES, 0)
fiblan commented 4 years ago

added looping video feature