def serialize_data()

in scripts/generate_video_filmstrip_standalone.py [0:0]


def serialize_data(ivideo, filmstrip_res, tdict, ofname):
    vdict = {}
    ivideoj = ivideo.replace(".mp4", "-video.json")
    if os.path.exists(ivideoj):
        with open(ivideoj, 'r') as vj:
            vdata_dict = json.load(vj)
            vdict["video"] = vdata_dict
    vdict["filmstrip_interval"] = filmstrip_res
    vdict["filmstrip"] = tdict
    with open(ofname, 'w') as f:
        json.dump(vdict, f, indent=2)