[Kdenlive-devel] How to get a single frame

Rolf Dubitzky Dubitzky at physi.uni-heidelberg.de
Thu Oct 21 12:10:04 UTC 2004


On Wednesday 20 October 2004 14:49, Lúcio Flávio Corrêa wrote:
> Hi people. I'm trying to get a single frame from a  file, and put it in a
> QPixmap for example. Reading piave source code, I found a function called
> veml_snapShot(), but didn't understand how to do that. Any idea?

you can ask piave to save a single frame to a file (at the same time scaling 
it to a smaller size if requested).  The intention of this command was to 
load these pictures into kdenlive and display them in the timeline, i.e. you 
have a few frames of the clip instead of only the name.  I actually 
implemented this half way, but I couldn't figure out what to do when the user 
'cut's a clip.  On this action, kdenlive would need to ask piave for couple 
of new frames.  That didn't work, so I didn't commit it.

To test it, just send a command like the following from kdenlive to a piave 
instance after setting a scenelist (may contain effects and everything):

  <snapShot time="0" />

the defaults (see kdenserver.cc)

  <snapShot width="40" height="30" filename="/tmp/piave-snapshot.bmp">

40x30 is already pretty good for the timeline.  You would need to open the 
specified filename with QPixmap/Image.Load() (I don't know Qt well).  
Only .bmp is currently supported. The VEML command returns a reply with 
<status="ok"/"failed">

Cheers, Rolf


-- 
contacts: http://www.physi.uni-heidelberg.de/~dubitzky




More information about the Kdenlive mailing list