How to upload 'movie file' in batch from 'shot page'

hello.
I would like to inquire about how to batch upload a ‘movie file’ on shotgrid’s ‘shot page’.
Because there are too many shots, clicking on the ‘animation task’ for each shot and then going to the page and uploading the movie files one by one takes too much time and is inefficient.

Is there a way to upload them all at once?
I desperately need your help.:sob:

Don’t know any out-of-the-box solutions, but that’s why there is a scripting api.
If you need help with putting a script together, send me a dm.

1 Like

Thank you for your response.
Can you tell me how to do the scripting you mentioned?

Sure, the outline would be

  • Get all shots - either all shots in the project, or a chosen subset.
  • Get the “animation” tasks from each shot. The tasks are named “animation”. You could instead get them by Animation Step, does not make a big difference.
  • For each task, upload its file. We need a way to map between the file and its corresponding task. Let’s assume each file is named after the task id for now.

We can use batch operations for the first two steps, but the uploads are one by one.

There are some assumptions here, which may not hold, but it’s a good base to start from:

shots = shotgun.find("Shot", [["project", "name_is", "XXX"]])
tasks = shotgun.find("Task", [["entity", "in", shots], ["content", "is", "animation"]])

for task in tasks:
  shotgun.upload(task["type"], task["id"], files_to_upload[task["id"]])

Alternatively, you can bulk upload the media (the video files) and then use the shot importer to add all the shot information and link them together. This may seem like a lot of steps, but it really does not take too long.

You will need to prepare a shot list in a spreadsheet if you do not have one already. In the shot list, create a column titled Version Name and copy in the exact name of the movie files without the extension. So if you have a shot file named shot001.mp4, just copy shot001 and paste it into the Version Name field, make sure there’s a column for the Shot Name, which will become the Link for the shot file.

Example:

Shot Code Version Name Description
Shot01 A001_C037_0921FG_001 Shot01 description
Shot02 A001_C064_09224Y_001 Shot02 description
Shot03 A002_C009_092221_001 Shot03 description
Shot04 A002_C009_092221_001 Shot04 description

Now, bulk import the shot files (movie files):

  • On the FlowPT Media page, click the New Version button to open the Create Versions screen.
  • Then drag and drop all video files (your shots) into the Uploaded Movie section. As it shows in that window, you can also click to Browse for your files too.
  • When you bulk upload files this way, anything you add in any of the fields will be the same for each file uploaded. Meaning, if you enter something for Description it will be the same description for every shot file uploaded. If you leave them empty, you can add the data later.
  • A Link is required, so you cannot leave that blank. My advice is to add something that will be generic or disposable, so I add a Link named “shots” as a Shot entity.
  • This will then open a screen to Create a new shot which will be created for all the media uploaded. Click the Create Shot button at the bottom right.
  • Now click the Create n versions button (n will be the number of files to upload).
  • The media will start uploading.

Note: Movie files and still images will be uploaded and transcoded for web friendly playback.

Now you can bulk import your shot list information and connect that to your shot files.

  • Copy the information from your shot list, including the headers (column headings). No need to import the file, just copy the cells.
  • Open your FlowPT Shots page.
  • Click the arrow to the left of the Add Shot button and choose Import Shots which will open the bulk upload screen.
    Screenshot 2024-08-15 at 10.47.06
  • Paste in your copied information from the shot list.
  • Assign the Column headers to the Target Columns make sure assign the Version Name with Version ↔ Link, this is what links the uploaded media file to the shot in the list.
  • Click the Continue button at the bottom right.
  • You do not need to make any changes on the Specify ID page, so click the Continue button at the bottom right again.
  • The page will update and show you if the import would be successful (see the link below to resolve any issues).
  • Once all is resolved, click the Finish and Import button at the bottom right
  • If successful, you will see a Success screen with 2 options, while you can create a new page with the imported data, I would think you would rather just see the normal shots page. So I click, Go back to the page where you started
  • You should now see all the new imported shots list which is connected to the shot files (media) uploaded.

Check out the FlowPT Help for the Importer for more information.

I hope this helps.