Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lukas-hetzenecker/e2b098ea392b6e281e82acdcc324c814 to your computer and use it in GitHub Desktop.
Save lukas-hetzenecker/e2b098ea392b6e281e82acdcc324c814 to your computer and use it in GitHub Desktop.
subprocess = importlib.import_module("subprocess")
clips = resolve.GetProjectManager().GetCurrentProject().GetMediaPool().GetCurrentFolder().GetClips()
for clip in clips.values():
path = clip.GetClipProperty()['File Path']
print(path)
d = subprocess.check_output(f"/opt/homebrew/bin/mediainfo --Inform='General;%Encoded_Date%' '{path}'", shell=True).strip()
print(d)
name = str(d, encoding='ascii') + ' ' + path.split('/')[-1]
clip.SetClipProperty('Clip Name', name)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment