{"id":252,"date":"2018-09-28T00:23:11","date_gmt":"2018-09-28T07:23:11","guid":{"rendered":"http:\/\/fx-td.com\/houdiniandchill\/?p=252"},"modified":"2018-09-28T00:23:12","modified_gmt":"2018-09-28T07:23:12","slug":"archived-post-by-nick-d-2","status":"publish","type":"post","link":"http:\/\/fx-td.com\/houdiniandchill\/2018\/09\/28\/archived-post-by-nick-d-2\/","title":{"rendered":"Archived post by Nick D"},"content":{"rendered":"<p class=\"\">Here&#8217;s a script to flipbook stuff out, and then mp4 it:  &#8220;`python import toolutils import os import subprocess<br \/>\ndef 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(&#8216;$HIP\/flipbook\/$HIPNAME\/$HIPNAME.f.png&#8217;).replace(&#8216;.f.&#8217;,&#8217;.$F4.&#8217;)     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(&#8216;$F4&#8242;,&#8217;%04d&#8217;)      movPath = output.replace(&#8216;$F4.png&#8217;,&#8217;mp4&#8242;)     proc = subprocess.Popen(r&#8217;ffmpeg -y -start_number %s -i &#8220;%s&#8221; -c:v libx264 -preset slow -pix_fmt yuv420p -crf 22 -c:a copy %s&#8217; %(hou.playbar.frameRange()[0],ffImage,movPath))     proc.communicate()     proc.wait()     print(&#8216;Done&#8217;) &#8220;`<\/p>\n<p class=\"\">hmmm, that&#8217;s maybe a bit spammy, sorry<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Here&#8217;s a script to flipbook stuff out, and then mp4 it: &#8220;`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(&#8216;$HIP\/flipbook\/$HIPNAME\/$HIPNAME.f.png&#8217;).replace(&#8216;.f.&#8217;,&#8217;.$F4.&#8217;) 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(&#8216;$F4&#8242;,&#8217;%04d&#8217;) movPath = output.replace(&#8216;$F4.png&#8217;,&#8217;mp4&#8242;) proc = subprocess.Popen(r&#8217;ffmpeg -y -start_number %s -i &#8220;%s&#8221; -c:v libx264 &hellip; <a href=\"http:\/\/fx-td.com\/houdiniandchill\/2018\/09\/28\/archived-post-by-nick-d-2\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Archived post by Nick D<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[2],"tags":[],"_links":{"self":[{"href":"http:\/\/fx-td.com\/houdiniandchill\/wp-json\/wp\/v2\/posts\/252"}],"collection":[{"href":"http:\/\/fx-td.com\/houdiniandchill\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/fx-td.com\/houdiniandchill\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/fx-td.com\/houdiniandchill\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/fx-td.com\/houdiniandchill\/wp-json\/wp\/v2\/comments?post=252"}],"version-history":[{"count":0,"href":"http:\/\/fx-td.com\/houdiniandchill\/wp-json\/wp\/v2\/posts\/252\/revisions"}],"wp:attachment":[{"href":"http:\/\/fx-td.com\/houdiniandchill\/wp-json\/wp\/v2\/media?parent=252"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/fx-td.com\/houdiniandchill\/wp-json\/wp\/v2\/categories?post=252"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/fx-td.com\/houdiniandchill\/wp-json\/wp\/v2\/tags?post=252"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}