On Thu, May 26, 2011 at 5:55 AM, Dyogo Veiga <dyogo....@gmail.com> wrote:
> What happens is that I start Factory, Producer and create the position the
> video without problem. I use the Python language and create a variable
> called frame and it receives Producer.get_frame () but when I do
> frame.get_image () method that asks three arguments, the height, width and
> format but when I pass these parameters of the error. interece grateful to
> help,

The scripting languages have some limitations with passing and
returning binary values. In the MLT source tarball, see
src/swig/mlt.i. There is a special function to handle the binary image
return value from Frame::get_waveform() as used by
src/swig/python/waveforms.py. Something similar needs to be created
for Frame::get_image(). It does not exist yet because no one has
needed it. I can make a complete working python script for you, but it
will take a few days and you need to be prepared mlt from source.

> I participate in a project targeting in Brazil we use the OpenCV but
> he has problems to place the video in ogg the mlt is the solution to finish
> the project. Thanks
>
> 2011/5/26 Dan Dennedy <d...@dennedy.org>
>>
>> On Wed, May 25, 2011 at 11:05 AM, Dan Dennedy <d...@dennedy.org> wrote:
>> > 2011/5/25 Dyogo Veiga <dyogo....@gmail.com>:
>> >> Good afternoon, I have a project targeting video and started to use mlt
>> >> can
>> >> position the video but I can not return to a variable one frame of
>> >> video. If
>> >> someone can help me I am grateful.
>> >
>> > Exact syntax depends on your language, but in pseudo-code it looks like
>> > this:
>> >
>> > Factory.init()
>> > profile = new Profile("square_pal_wide")   // or other
>> > producer = new Producer(profile, "filename")
>> > producer.seek(myPosition) // myPosition is a frame number
>> > frame = producer.get_frame()
>>
>> I forgot that there is something special you need to do here to make
>> some things happy:
>>
>> frame.set("consumer_aspect_ratio", profile.sar())
>> frame.set("consumer_deinterlace", profile.progressive())
>>
>> > format = mlt_image_rgb24    // or other
>> > width = 0
>> > height = 0
>> > image = frame.get_image(format, width, height)
>> >
>> > // Image contains data in packed format where stride = width *
>> > bytes_per_pixel depending on format.
>> > // You do not destroy this image buffer; the frame object manages it.
>> >
>> > // If you are using a garbage-collected language, smart pointers, or
>> > scoped objects, then object destruction is automatic. Otherwise, you
>> > need to call close functions (C) or delete (C++) your object pointers.
>> >
>> > Easy, eh?
>> >
>> > --
>> > +-DRD-+
>> >
>>
>>
>>
>> --
>> +-DRD-+
>
>
>
> --
> Dyogo Ribeiro Veiga
> Graduando em Tecnólogo em Análise e Desenvolvimento de Sistemas - 3º Período
> Bolsista de Iniciação Científica - Núcleo de Pesquisas em Sistemas de
> Informação
> (22) 9726-3631
>



-- 
+-DRD-+

------------------------------------------------------------------------------
vRanger cuts backup time in half-while increasing security.
With the market-leading solution for virtual backup and recovery, 
you get blazing-fast, flexible, and affordable data protection.
Download your free trial now. 
http://p.sf.net/sfu/quest-d2dcopy1
_______________________________________________
Mlt-devel mailing list
Mlt-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mlt-devel

Reply via email to