|
Command Line Interface |
Top Previous Next |
|
A Command Line Interface (CLI) feature is added to Flash Video Studio 2.0. This is a very usefull feature which allows you to automate the video exporting process through a command line interface. CLI lets you pass a path to a script file (FVS) containing instruction to automatically load a video file and set the video export settings. Upon successfull reading, Flash Video Studio will automatically execute the publish process.
Below is an example how to call Flash Video Studio to execute a script file.
FVStudio c:\script1.fvs
or
FVStudio "c:\Script Folder\example script 1.fvs"
A script (FVS) file is very similar to a project file (IVM) but in a text format, allowing you to easily create it using a simple plain text editor. Everything that you can set within Flash Video Studio grapical user interface can also be set via script file.
The instructions set is pretty straight forward. Below is an example of a simple script file which will load a video from C:\Video\g4tv.wmv and publish the result into C:\video\Movie.swf.
Note You need to use \\ (double slash) or / (backslash) for file path. \ (single slash) in a string will be treated as an escape character.
Example: "C:\\VideoFolder\\Test.mov" is valid "C:/VideoFolder/Test.mov" is valid "C:\VideoFolder\Test.mov" is invalid
Everything else that is not set by the script will use a project default value.
Script1.FVS
<VideoPath>"C:\\video\\g4tv.wmv"</VideoPath> <OutputPath>"C:\\video\\Movie.swf"</OutputPath>
Below is a more complex script which does similar to script1.fvs plus it sets a trimming, adds a watermark and a grayscale effect to the exported video.
Script2.FVS
<OutputFormat>"FLV"</OutputFormat> <VideoPath>"C:\\video\\g4tv.wmv"</VideoPath> <OutputPath>"C:\\video\\Movie.swf"</OutputPath> <HaveImageWatermark>"on"</HaveImageWatermark> <ImageWatermarkPath>"C:\\video\\watermark.jpg"</ImageWatermarkPath> <ImageWatermarkTiming>"Overall"</ImageWatermarkTiming> <ImageWatermarkFadeInOut>"on"</ImageWatermarkFadeInOut> <ImageWatermarkFadeDuration>2.000</ImageWatermarkFadeDuration> <ImageWatermarkPos>"UpperLeft"</ImageWatermarkPos> <NumVideoEffects>1</NumVideoEffects> <BeginEffect> <EffectName>"Grayscale"</EffectName> <EffectParam1>100</EffectParam1> </BeginEffect> <RemoveRedundantFrames>"off"</RemoveRedundantFrames> <TrimVideo>"on"</TrimVideo> <TrimStart>0.000</TrimStart> <TrimStop>10.000</TrimStop> <ImportAudio>"on"</ImportAudio> <VideoFormat>"flash8"</VideoFormat>
Working with CLI The best way to work with an FVS script is to use the graphical user interface to set up the project the way you want it, then export the project as a script file via File => Export as a script file. You can then simply modify the script file according to your need. Flash Video Studio also allows you to import the script file via File => Import a Script file.
Important Note You should not run several instance of Flash Video Studio concurrently. Doing so will results in a bad output quality. |