To combat this, I made a little script to compress your playblasts with x264.
You're going to need to save the x264.exe to your C:/ root directory.
Download x264 here!
Then just run this script:
# Runs the PB Script and saves the file
from pymel.core import *
from pymel.util.path import path
import os
import subprocess
filename = path(str(fileDialog2(ff='*.mp4')[0]))
nicename = filename.strip('.mp4')
try:
blast = playblast(fmt='avi', v=0, os=1, wh=[1080,720], p=100, filename=nicename, fo=1)
except:
print 'Playblast interrupted; continuing compression'
finally:
os.system('C:\\x264.exe -o {nn}.mp4 {nn}.avi'.format(nn=nicename))
os.remove('{nn}.avi'.format(nn=nicename))
player = subprocess.Popen(filename, shell=1)
You can edit the playblast line to suit your needs, also. (resolution, etc)
Try everything out and let me know how it goes!
Hey John!
ReplyDeleteMake sure you're in the Python tab, if you're running it from mel, syntax is way different :)
Also, I'm gonna try to make this code a little cleaner today, so check back in sometime soon!