Created
April 23, 2024 13:43
-
-
Save lukas-hetzenecker/e2b098ea392b6e281e82acdcc324c814 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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