Skip to content

Instantly share code, notes, and snippets.

@victormurcia
Created October 20, 2022 23:02
Show Gist options
  • Select an option

  • Save victormurcia/aa81deb163031899c44b28d75afb40ec to your computer and use it in GitHub Desktop.

Select an option

Save victormurcia/aa81deb163031899c44b28d75afb40ec to your computer and use it in GitHub Desktop.
math json files to corresponding mp4
def matchJSON2MP4(jsonList, jsonPath, MP4list, MP4Path, whichMP4):
json_strip = [s.replace(directory + jsonPath + '\\', '') for s in jsonList]
json_strip = [s.replace(".json", '') for s in json_strip]
mp4_strip = [s.replace(directory + MP4Path + '\\', '') for s in MP4list]
mp4Name = mp4_strip[whichMP4]
index = json_strip.index(mp4Name)
print(index)
return index
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment