Solved

TActivemoive or like

Posted on 2002-04-11
12
136 Views
Last Modified: 2010-04-04
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
0
Comment
Question by:routerboy309
  • 4
  • 4
  • 4
12 Comments
 
LVL 6

Expert Comment

by:Stuart_Johnson
Comment Utility
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
 

Author Comment

by:routerboy309
Comment Utility
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
 
LVL 6

Expert Comment

by:Stuart_Johnson
Comment Utility
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
 
LVL 12

Expert Comment

by:Lee_Nover
Comment Utility
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
 
LVL 6

Expert Comment

by:Stuart_Johnson
Comment Utility
Lee, the problem is that routerboy309 want's to capture and save the output as well.  Can DSPack do this?

Stu
0
 

Author Comment

by:routerboy309
Comment Utility
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
6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

 
LVL 12

Accepted Solution

by:
Lee_Nover earned 50 total points
Comment Utility
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
 

Author Comment

by:routerboy309
Comment Utility
I really like the components and the site has a complete forum.

Thanks Lee!

RB
0
 
LVL 12

Expert Comment

by:Lee_Nover
Comment Utility
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
 
LVL 12

Expert Comment

by:Lee_Nover
Comment Utility
arghh .. prblems with cache or sumtin, I see it now
tnx for the A :)
0
 
LVL 6

Expert Comment

by:Stuart_Johnson
Comment Utility
Well done, Lee!  Top effort all round!
0
 

Author Comment

by:routerboy309
Comment Utility
Sure - its a credit to the site PLUS the advise of frame captures. Well done!

0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now