Forum Replies Created
-
7th December 2010 at 5:36 pm #15123
Hi Leornado,
I made several tests but can’t succeed!
I have some difficulties to use “Actions templates” in the editor. I checked reference manual but there is no information about its usage. By the way, it will be usefull if you’ll add it in the next release’s documentation (like you did for others declare blocks).Here is how I used pre/post job actions, is it correct (apparently not cause I get an error)?
DECLARE ACTIONS
{
SET ENABLE_POSTJOB 1
ADD POSTJOB _ACTION “C:\Windows\System32\cmd.exe /c app.exe [switches]”
SET POSTJOB_ACTION_CHECK_RETCODE 1
SET POSTJOB _ACTION_RETCODE 0
SET POSTJOB _ACTION_TIMEOUT 30
}Could you provide the complete documentation of actions usage?
Thanks,
2nd December 2010 at 9:40 am #15089The solution below works but I’ve to specify a dependency ID (After FX job ID) in the ffmepg job.
Here is the working template to use ffmepg :
DECLARE TEMPLATE
{
SET TEMPLATE_NAME “Broadcast ffmpeg”
SET TEMPLATE_DESC “Encode a video from picture sequence with ffmpeg”
SET TEMPLATE_UID 45
SET TEMPLATE_LOGIC BROADCAST
SET DEFAULT_PRIORITY 1
SET DEFAULT_POOL “Controller”
SET MAXIMUM_LICENSES 0
SET DELAY_GROUP “Global”
SET DELAY_TIME 0
}DECLARE BROADCAST
{}
DECLARE SUBMISSION
{
SET ENABLE_ADDITIONAL_FLAGS 0ADD PictureSequence FILE_SELECTOR “” “Picture Sequence” “Specify the FIRST picture of the picture sequence” NOTACTIVABLE MANDATORY NOSUBST *.tga;*.png;*.bmp;*.tiff;*.tif;*.jpg;*.jpeg
ADD VideoContainer STRING_INPUT “mov” “Video Container” “Specify the video container of the output file (mov, mp4, ogg, mpeg2video, mpegts, …)” SUBST NOTACTIVABLE MANDATORY NOSUBST
ADD VideoCodec STRING_INPUT “qtrle” “Video Codec” “Specify the video codec of the output file (qtrle, libx264, libtheora, flv, mpeg2video, …)” NOTACTIVABLE MANDATORY NOSUBSTADD VideoFrameRate INTEGER_INPUT “25” “Video Frame Rate” “Specify the number of frame per second” NOTACTIVABLE MANDATORY NOSUBST
ADD VideoBitrate INTEGER_INPUT “” “Video Bitrate (in bits)” “Specify the video bitrate in bit” ACTIVABLE NOTMANDATORY NOSUBSTADD DestinationFolder FOLDER_SELECTOR “” “Destination Folder” “Specify the path of the destination folder” NOTACTIVABLE MANDATORY NOSUBST
ADD DestinationFile STRING_INPUT “render” “Destination File” “Specify the name of the destination file” NOTACTIVABLE MANDATORY NOSUBST# Overwrite output fie selection
ADD OverwriteOutput YESNO “” “Overwrite output file?” “If YES, the output file will be overwitten if already present” ACTIVABLE# Logs activation
ADD OutputLogs YESNO “” “Write output logs?” “If YES, a logs file will be written to the destination folder specified in the next section” ACTIVABLE# Stats activation
ADD OutputStats YESNO “” “Write output stats?” “If YES, a stats file will be written to the destination folder specified in the next section” ACTIVABLE}
DECLARE SUBMISSION_ADDFLAGS_GUI
{
DECLARE SUBMS_ADDFLAGS
{
SET GROUP_NAME “Custom flags”
ADD CUSTOM_FLAGS STRING_INPUT “” “Custom flags:” “Specify additional flags to concatenate to the command line” ACTIVABLE
}SET ADDFLAGS_COMMAND_LINE “%ISACTIVE(CUSTOM_FLAGS (%ATTR(CUSTOM_FLAGS) ))”
}DECLARE ENGINE_WIN
{
SET PLATFORM_ENABLED 1
SET ENABLE_ERROR_CHECK 1
SET ENABLED_BY_DEFAULT 1
SET FRAMESFLOATS 0# FFMPEG Command Line construction
SET COMMAND_LINE “/c ffmpeg %ISACTIVE(OverwriteOutput (-y)) -i “%ATTR(PictureSequence)” -f %ATTR(VideoContainer) -r %ATTR(VideoFrameRate) -vcodec %ATTR(VideoCodec) %ISACTIVE(OutputStats (-vstats_file “%ATTR(DestinationFolder)\ffmpeg_stats.txt”)) %ISACTIVE(VideoBitrate (-vb ))%ATTR(VideoBitrate) “%ATTR(DestinationFolder)\%ATTR(DestinationFile)%ISACTIVE(VideoBitrate (_%ATTR(VideoBitrate)b))_%ATTR(VideoFrameRate)fps.%ATTR(VideoContainer)” %ISACTIVE(OutputLogs (2>”%ATTR(DestinationFolder)\ffmpeg_logs.txt”))”#
SET EXECUTABLE “%ATTR(CMD_EXECUTABLE)”
SET STARTING_FOLDER “%ATTR(FFMPEG_PRESETS_FOLDER)”#
SET ENVIRONMENT_BLOCK USER
SET DETECTION_LOGIC PROC
SET FORCEWINDOWHIDE 0#
DECLARE CONFIGURABLE_TAGS
{
ADD CMD_EXECUTABLE FILE_SELECTOR “C:\Windows\System32\cmd.exe” “Console executable” “Specify the console executable” NOTACTIVABLE MANDATORY *.exe
ADD FFMPEG_PRESETS_FOLDER FOLDER_SELECTOR “C:\Program Files (x86)\ffmpeg\” “ffmpeg Starting folder” “Specify the ffmpeg starting folder” NOTACTIVABLE MANDATORY#TODO: ajouter la configuration par défaut de ffmpeg (format, codec, …)
#ADD
#ADD
}DECLARE CUSTOM_ENVIRONMENT
{}
SET APPFINDER “ffmpeg” EXECUTABLE “ffmpeg.exe”
MAP FFMPEG_EXECUTABLE “%ATTR(APPPATH)\ffmpeg.exe”
MAP FFMPEG_PRESETS_FOLDER “%ATTR(APPPATH)”
}DECLARE ENGINE_MAC
{
#Desactivation pour les plateformes MAC
SET PLATFORM_ENABLED 0
}DECLARE ENGINE_LINUX
{
#Desactivation pour les plateformes Linux
SET PLATFORM_ENABLED 0
}DECLARE ERROR
{
ADD WARNING “Warning” “Warn”
ADD ERROR “Error” “Err”
ADD ERROR_RETCODE_STR -1 “Error” -2 “Error”
ADD WARNING_RETCODE 1 2 3
ADD DEFAULT_RETCODE 0
} -