Ravi wrote:

> I tried using the imaging lingo to capture a screen when a video
> MPG(with Directmedia Xtra) is playing. But it only captures the 
> graphic part of it leaving out the space where video is playing.

This can be quite tricky. First, any machine running your app needs to
have the proper MPG, MP2, MP4 etc decoder installed, so if it's running
on machines outside of your control, you may need to verify a decoder
installation first.

Second, some MPG playback mechanisms lock frame captures out, and this
becomes our too bad.

If I remember right, DirectMedia Xtra only accesses the decoders already
installed on the machine & doesn't provide its own (I may be wrong).
Regardless, I remember trying unsucessfully to do this with DirectMedia.

> the problem is director is not able to redraw the screen fast 
> enough and there is a 2 second delay before it positions itself.

This is an MPG decoder issue, not a Director problem. Unlike QuickTime
or AVI, MPG doesn't store every video frame as a fully-formed picture
that's immediately seekable. Playback uses pre- and post-frame GOP data
to display actual frames. IOW, to display a given MPG frame, the decoder
needs to play a bit of it beforehand, to assemble the data into a
displayable frame (unless it's a key frame).

So instead of seeking to frame x for capture, try seeking to x-2 or so,
then play the video from that point until it arrives at the frame you
want, then pause the video. _Then_ capture it.

And BTW, I don't believe you can capture an MPG frame with imaging
lingo. After trying everything I could think of, I only got it to work
in Director using ScrnXtra's ScreenToMember() method. This means it
takes actual screen real estate, and is therefore definitely not
threadsafe. I've since abandoned doing this in Director, and now use a
COM wrapper around a DirectX capture utility -- it has been more
reliable for me.

</delurk>

HTH,
Rob

/*********************************
* Rob Wingate, Software Human    *
* http://www.vingage.com         *
* mailto:[EMAIL PROTECTED] *
*********************************/

[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/LUJ/lingo-l.cgi  To post messages to the list,
email [EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED])
Lingo-L is for learning and helping with programming Lingo.  Thanks!]

Reply via email to