-1

I have a bunch of .fla CS6 files that I need to export to avi (after setting up the resolution, compression settings etc) manually. I am wondering if this can be achieved via a JSFL script or similar.

Appreciate the help.

1 Answers1

0

Have a look the JSFL Reference: document.exportVideo() is what you're after:

from the docs:

Usage exportVideo( fileURI [, convertInAdobeMediaEncoder] [, [ transparent] [, stopAtFrame] [, stopAtFrameOrTime] )

Parameters

fileURI A string, expressed as a file:/// URI, that specifies the fully qualified path to which the video is saved.

convertInAdobeMediaEncoder A boolen value that specifies whether or not to send the recorded video to Adobe Media Encoder. The default value is true, which sends the video to Adobe Media Encoder. This parameter is optional.

transparent A boolean value that specifies whether or not the background should be included in the video. The default value is false, which includes the movie background in the video. This parameter is optional. stopAtFrame A boolean value that specifies whether the video should be recorded until it reaches a certain frame or a specific time. The default value is true, stop when a certain frame is reached. This parameter is optional.

stopAtFrameOrTime If stopAtFrame is true, this is an int specifying the number of frames to record. If stopAtFrame is false, this is the number of milliseconds to record. The default value is 0 which, if stopAtFrame is true, will record all the frames in the main timeline. This parameter is optional.

Returns Nothing.

Description Method;

exports a video from the document and optionally sends it to Adobe Media Encoder to convert the video

Example

The following example illustrates the use of this method: fl.getDocumentDOM().exportVideo("file:///C|/myProject/myVideo.mov");

I can't remember if that is in AVI format, however you should be able to convert the video. Setting the second parameter (convertInAdobeMediaEncoder) to true should send the video to Media Encoder for conversion, however it will be a lot less straight forward to automate that (very convoluted, but not impossible)

Alternatively I would recommend looking into exporting a PNG sequence that you can then convert to any video format you would like with ffmpeg or similar tools, baring in mind you could trigger the conversion process from JSFL (via FLfile.runCommandLine for example).

In short:

  • use the JSFL reference (e.g. document.exportVideo(), etc.)
  • prototype with a simple through away script and a short timeline
  • test/fix/clean/comment code for the full version of the script after all your questions are answered by prototypes
George Profenza
  • 50,687
  • 19
  • 144
  • 218