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

Getting the to be rendered filename extension with Extendscript

Community Beginner ,
Dec 04, 2023 Dec 04, 2023

Is there a way to get the file extension in extend script that the outputModule will render a composition as?

I found the line below in the docs, but the format isn't exactly what I need and I haven't been able to find much more by using the docs.  It doens't have to be from the outputModule, but that's the closest I've come to finding something.

 

var current_format = app.project.renderQueue.item(1).outputModule(1).getSettings(GetSettingsFormat.STRING).Format;

 

For a use case example, a user can use my extension to render a composition that is then uploaded to storage. I can build the path up until the file name extension (.mp4, .avi, etc.), but I haven't figured out a way to build the final part of the path like I can in Premiere. 

var current_format = app.project.renderQueue.item(1).outputModule(1).getSettings(GetSettingsFormat.STRING).Format;

And in case I didn't explain that well, here's what I'm hoping to do:

 

var rqItem = app.project.renderQueue.items.add(comp);
var fileExtension = rqItem.outputModule(1).getFileExtension() (ex. returns ".mp4")
var outputPath = "/path/to/file/" + rqItem.name + fileExtension
rqItem.outputModule(1).file = new File(outputPath)

 

 

The ES docs that I referenced before: https://ae-scripting.docsforadobe.dev/renderqueue/outputmodule.html#outputmodule-getsettings

TOPICS
How to , Import and export , Scripting
368
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 ,
Dec 04, 2023 Dec 04, 2023
LATEST

I just found the answer to my own question, but can't seem to delete this post. For anyone else looking, there's an "Output File Info" object in settings that has that info. 

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