Categories:
-
3d 96 articles
-
animations 16 articles
-
architecture 47 articles
-
blender 98 articles
-
bédé 19 articles
-
techdrawing 24 articles
-
freecad 189 articles
-
gaming 1 articles
-
idsampa 8 articles
-
inthepress 8 articles
-
linux 57 articles
-
music 1 articles
-
nativeifc 30 articles
-
opensource 266 articles
-
orange 4 articles
-
photo 16 articles
-
projects 35 articles
-
receitas 176 articles
-
saopaulo 18 articles
-
sketches 163 articles
-
talks 25 articles
-
techdrawing 24 articles
-
textes 7 articles
-
trilhas 3 articles
-
urbanoids 1 articles
-
video 47 articles
-
webdesign 7 articles
-
works 151 articles
Archives:
-
2007 22 articles
-
2008 32 articles
-
2009 66 articles
-
2010 74 articles
-
2011 74 articles
-
2012 47 articles
-
2013 31 articles
-
2014 38 articles
-
2015 28 articles
-
2016 36 articles
-
2017 41 articles
-
2018 46 articles
-
2019 59 articles
-
2020 18 articles
-
2021 20 articles
-
2022 7 articles
-
2023 25 articles
-
2024 14 articles
Checkframes utility
A little python utility to check that frames series you download from a render farm are okay (no frame missing, no frame with 0 byte size). Made on Linux, but should work on any platform. On Linux, place this script in your /home/$USER/bin folder (or any other that is in your $PATH), make it executable, then just run this script from a folder containing frames, or a folder containing subfolders. Enjoy!
#!/usr/bin/python#***************************************************************************#* *#* Copyright (c) 2012 * #* Yorik van Havre * #* *#* This program is free software; you can redistribute it and/or modify *#* it under the terms of the GNU Lesser General Public License (LGPL) *#* as published by the Free Software Foundation; either version 2 of *#* the License, or (at your option) any later version. *#* for detail see the LICENCE text file. *#* *#* This program is distributed in the hope that it will be useful, *#* but WITHOUT ANY WARRANTY; without even the implied warranty of *#* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *#* GNU Library General Public License for more details. *#* *#* You should have received a copy of the GNU Library General Public *#* License along with this program; if not, write to the Free Software *#* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 *#* USA *#* *#***************************************************************************"""This utility checks the current folder and any of its subfolders for jpg, pngor exr image sequences, numbered 0001.jpg, 0002.jpg, etc... and checks that noframe number is missing, and that no image is corrupted (sero-size)."""import os,sysfrom PIL import Image# keeping count of errorserrors = 0# getting working pathshomepath = os.path.abspath('.')subpaths = []for p in os.listdir(homepath): ap = homepath + os.sep + p if os.path.isdir(ap): subpaths.append(ap)subpaths.sort()# add current path toosubpaths.insert(0,homepath)# checking framesfor p in subpaths: print(" ") print("checking folder "+p) frames = [] for i in os.listdir(p): if i[-4:].upper() in ['.JPG','.PNG','.EXR']: frames.append(i) if not frames: print(" This folder doesn't contain frames") else: # counting frames and checking numbers frames.sort() try: last = int(frames[-1].split('.')[0]) except: print(" Error: couldn't parse frame numbers in this folder") continue if len(frames) != last: print(" Error: frame numbers differ from frames count in this folder: last frame is "+str(last)+" but contains "+str(len(frames))) ext = frames[-1].split('.')[1] for i in range(1,last+1): fn = str(i).zfill(4)+'.'+ext if not fn in frames: errors +=1 print(" Missing frame: "+fn) # displaying info of first image try: imf = Image.open(p+os.sep+frames[0]) except: print(" Error: cannot open image "+p+os.sep+frames[0]) continue else: print(" "+str(last)+" frames - format: "+imf.format+" - "+str(imf.size[0])+"x"+str(imf.size[1])) # checking size for f in frames: fp = p+os.sep+f s = os.path.getsize(fp) if s < 1024: print(" Error: zero-sized file: "+fp) continue # subdir succeeded print " Everything ok"# all tests are doneprint(" ")if errors: print(str(errors)+" errors found")else: print("Success: All frames are ok") sys.exit()
Read next:
Man, this is amazing!! Blender + FreeCAD and parametric!! Wow! O_o I don't know what to say. Even you can...:
Man, this is amazing!! Blender + FreeCAD and parametric!! Wow! O_o I don't know what to say. Even you can...