def make_scene_list(metadata, fout='scenes.txt'):
    """ Create a scene list from metadata """
    # assume keys are same in all the metadata
    keys = sorted(metadata[0].keys())
    with open(fout, 'w') as f:
        f.write(','.join(keys) + '\n')
        for md in metadata:
            items = [str(md[k]) for k in keys]
            f.write(','.join(items) + '\n')
    return fout