Solved

TActivemoive or like

Posted on 2002-04-11
12
138 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
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
Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

 
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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

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…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

786 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