Re: [Mlt-devel] Consumer avformat JPEG question
Brought to you by:
ddennedy,
lilo_booter
From: Jonathan T. <jon...@gm...> - 2009-04-03 05:17:33
|
Dan, Thanks for the example code. It worked great. There were 2 differences in my code ... compared to the example you provided. 1) I had *c.set( "rescale", "none" )*, which seems to cause the crazy garbled image (or green bars across the bottom of the image) 2) I used *c.start()* instead of *c.run()* - I haven't researched the difference between those 2 methods yet... Anyway, I now have a generic thumb-nailer working with all of my test video clips, and it seems very stable now! Thanks for your help, as usual! -Jonathan On Thu, Apr 2, 2009 at 12:53 AM, Dan Dennedy <da...@de...> wrote: > On Wed, Apr 1, 2009 at 7:45 PM, Jonathan Thomas > <jon...@gm...> wrote: > > Thanks for the response. I will take a look at the thumb-nailing in > > kdenlive. Also, yes I am using fezzik to create the Producer. Fezzik > > seemed to work fine, so long as the "Profile" is set correctly. But if > the > > profile doesn't match the video resolution / aspect ratio, then really > bad > > things happen (i.e. garbled images) when I use an "avformat" consumer > > (specifcally when exporting to JPEG). Do you think this is a MLT bug? or > > FFMPEG bug? > > this works for me: > > #!/usr/bin/env python > > import mltpp > import sys > > mltpp.Factory().init() > profile = mltpp.Profile("quarter_ntsc") > producer = mltpp.Producer(profile, sys.argv[1]) > producer = producer.cut(int(sys.argv[2]), int(sys.argv[2])) > consumer = mltpp.Consumer(profile, "avformat", sys.argv[3]) > consumer.set("real_time", 0) > consumer.set("progressive", 1) > consumer.connect(producer) > consumer.run() > > --eof-- > > sys.argv[2] should contain the frame number of what you want to create. > If you want to get more than one thumbnail, then create a playlist and > instead of producer.cut, do playlist.append for each frame you want, > and put a %d in the output filename in sys.argv[3]. > > -- > +-DRD-+ > |