How to get FPS value when playing ASF stream?

This forum is about all development around libVLC.
RicoPL
New Cone
New Cone
Posts: 7
Joined: 07 Jan 2013 17:06
Operating System: Mac OS
Location: Poland

How to get FPS value when playing ASF stream?

Postby RicoPL » 07 Jan 2013 17:09

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?

Rémi Denis-Courmont
Developer
Developer
Posts: 15265
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

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

Postby Rémi Denis-Courmont » 07 Jan 2013 18:00

If the container does not specify the frame rate, there is no generic way to compute it accurately.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

RicoPL
New Cone
New Cone
Posts: 7
Joined: 07 Jan 2013 17:06
Operating System: Mac OS
Location: Poland

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

Postby RicoPL » 07 Jan 2013 18:55

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.

Rémi Denis-Courmont
Developer
Developer
Posts: 15265
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

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

Postby Rémi Denis-Courmont » 07 Jan 2013 19:20

The number of blocks of video data. The meaning depends on the codec.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

RicoPL
New Cone
New Cone
Posts: 7
Joined: 07 Jan 2013 17:06
Operating System: Mac OS
Location: Poland

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

Postby RicoPL » 08 Jan 2013 12:58

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?


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 12 guests