Skip to main content
Participating Frequently
December 24, 2023
Question

automation blocks - export batch stills feature and custom filenaming

  • December 24, 2023
  • 3 replies
  • 2339 views

new to automation blocks for premeiere wanted to ask if someone has some insight on scripting the following 

 

* for exporting batch stills is there a way where I can specify the output name of the file by using the name of the sequence so I dont have to manually type in the output file name 

 

* is there a way to manually stop the script from running as I'm still in testing phase 

 

* is there a batch export stills feat where I could load up a few videos and let it run as well as incorperating the first request using the name of the sequence for output file name . so basically how this would work is load up all the video on the sequence timelines then run this batch feat and the script will output the export still markers to media encoder and use the file name from the sequence . the script would have to create a folder with the name of the sequence and place those specific stills in the perspective folders. 

 

any insight will help  

This topic has been closed for replies.

3 replies

Participant
December 30, 2023

While I can't provide a full script for your requirements, I can offer some guidance and point you in the right direction.

  1. Export Batch Stills with Sequence Name as Output File Name:

    • You can access the sequence name using the app.project.rootItem.name property. Here's an example of how you might use it:

      javascriptCopy code
      var sequenceName = app.project.rootItem.name; var outputPath = "C:\\Path\\To\\Your\\Output\\Folder\\" + sequenceName + "_still";
  2. Manually Stop the Script:

    • During testing, you can use $.sleep(milliseconds) to introduce a delay. This allows you to stop the script manually during the sleep period. For example:

      javascriptCopy code
      $.sleep(30000); // Sleep for 30 seconds
  3. Batch Export Stills to Media Encoder:

    • Adobe Premiere Pro scripting doesn't provide a direct interface for Media Encoder. However, you can export frames and then import them into Media Encoder. Here's a simplified example:

      javascriptCopy code
      var sequence = app.project.activeSequence; var outputPath = "C:\\Path\\To\\Your\\Output\\Folder\\" + sequence.name + "_stills"; for (var i = 0; i < sequence.videoTracks[0].clips.length; i++) { var clip = sequence.videoTracks[0].clips[i]; var framePath = outputPath + "\\frame_" + i + ".png"; clip.exportFramePNG(framePath); // Import the frame into Media Encoder if needed. }
    • This script assumes a single video track. You may need to adapt it based on your specific project structure.

Mathias Moehl
Community Expert
Community Expert
December 25, 2023

I recoreded this tutorial for you, where I answer all the questions:

In the video we modify the "Render Frames at Equal Distances" tool such that

- the name of the sequence is used for the naming of the output files

- instead of the active sequence all sequences selected in the project panel are processed

- extra parameters are added to the UI to specify a start and end timecode for the range that should be processed

 

The xml file of the customized block code is attached. I also added it to the Community Library in the folder "Render Queue"

Mathias Möhl - Developer of tools like BeatEdit and Automation Blocks for Premiere Pro and After Effects
angel_xesAuthor
Participating Frequently
December 29, 2023

began some testing tonight and ran into this after running an export 

 

xxx_0000_vs-dng-00-00-39-40_0
xxx_0000_vs-dng-00-00-39-50_0
xxx_0000_vs-dng-00-00-40-00_0000
xxx_0000_vs-dng-00-00-40-00_0001
xxx_0000_vs-dng-00-00-40-00_0002
xxx_0000_vs-dng-00-00-40-00_0003

 

so by the time it reached sec 40 it stopped doing timecode filename exports and started doing a sequence 4 digit number . any idea whats going on and or how to fix?

Mathias Moehl
Community Expert
Community Expert
December 29, 2023

That's strange. I just checked and for me it works fine also for timecodes above 40 secs. Did you change the block code somehow? I have slashes in the timecode, where you have dashes - did you modify the code for this?

 

Here is a screen recording showing what I would do to further investigate the issue:

https://www.youtube.com/watch?v=wkEUphe2xGw

 

 

 

Mathias Möhl - Developer of tools like BeatEdit and Automation Blocks for Premiere Pro and After Effects
angel_xesAuthor
Participating Frequently
December 24, 2023

* how would you also do a custom export still by setting range using timecode . so lets say i wanted to specify x amount of stills per x amount of frames between the following time codes 00:30:10:05:06 - 00:39:10:05:06