Page 1 of 1

How to get FPS value when playing ASF stream?

Posted: 07 Jan 2013 17:09
by RicoPL
hi, i'm trying to get FPS data for ASF stream... function "libvlc_media_player_get_fps" returns always "0"... so I'm trying to calculate it by using data returned from "libvlc_media_get_stats" function...

first I thought about "i_displayed_pictures" but calculated values are too big i.e. 15FPS when stream comes form CCTV Camera (max 5FPS).... because there is no detailed description of "libvlc_media_stats_t" type in documentation and I'm new to whole sreamin/video programming I started to test other data ...and "i_decoded_video" looks to be the winner because it gives me values that are more likely real (1.5-3.5FPS).

... but that is only my assumption.

Can any one confirm it or give me a tip how to calculate FPS value when I'm trying to display an ASF stream?

Re: How to get FPS value when playing ASF stream?

Posted: 07 Jan 2013 18:00
by Rémi Denis-Courmont
If the container does not specify the frame rate, there is no generic way to compute it accurately.

Re: How to get FPS value when playing ASF stream?

Posted: 07 Jan 2013 18:55
by RicoPL
Thank you for a quick reply...

...but what about "i_decoded_video", can You tell me what this value represents?

There must be some kind of way to get number of received frames when stream is used as media.

PS. Sory for my english, it's not my primary language.

Re: How to get FPS value when playing ASF stream?

Posted: 07 Jan 2013 19:20
by Rémi Denis-Courmont
The number of blocks of video data. The meaning depends on the codec.

Re: How to get FPS value when playing ASF stream?

Posted: 08 Jan 2013 12:58
by RicoPL
Thanks for the information. I'm waiting for my boss's decision now. Meanwhile I have another problem with LibVLC. The topic is here: viewtopic.php?f=32&t=107449.

Can You give me any tips in that matter?