Pipeline | Renderstats
Yesterday I was asked by a friend if I had a way to collect a bunch of statistics about a folder of rendered images and warn about missing frames. I didn’t have anything at hand and so I quickly threw something together. As these things go, it quickly went through a couple of revisions until we were both happy with the output it provided.
I think some of you might find value in it as well. So without further ado I present to you the renderstats script.
Functionality is simple. You give it a folder or a file path and a bunch of options and it spits out some stats about the folder contents like so:
renderstats.py /Volumes/ProjectsRaid/renders/ Listing render stats for "/Volumes/ProjectsRaid/renders/": Overall rendertime: 27 hours 58 minutes 38.07 seconds for 405 files That's an mean/average of 4 minutes 8.69 seconds per frame. Maximum per frame time was: 5 minutes 31.00 seconds Minimum per frame time was: 4 minutes 42.00 seconds Found the following continuous frame ranges: 1405-1750 2409 Expected a continuous range from 1405 to 2409. Missing 658 frames: 1751-2408 Some files (1) are smaller then the threshold and are likely broken or incomplete: 2409
-hshow the help message
-rGo through all subfolders recursively.
-fOutput statistics to file instead of stdout.
-nNAME Name to be used for the renderstats file. (default: renderstats.txt)
-sSIZE File size below which the file is considered broken. (default: 128 bytes)
-tTHRESHOLD Size deviation from the mean before file is considered broken. (default: 0.5)
And that’s pretty much it. It pretty simple under the hood and does not care much where you point it to. So you could point it to a folder full of text file or LXO files instead and get some stats back as well although the missing frames very likely won’t work as that looks for a contiguous frame counter (it will recognize almost any naming scheme that ends with a frame counter at the end followed by the extension).
You can grab the script here: → renderstats.py