TOPs: batch convert image-sequences to movies

   3087   5   1
User Avatar
Member
192 posts
Joined: April 2015
Offline
Hi,

Recently found a flipbook generator PDG Asset.
I however still like to make the flipbooks from the viewport since I get less predictable results from the OpenGL ROP in that HDA.

(I name each flipbook-render differently, and sometimes use png or jpg as the file extension.)

I still would like to batch convert the images-sequences into movies, however.
Is it possible to load multiple image-sequence into TOPs, and make a movie for each?

Thanks in advance.
Edited by OdFotan - July 23, 2021 13:37:54
User Avatar
Staff
586 posts
Joined: May 2014
Offline
You can use a File Pattern or File Range node to create work items from the files on disk, and follow that with an FFmpeg Encode Video to make a movie from the file sequence. If there are multiple sequences of files you'll need some way to differentiate between them in TOPs using attributes. For example, if the sequences are in separate directories you could use a Partition by Attribute after the File Pattern, using the `directory` attribute. That will create a separate partition sequence, which can then be wired directly into the FFMPEG node. Alternatively, if all of the sequences are in the same directory, you could try using an Attribute from String node to extract a unique component from the file path to an attribute, and Partition by Attribute using that instead.

I think it should be possible for us to extend the File Pattern on our end to make it easier to support that work flow, and do some of that work for you. I've logged an RFE for that.
User Avatar
Member
192 posts
Joined: April 2015
Offline
Allright, great idea for that RFE.
I am not that versed yet in TOPs but I will look into that latter method with the Attribute from String.
User Avatar
Member
192 posts
Joined: April 2015
Offline
Reading from the docs [www.sidefx.com] that "Braces are not "greedy"… they only match up to the next literal character, even if going further would give a better match. For example, in day.01.csv, with the pattern {name}.csv you might expect {name} to capture day.01, but in fact it will only capture day", I gave up hope on catching the name of the sequence.

Reading this however gave me hope of catching the Frame instead:
"If you have capture braces at the end of the pattern, they match to the end of the source string."

But that doesn't happen. Did I understand it wrong?



For now I will go on and try to learn Regex, I seem to need that too much to afford not know it.

Attachments:
Screenshot 2021-08-21 at 10.07.04.png (108.6 KB)

User Avatar
Member
192 posts
Joined: April 2015
Offline
w000p
Edited by OdFotan - Aug. 21, 2021 11:12:37

Attachments:
Screen Shot 2021-08-21 at 17.11.46.png (97.5 KB)

User Avatar
Member
192 posts
Joined: April 2015
Offline
We are heros. Life is good.

Attachments:
Screenshot 2021-08-22 at 12.22.17.png (74.4 KB)

  • Quick Links