Get the frame rate of an ASF movie

Everything else that doesn't fall into one of the other PB categories.
merendo
Enthusiast
Enthusiast
Posts: 449
Joined: Sat Apr 26, 2003 7:24 pm
Location: Germany
Contact:

Get the frame rate of an ASF movie

Post by merendo »

Hello everbody,

I need to find out the frame rate of an ASF movie file. I have already searched half the Internet but couldn't come up with any solutions. MovieInfo(0) tries to convince me that the movie has exactly 30 fps, as do any other tools I found on the Internet. But I know that the movie has 4 fps (but of course I need to find out for any movie :-) )

Can somebody help me with that?

Thanks a lot!!
The truth is never confined to a single number - especially scientific truth!
traumatic
PureBasic Expert
PureBasic Expert
Posts: 1661
Joined: Sun Apr 27, 2003 4:41 pm
Location: Germany
Contact:

Re: Get the frame rate of an ASF movie

Post by traumatic »

Do you happen to have a small ASF (with a framerate different to 30fps) where MovieInfo() shows a wrong result?
Good programmers don't comment their code. It was hard to write, should be hard to read.
merendo
Enthusiast
Enthusiast
Posts: 449
Joined: Sat Apr 26, 2003 7:24 pm
Location: Germany
Contact:

Post by merendo »

The truth is never confined to a single number - especially scientific truth!
traumatic
PureBasic Expert
PureBasic Expert
Posts: 1661
Joined: Sun Apr 27, 2003 4:41 pm
Location: Germany
Contact:

Post by traumatic »

Hmm... I can't play it (media player doesn't even complain about the codec
not found) but could it be your file is encoded using a variable framerate?

As WMV/ASF can have both variable bitrate and framerate, it's not possible
determine the actual average FPS beforehand.
Good programmers don't comment their code. It was hard to write, should be hard to read.
jear
User
User
Posts: 20
Joined: Sun Dec 28, 2003 12:27 am
Location: Ammerland

Post by jear »

DShow reports 0.03333...... as AvgTimePerFrame. So the video has exactly 30 FPS.
See the video properties detected by the MIPlayer:
(MIP ist part of the MPEG-Inspector, an application written in PB and based on Win DShow 9)
>>> Report of MIP session : 2007-08-17 23:50
>>> 281 registered DirectShow filters found.

>>> Video loaded to player : T:\16454620N.asf <<<
>>> Used DShow Filter Set : System's default DirectShow filters
> FilterName: Video Renderer
_PinInfo : Name = "VMR Input0", Direction = Input
> FilterName: PICVideo M-JPEG 3 DirectShow Decompressor
_PinInfo : Name = "XForm In", Direction = Input
_PinInfo : Name = "XForm Out", Direction = Output
____Media GUID: Video
______SubType GUID: UYVY
____Media GUID: Video
______SubType GUID: YUY2
____Media GUID: Video
______SubType GUID: RGB32
____Media GUID: Video
______SubType GUID: RGB24
____Media GUID: Video
______SubType GUID: RGB565
____Media GUID: Video
______SubType GUID: RGB555
____Media GUID: Video
______SubType GUID: unknown {30323449-0000-0010-8000-00AA00389B71}
____Media GUID: Video
______SubType GUID: unknown {56555949-0000-0010-8000-00AA00389B71}
____Media GUID: Video
______SubType GUID: YV12
> FilterName: T:\16454620N.asf
_PinInfo : Name = "Raw Video 0", Direction = Output
____Media GUID: Video
______SubType GUID: MJPG

>>> DShow Video Information :
> Preferred Time Format = MEDIA_TIME
> Source original Time Format = MEDIA_TIME
> GetCapabilities :
> Positioning Caps = absolute , forwards , backwards
> Getting Caps = , StopPosition , Duration
> Misc Caps =
> AvgTimePerFrame = 0.033 = 30.000 FPS
> Got TimePerFrame. FPS = 30.000
> Frame duration : 33 ms
> Filter VideoSize = 320 x 240
> Filter PreferredAspectRatio = 320 x 240
> Duration = 99430000 nanoseconds
> Number of frames calculated = 298
Last edited by jear on Sat Aug 18, 2007 7:51 pm, edited 2 times in total.
Philippe-felixer76-2
Enthusiast
Enthusiast
Posts: 135
Joined: Sat Aug 18, 2007 7:09 am
Location: Netherlands

Re: Get the frame rate of an ASF movie

Post by Philippe-felixer76-2 »

merendo wrote:Hello everbody,

I need to find out the frame rate of an ASF movie file. I have already searched half the Internet but couldn't come up with any solutions. MovieInfo(0) tries to convince me that the movie has exactly 30 fps, as do any other tools I found on the Internet. But I know that the movie has 4 fps (but of course I need to find out for any movie :-) )

Can somebody help me with that?

Thanks a lot!!
You need libavformat/libavcodec to get this info,
best way, multi platform, i'm already in the process
of porting it to PB, it almost works at this point.

I have some trouble converting C header files,
but i already get a lot of info about streams.

I compiled my own dll's with CygWin/Gnu Minimalist.

Wanne help me?
merendo
Enthusiast
Enthusiast
Posts: 449
Joined: Sat Apr 26, 2003 7:24 pm
Location: Germany
Contact:

Post by merendo »

Oh, well, I don't think I'd be of much help :) However, I would greatly appreciate your work.
The truth is never confined to a single number - especially scientific truth!
Philippe-felixer76-2
Enthusiast
Enthusiast
Posts: 135
Joined: Sat Aug 18, 2007 7:09 am
Location: Netherlands

Converting LibAVCodec/LibaVFormat6

Post by Philippe-felixer76-2 »

merendo wrote:Oh, well, I don't think I'd be of much help :) However, I would greatly appreciate your work.
Yeah i understand, but i have no time. I wish i could just
hand over all my hard work for someone to finish it
off, i'm already full of work thats more important ATM.

Gr,
Phil.
Post Reply