How to render a mp4 animation from jsx script?
I have some complex automation in Photoshop based on a jsx script that calls some actions to create both a static image and an animation automatically.
The logic and sequence in the script is working perfectly fine and the only thing that I still need to figure out in my script is how I can have the jsx script to execute the same export as I would get by clicking on File > Export > Render Video
I want my script to set all the options and perform the export automatically without user interaction.
Here is a snippet of the code just to show where I would place the render if I can discover how to do it.
var minhapasta = File($.fileName).parent.fsName;
var basenome = prompt("Escreva a base do nome de arquivos para usar! (evite acentos e caracteres especiais", "my_test_files");
var doc = app.activeDocument;
var jpgOptions = new JPEGSaveOptions();
jpgOptions.quality = 12;
jpgOptions.embedColorProfile = true;
jpgOptions.formatOptions = FormatOptions.PROGRESSIVE;
if(jpgOptions.formatOptions == FormatOptions.PROGRESSIVE){
jpgOptions.scans = 5};
jpgOptions.matte = MatteType.NONE;
doAction("pedaco1","Marcus Tavares - auto");
//first save as static image (working fine)
doc.saveAs (new File(decodeURI(minhapasta) +'/' + basenome + '01' + '.jpg'), jpgOptions, true);
//then just after saving a copy as static image, I should have the block that renders the animation that is already created by the action and name it using this: decodeURI(minhapasta) +'/' + basenome + '01' + '.mp4'
Could you please help with this? I searched everywhere and could not find a reference so I could base in it.
Thanks!
