ATEM ISO xml to multi-cam

Ask software engineering and SDK questions for developers working on Mac OS X, Windows or Linux.
  • Author
  • Message
Offline

automaton

  • Posts: 2
  • Joined: Thu Feb 22, 2024 11:51 pm
  • Location: Seattle USA
  • Real Name: Chris Hansen

ATEM ISO xml to multi-cam

PostThu Feb 22, 2024 11:56 pm

I want to automate clicking some buttons, but the python automation seems VERY limited. I'm trying to understand if I'm missing a usage pattern or if it really can't do what I want. I just picked up automating in Resolve a few days ago, but I'm a professional software engineer (primarily in C#).

For example, I want to select multiple clips and create a multi-cam clip. I don't see anything in the API for creating a multi-cam clip. But I also don't see anything that says things like right-click and enumerate the context menu items.

Technically I want to automate everything in this youtube video (PhotoJoseph - the MOST IMPORTANT ATEM VIDEO you'll watch… how to use ANY camera original in ATEM ISO re-edits!)

Here's the steps that need to be done based on the video and I have bolded the parts that I've already automated.

*color the clips
make a multi-cam clip
*make the multi-cam bin
*move new multi-cam clip to multi-cam bin
timeline menu - select clips with color (orange)
right click on clip in timeline -> disable conform-lock enabled
multi-cam clip Switch multicam Audio Video (Camera 1)
multi-cam clip Switch multicam Audio Angle (Camera 1)
select timeline -> timeline -> reconform from bins
attempt to re-conform -> selected clips
set clips to conform lock enabled after conform
Choose conform bins (disable everything except for multi-cam bin)
Conform options (timecode-source timecode) everything else unchecked
this will swap out the timeline clips (cam 1) to multi cam clip with angle to cam 1

repeat for each camera x:
select clips by color (cam color x)
right click on clip in timeline -> disable conform-lock enabled
multi-cam clip Switch multicam Audio Video (Camera x)
select timeline -> timeline -> reconform from bins

the rest of the video is about adding the 4k footage and replacing the 1080 clips with them and I don't currently care about that




Here is what I have so far:
Code: Select all
# color each of the clips
projectManager = resolve.GetProjectManager()
project = projectManager.GetCurrentProject()

# Find the media pool
mediaPool = project.GetMediaPool()

# Define the parent folder path
parent_folder_path = ["ISO"]

# Define the color mappings
color_mapping = {
"Camera 1": "orange",
"Camera 2": "apricot",
"Camera 3": "yellow",
"Camera 4": "lime",
"Camera 5": "olive",
"Camera 6": "green",
"Camera 7": "teal",
"Camera 8": "navy"
}


# Function to recursively collect all clips from folders
def collect_clips_from_folders(folder):
clips = []
items = folder.GetClipList()
for item in items:
clips.append(item)
subfolders = folder.GetSubFolders()
for subfolder in subfolders:
clips.extend(collect_clips_from_folders(subfolders[subfolder]))
return clips

# Iterate through each camera folder
for camera_folder, color in color_mapping.items():
# Define the full folder path
folder_path = parent_folder_path + [camera_folder]

# Get the folder object
current_folder = mediaPool.GetRootFolder()
for folder_name in folder_path:
subfolders = current_folder.GetSubFolders()
found = False
for subfolder in subfolders:
if subfolders[subfolder].GetName() == folder_name:
current_folder = subfolders[subfolder]
found = True
break
if not found:
print(f"Folder '{folder_name}' not found.")
break

# If the folder is found, get the video clip(s) inside it and set the color
if found:
video_clips = collect_clips_from_folders(current_folder)
if video_clips:
for video_clip in video_clips:
video_clip.SetClipColor(color)
print(f"Set color of video clip '{video_clip.GetName()}' to {color}.")
else:
print(f"No video clips found in the folder '{current_folder.GetName()}'.")

# add a new folder called Multicam
mediaPool.AddSubFolder(mediaPool.GetRootFolder(), "Multicam")
Offline

automaton

  • Posts: 2
  • Joined: Thu Feb 22, 2024 11:51 pm
  • Location: Seattle USA
  • Real Name: Chris Hansen

Re: ATEM ISO xml to multi-cam

PostSun Mar 03, 2024 4:33 am

Is my approach wrong? Do I need to look into writing a C++ plugin?

Return to Software Developers

Who is online

Users browsing this forum: No registered users and 19 guests