TActivemoive or like

Hi -

I'm wanting to add the ability to play AVI,MPEG, etc files within my application. I like the way TActivemoive (http://www.delphicity.com) works but this poor boy can't afford the price (yes - I know its only $67, but when $ is tight, $67 is a lot).

Anyway, I'm sure DelphiCity doesn't have the only component. So I'm looking for a freeware verion for Delphi 6. I need the sample to be able to frame capture and save to disk as well.

Links please or sample codes.

Thanks

RB
routerboy309Asked:
Who is Participating?
 
Lee_NoverConnect With a Mentor Commented:
yep you can
simply add a FilterSampleGrabber component and connect to the graph
with that you can capture single frames
if you want to save the output file then add a FileWriter filter (Add a filter component - choose it's type - DirectShow Filters - FileWriter)
you can do basically anything that has to do with multimedia

to get the bitmap out of the buffer is really simple
from the Grabber & Callback demo :

procedure TForm1.FilterSampleGrabberBuffer(sender: TComponent; Buffer: TBufferCB);
begin
  FilterSampleGrabber.GetBitmap(image1.Picture.Bitmap,Buffer);
...
...


then simply save that bitmap as anything you like
:)
0
 
Stuart_JohnsonCommented:
What's wrong with TMediaPlayer that's shipped with Delphi?  It will play AVIs and MPEGs perfectly.  Otherwise, you can import the Microsoft Active Movie OCX and use that.

Stu
0
 
routerboy309Author Commented:
Thanks for the quick response. Can TMediaPlayer do screen captures and send the capture to disk? Will it load and play MPGs too?

RB
0
Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

 
Stuart_JohnsonCommented:
Umm, no!  You had better edit you question and put that into the requirements for this question.  No wonder that component cost $67.  I'm surprised it's that cheap!

TMediaPlayer will load & play MPEGs however.

What you're asking for is something pretty complex.  I very much doubt you'll find anything for free out there.

An unfortunate part of TMediaPlayer is that you can't even screen capture the form it's playing on (it just returns a black image).  I'm not sure why it's happens.  Perhaps it create a virtual window which can't be seen.  If you could, you could quite easily have written your own code to capture a frame (or frames) from the display rect.

As a suggested bit of reading, perhaps you could have a read through this: http://www.shrinkwrapvb.com/avihelp/avihelp.htm.  I've used it a few times to do some AVI related stuff.

Hope this helps,

Stu
0
 
Lee_NoverCommented:
complex ? .. no no :)
go to www.progdigy.com and get DSPack and examples for it
it's based on DirectShow

you can play any media supported by windows
even display jpegs, animated gifs, mp3s, anything :)
there's also a support forum
soon version 2 will be released

oh and ofcourse it's all free, all delphi sources :)
0
 
Stuart_JohnsonCommented:
Lee, the problem is that routerboy309 want's to capture and save the output as well.  Can DSPack do this?

Stu
0
 
routerboy309Author Commented:
I've spent about two hours playing with DSPack and I like it. The golden question is the frame capture and save output as Stu points outs. Can you help with an example of such?

Thanks

RB
0
 
routerboy309Author Commented:
I really like the components and the site has a complete forum.

Thanks Lee!

RB
0
 
Lee_NoverCommented:
damn ... I posted earlier in reply to your previous post but it's not here ?!?!?!
anyway I posted there's an example Grabber & WDM from which you can see how to save the bitmaps from the movie
0
 
Lee_NoverCommented:
arghh .. prblems with cache or sumtin, I see it now
tnx for the A :)
0
 
Stuart_JohnsonCommented:
Well done, Lee!  Top effort all round!
0
 
routerboy309Author Commented:
Sure - its a credit to the site PLUS the advise of frame captures. Well done!

0
All Courses

From novice to tech pro — start learning today.