A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://ffmpeg.org/pipermail/ffmpeg-devel/2007-January/027019.html below:

[Ffmpeg-devel] can't get correct framerate

[Ffmpeg-devel] can't get correct framerate [Ffmpeg-devel] can't get correct framerateDaniel Dantas ddantasflu
Thu Jan 4 19:06:33 CET 2007
Hi,
   
  I'm trying to decode a *.wmv file using libavcodec, but unlike other previously decoded file formats like avi and mpeg, i can't get the correct framerate using the following piece of code:
   
  float frame_rate = 1/((float)st->time_base.num/(float)st->time_base.den);
   
  where st is "AVStream * "
   
  when I made the calculation above for this file i got the result frame_rate = 1000, but if i run the file in a loop and count all the frames, and divide these total of frames by the duration, i get the correct result of 15 fps. But obviously making it this way would have terrific consequences for the playback performance.
   
  So, my question is: is there another way to get the correct framerate when the values on time_base structure are completely wrong ?
   
  Thank you
  Daniel

 __________________________________________________
Fale com seus amigos  de gra?a com o novo Yahoo! Messenger 
http://br.messenger.yahoo.com/ 

More information about the ffmpeg-devel mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4