Solved

TActivemoive or like

Posted on 2002-04-11
12
140 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 4
  • 4
12 Comments
 
LVL 6

Expert Comment

by:Stuart_Johnson
ID: 6933753
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
ID: 6933815
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
ID: 6933831
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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 12

Expert Comment

by:Lee_Nover
ID: 6934517
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
ID: 6935478
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
ID: 6935565
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
 
LVL 12

Accepted Solution

by:
Lee_Nover earned 50 total points
ID: 6936214
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
ID: 6936443
I really like the components and the site has a complete forum.

Thanks Lee!

RB
0
 
LVL 12

Expert Comment

by:Lee_Nover
ID: 6936496
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
ID: 6936498
arghh .. prblems with cache or sumtin, I see it now
tnx for the A :)
0
 
LVL 6

Expert Comment

by:Stuart_Johnson
ID: 6936577
Well done, Lee!  Top effort all round!
0
 

Author Comment

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

0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

730 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