Archived post by Nick D

Here’s a script to flipbook stuff out, and then mp4 it: “`python import toolutils import os import subprocess
def flip(): scene_viewer = toolutils.sceneViewer() flipbook_options = scene_viewer.flipbookSettings().stash() flipbook_options.frameRange( (hou.playbar.frameRange()[0],hou.playbar.frameRange()[1]) ) output = hou.hscriptExpandString(‘$HIP/flipbook/$HIPNAME/$HIPNAME.f.png’).replace(‘.f.’,’.$F4.’) if not os.path.exists(os.path.split(output)[0]): os.makedirs(os.path.split(output)[0]) flipbook_options.output(output) scene_viewer.flipbook(scene_viewer.curViewport(), flipbook_options) ffImage = output.replace(‘$F4′,’%04d’) movPath = output.replace(‘$F4.png’,’mp4′) proc = subprocess.Popen(r’ffmpeg -y -start_number %s -i “%s” -c:v libx264 -preset slow -pix_fmt yuv420p -crf 22 -c:a copy %s’ %(hou.playbar.frameRange()[0],ffImage,movPath)) proc.communicate() proc.wait() print(‘Done’) “`

hmmm, that’s maybe a bit spammy, sorry