Create multiple video montages

   1163   3   1
User Avatar
Member
385 posts
Joined: July 2018
Offline
I have 80 variations of my geo. each one 48 frames of animation

i want to make a montage for every 4 variations and end up with 20 videos, instead of one huge video with all 80 variations animating. how can i partition my data so that i get that result?

The screenshot i have attached is what i don't want, which is all my variations animating in one montage sheet.

Attachments:
Capture.JPG (44.5 KB)

User Avatar
Member
385 posts
Joined: July 2018
Offline
The solution i found if anyone is interested, was to use python processor node to rename my frames so that each frame sequence comes after the other and THEN use ffmpeg to generate a final video.
User Avatar
Member
3 posts
Joined: Aug. 2019
Offline
Hi, care to share how you renamed your frames, or even show some code from your python processor? I'd like to do the same thing and could use some pointers. This would really be great!

Edit: Nevermind. Figured it out by myself. But many thanks for the hint!
Edited by bhfx - July 7, 2021 03:59:23
User Avatar
Member
385 posts
Joined: July 2018
Offline
this was the code i used inside the python processor

import os
import pdg
import re

for upstream_item in upstream_items:
new_item = item_holder.addWorkItem(parent=upstream_item)
#print(new_item.expectedInputResultData)

#get filepath
filepath = new_item.expectedInputResultData

#print(filepath)

#get filename
filename = filepath.rsplit('/',1)

if(filename.find('-')!=-1):
#get sequence number
pattern = "\-(.*?)\."
num = re.search(pattern, filename).group(1)
#get frame number
split_name = filename.split("-") #we split the filename on the dash
frame = split_name

#calculate new frame number for merged sequences
nframe = str(int(frame)+(int(num)*48)) # 48 is the total number of frames for each sequence

nfilepath = filepath.rsplit('/',1) + '/' + nframe + ".png"

os.rename(filepath,nfilepath)


and here are some screenshots of my setup. sorry its not a file but it will take a while to make a demo scene

Attachments:
1.JPG (32.6 KB)
2.JPG (20.2 KB)

  • Quick Links