- This topic has 4 replies, 2 voices, and was last updated 14 years, 9 months ago by
Leonardo Bernardini.
-
Posted in: Templates
-
30th November 2010 at 5:24 pm #14439
Hi,
Really nice app! I tested it for a few days now and it seems that Muster have a lot of extraordinary abilities! Congratulations to the developers!
However, I tried to render some After FX compositions and it worked great but I have a lot of picture sequence that I would like to encode in a QuickTime file. The goal is to do it after the render job (of course, otherwise there is no picture to encode…)
No problem with the ffmpeg CLI but now I would like to automate it with Muster, so I tried to write a template for ffmpeg.
I have some problem to submit the job to my farm. The job goes in the queue but stay “On Queue” (green dot). I’ve 2 instances waiting for some workSo, 2 questions :
– Am I doing something wrong with the template?
– Is it possible to add this template (when it will work) to a postjob action?I made a screenshot of the console : http://www.amp-interactive.com/supports/muster/MusterConsole_capture.png
By the way, I didn’t understand the meaning of the [SUBST/NOSUBST] option, could someone explain it to me?
Thanks,
AMPi.
Here is the ffmpeg command line :
ffmpeg -i “C:INrendered-image_%%05d.tga” -f “mov” -r “25” -vcodec “qtrle” “c:OUTrendered-video.mov”
Here is the template I wrote :
DECLARE TEMPLATE
{
SET TEMPLATE_NAME “Single ffmpeg”
SET TEMPLATE_DESC “Encode a video from picture sequence with ffmpeg”
SET TEMPLATE_UID 44
SET TEMPLATE_LOGIC SINGLE
SET DEFAULT_PRIORITY 1
SET DEFAULT_POOL “Controller”
SET MAXIMUM_LICENSES 0
SET DELAY_GROUP “Global”
SET DELAY_TIME 0
}DECLARE SINGLE
{}
DECLARE SUBMISSION
{
SET ENABLE_ADDITIONAL_FLAGS 0ADD PictureSequence FILE_SELECTOR “” “Picture Sequence” “Specify the FIRST picture of the picture sequence” NOTACTIVABLE MANDATORY SUBST *.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 NOSUBST#TODO: Configurer l’encodage audio et sous-titre
#
#ADD AudioCodec STRING_INPUT “” “Audio Codec” “Specify the audio codec of the output file (…)” ACTIVABLE NOTMANDATORY
#ADD AudioBitrate INTEGER_INPUT “192” “Audio Bitrate” “Specify the audio bitrate in bit” ACTIVABLE MANDATORY
#ADD SubtitleCodec STRING_INPUT “” “Subtitle Codec” “Specify the subtitle codec of the output file (…)” ACTIVABLE NOTMANDATORYADD VideoFrameRate INTEGER_INPUT “25” “Video Frame Rate” “Specify the number of frame per second” NOTACTIVABLE MANDATORY NOSUBST
ADD VideoBitrate INTEGER_INPUT “4096000” “Video Bitrate” “Specify the video bitrate in bit” NOTACTIVABLE MANDATORY NOSUBST#TODO: Configurer la possibilité d’écraser le fichier de destination
#
#ADD OverwriteOutput YESNO “0” “Overwrite output if present” “Overwrite output file if present” ACTIVATEADD DestinationFolder FOLDER_SELECTOR “” “Destination Folder” “Specify the path of the destination folder” NOTACTIVABLE MANDATORY SUBST
ADD DestinationFile STRING_INPUT “render” “Destination File” “Specify the name of the destination file” NOTACTIVABLE MANDATORY NOSUBST
}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# Construction de la ligne de commande FFMPEG
SET COMMAND_LINE ” -i “%ATTR(PictureSequence)” -f “%ATTR(VideoContainer)” -r “%ATTR(VideoFrameRate)” -vcodec “%ATTR(VideoCodec)” -vb “%ATTR(VideoBitrate)” “%ATTR(DestinationFolder)\%ATTR(DestinationFile)_%ATTR(VideoBitrate)b_%ATTR(VideoFrameRate)fps.%ATTR(VideoContainer)””#
SET EXECUTABLE “%ATTR(FFMPEG_EXECUTABLE)”
SET STARTING_FOLDER “%ATTR(FFMPEG_PRESETS_FOLDER)”#
SET ENVIRONMENT_BLOCK DERIVED
SET DETECTION_LOGIC REALPROC#
DECLARE CONFIGURABLE_TAGS
{
ADD FFMPEG_EXECUTABLE FILE_SELECTOR “C:\Program Files (x86)\ffmpeg\ffmpeg.exe” “ffmpeg executable” “Specify the ffmpeg 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
}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
}2nd December 2010 at 10:20 am #15090I see a very different way to accomplish that, the best thing would be to include your compression phase as a POSTJOB action of the After effects template itself. Post job actions can be embedded in the template itself, and you can modify the afx template to include the additional fields you need to setup the compression parameters. In that way, you have a single self-contained template. You may leave the ffmpeg template for standalone assembling
7th December 2010 at 5:36 pm #15123Hi 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,
14th December 2010 at 10:56 am #15144as explained in PM, change ADD POSTJOB_ACTION to SET POSTJOB_ACTION
Cheers !
-
You must be logged in to reply to this topic.