ORB-HD / deface

Video anonymization by face detection
MIT License
680 stars 94 forks source link

fps inconsistent when defacing live video (webcam) #25

Open Karl48071 opened 2 years ago

Karl48071 commented 2 years ago

When using deface cam or deface '' the frames per second are inconsistent. On slower hardware, it might only blur faces at say 11 frames per second, but it will still include meta data saying its 30 fps. Therefore, when played back, it plays too fast. Or with faster hardware (like with a GPU), deface will blur faces at more than 30 fps and yet still include meta data saying its at 30 fps which results in video that looks like its in slow motion.

mdraw commented 2 years ago

Thanks for the report! I've never tried used the live cam blurring with a video file output because I had regarded the live cam feature more as a demo. I can confirm that the video is saved with an incorrect frame rate in this case. I don't have a quick fix for this bug, so any suggestions / pull requests are welcome. In the meantime I would suggest the following workaround: First record the video with some external recording tool and then process the recorded video with deface. This way the FPS should be correct.