[yt-users] Re: How do you make movies?
Markus Haider
markus.haider at uibk.ac.at
Wed Sep 19 06:20:24 PDT 2012
Hi Nathan,
I also use mencoder under Ubuntu 12.04, which I call through the
following python script:
-------------------------------------------------------
#!/usr/bin/python
import os
# where are the pictures?
INPUTDIR ="./slices/slice_collection/"
BASENAME ="Cluster_hdf5_plt_cnt_5363_"
fps = '10'
bitrate = '2048000'
encode_opts=':mbd=2:mv0:trell:v4mv:cbp:vb_strategy=1:precmp=2:cmp=2:subcmp=2:preme=2:qns=2'
FIELD ="Density"
outputFile = './movies/'+FIELD+'_slice.avi'
frameName=INPUTDIR+BASENAME+'*_Slice_x_'+FIELD+'.png'
encodeCommand = 'mencoder mf://'+frameName+' -mf type=png:fps='+fps+'
-ovc lavc -lavcopts vcodec=mpeg4:vbitrate='+bitrate+encode_opts+' -o
'+outputFile
os.system(encodeCommand)
print 'Finished making video'
-------------------------------------------------------
The only thing you have to make sure is that the slices are numbered
with enough leading zeros, otherwise e.g. slice 100 will be inserted
into the video before slice 11
Cheers,
Markus
More information about the yt-users
mailing list