optimize checking dups in save video