Jump to content

Recommended Posts

Hello hive mind!

I'm looking for a better solution to saving out my flipbooks as .mp4s.

Right now I have ffmpeg installed so I can go directly from mplay and save an .mp4, but I cannot figure out how to change the preset for the menu so that the default file name matches my naming convention. Which is really annoying.

5b3550a104cb0_Screenshotat2018-06-2817-17-35.thumb.png.037b87f854505380d7b223f7bc6dcf94.png5b3550a205f3b_Screenshotat2018-06-2817-18-09.png.e9d7d4f34a4cf61596925ebd24cdb55b.png

I'm looking for any of these solutions! :) 
1) Does anyone know how to update this ffmpeg window with a custom string in the "Output File" field?
2) Does anyone know where mplay stores the tmp images, so I could grab them straight from there and go to ffmpeg from a shell?
3) Does anyone have a better solution for flipbooking? 

Thanks!

Edited by iFight4theUser
Link to comment
Share on other sites

  • 1 month later...

Hello Ryan,

saw this topic regarding flipbooks, and as i was pondering over this a while ago as well ,tinkered with some stuff and came up with this ,

sets the hip name from hip file path
sets the screen resolution tp 1920x1080
sets the zoom factor to 100 percent
sets the frame range from start end frame range
this is in Windows so use the backslah forward slash appropriately when in linux
drag and drop on the shelf and change the mode to python or
create your own custom hda with input values

 


 

import hou
import os

cur_desktop = hou.ui.curDesktop()
scene = cur_desktop.paneTabOfType(hou.paneTabType.SceneViewer)
flipbook_options = scene.flipbookSettings().stash()
playbar_options = hou.playbar
hip_file = hou.hipFile
path_name = hip_file.name()
file_name = hip_file.basename()
spli_file_name = file_name.split(".")
spli_path_name = path_name.split(".")
frame_range = playbar_options.frameRange()
flipbook_options.frameRange( (int(frame_range[0]),int(frame_range[1])) )
new_dir_path = str(spli_path_name[0])
if not os.path.exists(new_dir_path):
    os.makedirs(new_dir_path)
flipbook_options.output(spli_path_name[0]+"/"+spli_file_name[0]+".$F4.exr")
flipbook_options.outputZoom(100)
flipbook_options.useResolution(1)
flipbook_options.resolution((1920,1080))
flipbook_options.cropOutMaskOverlay(1)
scene.flipbook(scene.curViewport(), flipbook_options)

 

 

  • Like 1
Link to comment
Share on other sites

Hey Hey! Cool thx JN!

I'll check this out and see if I like this solution. I think my plan right now is to have the flipbooks write to a tmp location, and then generate a dropdown menu to select from the tmp versions which I want to run through a os.cmd( fffmpeg ... ) type of command. 

Thanks!

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...