Can be tested using existing json files eg:
import random
for source in json_in["sources"]:
time = round(random.uniform(30, 600), 2)
print("Finding nearest keyframe to {} in {}".format(
time, source["filepath"]))
print("Nearest keyframe: {}-{}".format(
time, nearest_keyframe(source["filepath"], time)))
import sys
sys.exit(0)