0

i am a newbie and trying to understand the concepts behind ffmpeg/video.

FPS means frame per second , for example

25fps -> 25 frames captured in a second

From the display perpective

25 frames need to be displayed in a second.

correct me if i am wrong?

Now i have written a simple video player in ffmpeg to display. i read frames by av_read_frame(), if fps is 25, then does

 av_read_frame()

returns 25 frames per second? how can i relate it?

1 Answer 1

1

Read and write operations don't have to honor the data rate of the stream in question. Instead, they happen without any delays as soon as possible. After all, if you transcode a file, you are typically not interested in doing it at 100% playback speed and more likely you are interested in having it completed quickly, as quick as reading, writing, encoding etc. allows.

Any source generating content is interested to properly time stamp it, attaching frame rate and individual timestamps, so that playback could reproduce the stream accurately, including relatively to other streams ("lipsync").

Any presentation system is interested in presenting data taking into consideration time stamps, adding delays and idle time if/when necessary, so that playback is accurate.

Everything else in between, including av_read_frame, only cares for not losing timings attached to data, and is executed without any delays (in case of av_read_frame returning you as many frames per second as it can).

Your Answer

Reminder: Answers generated by Artificial Intelligence tools are not allowed on Stack Overflow. Learn more

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.