Search code examples
ffmpegvideo-capturevideo-processing

FFmpeg play video problem (too slow or too fast) : Playing video at right peed


I can play video files with FFmpeg libary.( just implement tutorials about ffmpeg). But i have a problem with "speed" of video files. Sometimes ffmpeg play files too "quick" or to slow. So i ask my friends they say that i have to play video according to "frame per second" (fps) value of video file. So my guestion

  • Does ffmpeg give fps value of given video file? If so how can i get it?
  • Or does any body know a method in which i can play video files at their right speeed using ffmpeg library?

Best Wishes


Solution

  • From the video stream: VideoStream->r_frame_rate