ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
Forum membership is Free!  Click Join to sign-up
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 Get frame rate of avi file
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

Fodox

3 Posts

Posted - Oct 31 2011 :  04:38:33  Show Profile  Reply
How can I get the frame rate of an AVI file?

I have 3.1.2 version. Thanks.

Fodox

Fodox

3 Posts

Posted - Oct 31 2011 :  09:13:03  Show Profile  Reply
Maybe the problem is when I run ImageEnIo1.OpenAVIFile('myfile.avi'). It return always 0 but the AVI is playable.

Any help?
Go to Top of Page

fab

1310 Posts

Posted - Nov 01 2011 :  00:31:57  Show Profile  Reply
Please try ImageEnView.IO.OpenMediaFile instead.
Frame rate is calculable from ImageEnView.IO.Params.MEDIAFILE_FrameDelayTime.
Go to Top of Page

Fodox

3 Posts

Posted - Nov 03 2011 :  07:00:09  Show Profile  Reply
Thank you, OpenMediaFile is ok. Using DShow, frame rate can also be easily calculated with:

DShowParams.Duration (using tfFrame) / DShowParams.Duration (using tfTime, converted in seconds)



Another question. Often video have a frame rate of 29.970 fps, but using tImageEnIo.CreateAVIFile the "rate" parameter is integer. It's impossible for me to open an existing AVI, modify frames and then save with the same frame rate.
Is it a limitation or I am wrong somewhere?
Go to Top of Page

fab

1310 Posts

Posted - Nov 06 2011 :  00:17:39  Show Profile  Reply
Starting from next minor release CreateAVIFile will have rate as "double" value, so it will allow to create AVIs with real frame rates. Of course also following properties will be double:

- TIOParams.AVI_FrameDelayTime
- TIOParams.MEDIAFILE_FrameDelayTime
- TImageEnMView.ImageDelayTime

Please send a private message if you want to test the developing version.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: