0

I want to have an FPS counter that displays the frame rate of the video as it is being played to see the FPS count change from when the video was playing in regular speed until it goes to slow motion.

Is there an API in Android SDK that allows us to track every time the frames are rendered when the video plays?

Sandeep Malik
  • 1,972
  • 1
  • 8
  • 17
  • 1
    currently there are no apis available in Android SDK but you can use ffmpeg to track every time the frames are rendered or you may use some 3rd part library for same for eg. https://github.com/brianPlummer/TinyDancer – Madhur Apr 26 '19 at 09:04
  • Thanks for the comment. Apologies if this might sound basic but the frame rate that I want to get is for the video playing alone and not the entire window. Is there a particular command in ffmpeg for this? For the Tiny Dancer library, it seems to be getting the FPS count for the entire window and not particularly the video being played alone. Or am I missing something? Thanks for the comments again. – Ivan Paul Benedict Bautista Apr 26 '19 at 09:21
  • yup you are right ffmpeg will help you get the frame rate of video and tinydancer will help in getting fps of full window – Madhur Apr 26 '19 at 09:23
  • kindly check this https://stackoverflow.com/questions/42204944/how-to-get-frame-rate-of-video-in-android-os – Madhur Apr 26 '19 at 09:25
  • thanks for the clarification. I only need the frame rate of the video alone. However, I need the frame rate count in real time while the video is playing. Because my video is playing on regular speed at the start, then in the middle, it changes to slow motion. So I want to see the FPS count change in real time. I'm believe the MediaExtractor doesn't track this while video is playing. For FFmpeg, I'm not really that knowledgeable on it, but if you cna point me to the right API/method, that would be very helpful. – Ivan Paul Benedict Bautista Apr 26 '19 at 09:38
  • I haven't used it the way you want but ffmpeg is a way broader aspect, kindly do some research but i m sure is doable using ffmpeg. sorry that i'm not able to help you more than this. – Madhur Apr 26 '19 at 09:41
  • Thanks for the response. I've researching a little about ffmpeg the past days, but still haven't found something fitted to what I'm looking for. Anyway I'll research further but if anyone can point me to the right direction, I would be very thankful. – Ivan Paul Benedict Bautista Apr 26 '19 at 09:45

0 Answers0