Notifications
Clear all

[Closed] Post-Render script…

And you use this as a post render script with netrendering?

No, I run this in my rendering utility (basically a wrapper and auto-setup for useful animation rendering things) after I render out frames and composite them together (can render from multiple views). We don’t do any post or net rendering (we are in games). But I think the idea would be the same?

I will give it a try. Thanks

Ok finally done. I ended up using the dependancy script written by Johan Boekhoven mentioned in a previous thread. I just modified it to work with ffmpeg. It is now a 1 button press to an FLV on are render farm. Here is the script.

 macroScript FLVrenderer
 category:"Mikes"
 toolTip:""
(
 /* CONNECT TO THE NETWERK MANAGER */
  m = netrender.getmanager()
  c1 = m.connect #automatic "255.255.255.0"
  
  -- Batch it max (PEN) runs through a folder of files opening them and submitting them via this script
  localFileName = maxFilePath + maxFileName
  
  --saves the settings
  saveMaxFile localFileName
  
  -- Will be used in the mxs submit and dosCommand dependencies!
  jobName = (filterString maxFileName "." )[1] --  < add some extra string here to allow to sent unique jobs
  
  /* WHEN CONNECTION AND FILE SUCCESFULLY COPIED */
  if c1 then
  (
   /* SUBMIT JOB */
   -- Easy BB submit
   job = m.newjob file:localFileName
   job.name = jobName
   job.includeMaps = true --turn on "Include Maps"
   job.submit() --this uses all servers for the job

   
   /* FILE SETTINGS */
   -- Set the parameters that ffmpeg needs
   startTime = "%%04d"
   fPath =  getFilenamePath rendOutputFilename 
   s1 = toLower fpath
   s2 = "[\\\	ta_server\\3d]( http://forums.cgsociety.org/)  model library\\" 
   s3 = " z:\\"
   filePath = substituteString s1 s2 s3 
   
   fileName = (getFilenameFile rendOutputFilename )
   fileNameExt = getFilenameType rendOutputFilename
   
   vInput = filePath + fileName + startTime + fileNameExt
   
   ffmpeg = @"z:\ffmpeg.exe "
   vScript1 = @"-f image2 -i " + vInput 
   vOutput1 = @" -b 700k -vcodec flv -y " + filePath + fileName  + ".flv"
   scriptJobName1 = jobName + "_FLV"
   
   print ffmpeg + vScript1 + vOutput1
   
   /* OUTPUT1 - UNCOMPRESSED AVI */
   -- Build stringStream
   jobString1 = stringStream ""
   
   -- Create jobname
   format "-jobName:% " scriptJobName1 to:jobString1
   
   -- SET THE DEPENDENCY!
   format "-dependencies:% " jobName to:jobString1
   
   -- Add netmask
   format "-netmask:255.255.255.0 " to:jobString1
	
   -- Add execution string
   format "% " (ffmpeg + vScript1 + vOutput1) to:jobString1
   
   -- max root
   maxRoot = pathConfig.GetDir #maxroot
   
   -- Build command string
   cmd = "cmdjob.exe " + (jobString1 as string) 
   
   -- Execute it
   DOSCommand cmd
   
  )
)
Page 4 / 4