Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
2

Create custom resolution sequences from a spreadsheet using Automation blocks

Community Beginner ,
Feb 17, 2025 Feb 17, 2025

Hi!
I would need to create many custom sequences for a project, they all have a custom resolution (all at 25fps), examples:
336x672

1024X512

1080x1920

2048x512

3120x1248

1872x936
And many more...

I was wondering if there was a way of creating all these sequences with the help of Automation Blocks, retrieving the height and width needed from a spreadsheet would be ideal.
As doing more than 30 of these sequences manually would take a long time.
Hope there's a solution, many thanks!

TOPICS
Formats , SDK
864
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Feb 17, 2025 Feb 17, 2025

You can create a custom Automation Blocks script which creates a new sequence using the

New Sequence from Preset  block. Just use multiple copies of the block to create several seqences.


If you want to read the sequence names and sequence preset files from a spreadsheet, combine it with a

For Each Row/Column of Spreadsheet block as follows:

 

Screenshot 2025-02-17 at 13.28.52.pngexpand image

The code assumes that

- the first column contains the names of the new sequence (optionally with a bin like "bin\subbin\sequence")
- the second column cont

...
Translate
Community Beginner ,
Feb 17, 2025 Feb 17, 2025

Hi, thanks for your reply. I currently need it for Premier Pro 2024 only.
I've been trying to find a way on how to implement it, but struggling a bit to find the right Scipt to add using Automation Blocks.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 17, 2025 Feb 17, 2025

I takes me about 15 seconds to make a custom sequence, in 10 min I could have made more than your 30. It would take longer than that to make a spreadsheet and write a script.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Feb 17, 2025 Feb 17, 2025

Hi, yes that is true. But I often have this types of project, so in the long run automating it would save time, it's not this one project, and the resolutions are always different.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Feb 17, 2025 Feb 17, 2025

Also I need to rename the sequences based on the resolutions, here mystakes can occur too, when doing it for 30 or 40 times

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 17, 2025 Feb 17, 2025

You can create a custom Automation Blocks script which creates a new sequence using the

New Sequence from Preset  block. Just use multiple copies of the block to create several seqences.


If you want to read the sequence names and sequence preset files from a spreadsheet, combine it with a

For Each Row/Column of Spreadsheet block as follows:

 

Screenshot 2025-02-17 at 13.28.52.pngexpand image

The code assumes that

- the first column contains the names of the new sequence (optionally with a bin like "bin\subbin\sequence")
- the second column contains the file path of a sqpreset file (sequence preset) see how to create such sequence preset files.

 

(block code is attached)

 

 

Mathias Möhl - Developer of tools like BeatEdit and Automation Blocks for Premiere Pro and After Effects
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Feb 17, 2025 Feb 17, 2025

Hi Mathias, thanks a lot for your solution!
If I undestood it correctly I would still need to have a sqpreset file already made before running the script, correct?
Because the issue I'm having is that for every project the resolution needed is so different, that I would need an infinite amount of formats in order to create all possible combinations.
I've thought about creating it with the preset file option but I don't know what resolution I will need to create per project, therefore a more dynamic approach would be needed, is there any solution inside Automation blocks? Or for this case some JXS is needed? I have attach an example of the spreadsheet with some resolutions.
many thanks again!



Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 17, 2025 Feb 17, 2025

As far as I know, new sequences are always created based on a preset and their widht and height cannot be changed later using scripting. Therefore, I don't see a way of creating sequences automatically without creating preset files for them in advance.

BUT
sqpreset files are normal xml files (i.e. text files) so you can create them with Automation Blocks.
This script writes for each row of the spreadsheet a file "temp.sqpreset" on your desktop and then uses this sqpreset file to create a sequence of the respective size.
I didn't test this code but I think it should work:

Screenshot 2025-02-17 at 15.07.13.pngexpand image

Mathias Möhl - Developer of tools like BeatEdit and Automation Blocks for Premiere Pro and After Effects
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Feb 18, 2025 Feb 18, 2025

Awesome, haven't thought about it, that's the solution I was looking for!
I've tested the code, and I'm having one problem. I've tried various testing but still haven't found a solution.
The problem seems to be that the XML doesn't get written inside the sqpreset before it creates a new sequence.
I've placed an alert just before the "new sequence from preset file", I then opened the sqpreset with a text editor and found it empty.
So of course the code stops when it tries to create the sequence, however when I reopen the sqpresent with the text editor after the code was stopped the XML was written correctly, at least the first line from the spreadsheet.
What could be the cause of it? I've thought it might be because it needs to exit the loop but wouldn't make much sense.
Thanks a lot for your help!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 18, 2025 Feb 18, 2025

Hi Emanuelle,

oh, yes, this is a very good observation! Automation Blocks has some performance optimizations, which result in files being usually saved only at the very end and not after each write operation (that saves a lot of time if you write a lot of content to a file step by step). Here is a version which uses an Execute Code block with the code

$._extAutomationBlocks.all.fileCollection.cleanup()

which forces Automoation Blocks to save all open files at that point.

Screenshot 2025-02-18 at 13.21.07.pngexpand image

Mathias Möhl - Developer of tools like BeatEdit and Automation Blocks for Premiere Pro and After Effects
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 18, 2025 Feb 18, 2025

I also added a description of this workaround with the execute file block now here to the documentation:
https://docs.mamoworld.com/automation-blocks/block-reference/filesText/#forcing-file-writes-to-disk

 

Mathias Möhl - Developer of tools like BeatEdit and Automation Blocks for Premiere Pro and After Effects
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Feb 18, 2025 Feb 18, 2025

Great, now it's working! (almost)
I realize that the code was running too fast and wasn't creating the sequences fast enough, so it was rewriting some resolutions already created.
I've added a like of code to pause the loop to 2 seconds which should be enough 🙂
I've also attached it.
Thanks again!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 18, 2025 Feb 18, 2025
LATEST

Thanks for sharing!

I looked at your code and it looks like your delay code works, but it can actually be simplified.

I recommend to replace the full delay code by simply

$.sleep(2000)

to wait 2000 milliseconds.

Mathias Möhl - Developer of tools like BeatEdit and Automation Blocks for Premiere Pro and After Effects
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines