On 5/22/2009 11:38 AM Rhodri James said...
On Fri, 22 May 2009 13:54:26 +0100, TerabyteST <gabry...@gmail.com> wrote:
<snip>
@Emile: if I can access MEncoder from python and give it the images
one by one, using a stream like i'm doing in ffmpeg, or telling it a
sequence to make a video from, I could try it.


Here's the relevant code I'm using. You can follow by mencoder's argument options what everything is, but essentially it expects that the images are collected in stillsdir, sub-titles are in srtfn, sub-title font in fontfn and then it creates the movie tmpfile, and if successful, renames it avifile.

HTH,

Emile

---------
cmdstr = '/usr/local/bin/mencoder mf://%s/*.jpg -mf type=jpg:w=640:h=480:fps=%d -fps %d -ofps %d -s ub %s -font %s -vf pp=hb/vb -ovc lavc -lavcopts vcodec=msmpeg4v2:vbitrate=%d -oac copy -quiet -o "%s" && mv -f "%s" "%s"' % (stillsdir,FPS,FPS,FPS,srtfn,fontfn,vkbps,tmpfile,tmpfile,avifile)
print "generating movie %s from %s/" % (avifile,stillsdir)
print cmdstr
results = commands.getstatusoutput(cmdstr)
print results


You seem to have emailed me directly, not the list.  I've copied this
back to the list so Emile can see it too.

Thanks Rhodri -- Emile


--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to