BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

How to determine video clip run time

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Multimedia
View previous topic :: View next topic  
Author Message
Eric
Guest





PostPosted: Wed Nov 01, 2006 1:12 am    Post subject: How to determine video clip run time Reply with quote



(I posted this in the general forum before I found this forum)

I need to determine the runtime for various video clips (but no
need to view the clip).

I need to be able to read mov, avi, and mp4 lengths. Any ideas on components that would support this?

Thanks,
Eric
Back to top
Warrick Wilson
Guest





PostPosted: Wed Nov 01, 2006 5:35 am    Post subject: Re: How to determine video clip run time Reply with quote



"Eric" <Eric (AT) example (DOT) com> wrote in message
news:4547ae26$1 (AT) newsgroups (DOT) borland.com...
Quote:

(I posted this in the general forum before I found this forum)

I need to determine the runtime for various video clips (but no
need to view the clip).

I need to be able to read mov, avi, and mp4 lengths. Any ideas on
components that would support this?

Thanks,
Eric

Eric - I'm interested in this, too. I'd like to find better ways than what
I'm doing. You have to watch which types of files you're rendering and
decide whether you want to use different playback techniques. What I've done
in the past is to use the various ActiveX controls that are available,
create an instance and load a file. If it loads OK, then query the Player
for the duration. Then dispose of the ActiveX control that was created (like
a Quicktime player, or a Windows Media Player).

Sometimes, though, you don't get the information unless you actually play
the file.

I've once done a Quicktime file parser that looked into the file and
extracted some key information, which I got based on the Quicktime format
documents that are downloadable from Apple's site. It worked, but was a
little gory to get working.

For things that can be played by Windows Media Player, you can use something
like DSPack to make a fairly lightweight and simple renderer that you can
then use to get the duration of the file you loaded. But you always have to
have the proper codecs on the machine in order to determine that
information, because there's a certain amount of rendering done. If you're
willing to venture into the wilds of DirectX/DirectShow, even using
something like DSPack (www.progdigy.com) to help you, you can try the
IMediaSeeking interface. But that's got limitations for certain types, like
MPEG-2, I think.

I'm not aware of any purely programmatic methods that you can use to extract
the information about duration, etc., though I'd dearly love those. I expect
that there must be some; I just don't know where to find them. And if I
found them, I suspect they wouldn't be in Delphi.
Back to top
Boian Mitov
Guest





PostPosted: Mon Nov 06, 2006 2:45 am    Post subject: Re: How to determine video clip run time Reply with quote



Hi Eric,

VideoLab - www.mitov.com will do that, if you have DirectShow filters
that support the formats installed on your system.

With best regards,
Boian Mitov

Eric wrote:
Quote:
I need to determine the runtime for various video clips (but no
need to view the clip).

I need to be able to read mov, avi, and mp4 lengths. Any ideas on components that would support this?
Back to top
Whome
Guest





PostPosted: Wed Dec 06, 2006 3:38 am    Post subject: Re: How to determine video clip run time Reply with quote

Eric wrote:
Quote:
(I posted this in the general forum before I found this forum)

I need to determine the runtime for various video clips (but no
need to view the clip).

I need to be able to read mov, avi, and mp4 lengths. Any ideas on components that would support this?

Thanks,
Eric

Use DSPACK component, I have edited one of the dspack example to read
properties of video files including duration. Its not exactly my code
but merely edited code snippets here and there together.

http://koti.mbnet.fi/akini/delphi/dspack/
Download file: VRMBitmap.zip

See uMediaDetails.pas unit.
Back to top
Patrick
Guest





PostPosted: Tue Jan 16, 2007 10:00 pm    Post subject: Re: How to determine video clip run time Reply with quote

I'm working on a class that does this right now. It returns information
about Mediafiles.
At this moment it supports *.avi and Vorbis (*.ogm/*.ogg), will add support
for Matroska (*.mkv), *.mp4 and Quicktime.
It does not need to have any codecs installed.

FileSize

Duration

BitRate

BitRateVideo

BitRateAudio

BitRateAudioMin

BitRateAudioMax

Channels

SampleRate

Width

Height

FPS

FourCC

MetaData



If you're interested, send me an e-mail.



"Eric" <Eric (AT) example (DOT) com> escribió en el mensaje
news:4547ae26$1 (AT) newsgroups (DOT) borland.com...
Quote:

(I posted this in the general forum before I found this forum)

I need to determine the runtime for various video clips (but no
need to view the clip).

I need to be able to read mov, avi, and mp4 lengths. Any ideas on
components that would support this?

Thanks,
Eric
Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Multimedia All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.