python 使用 time.sleep() 实现倒计时, webcam中荧幕会当掉,如何解决?

#想要实现出可以同时运行视讯镜头又可以暂停时间的方法,麻烦各位大神帮忙解惑

         if gesture_str == "two":
                     print("0:05")
                     time.sleep(1)
                     print("0:04")
                     time.sleep(1)
                     print("0:03")
                     time.sleep(1)
                     print("0:02")
                     time.sleep(1)
                     print("0:01")
                     time.sleep(1)
                     print("finish")
                     cv2.imwrite("%s/%d.jpg" % ("basepath", index),
                         cv2.resize(frame, (192, 256), interpolation=cv2.INTER_AREA))
                     print("%s: %d 张图片" % ("basepath", index))
                     print("next post and wait for 5 sec")
                     time.sleep(2)
                     index += 1

用多线程,在另一个线程中再使用time.sleep() 倒计时

那就要多线程来实现