[FFmpeg-devel] Calculating audio frame rate

Eran Kornblau eran.kornblau at kaltura.com
Tue Mar 3 09:22:16 EET 2020


Hi all,

First, I apologize for asking a question not directly related to ffmpeg development, but hope you can still help me...

I'm looking for some code to calculate the frame rate of audio, based on parameters such as the codec id,
sampling rate, channels, codec private data etc.
For example, if the codec is AAC and the sampling rate is 44.1KHz, the frame rate would be 44100/1024= ~43 fps
(assuming each frame has 1024 samples, not 960)

Has anyone ever written/bumped into something that implements this across multiple codecs?

Thank you!

Eran



More information about the ffmpeg-devel mailing list