Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

frame rate vs sample rate

What is the difference between sample rate and frame rate? I tried to check a song and found sample rate and frame rate using java.They have same value, It makes me confuse.

doesn't frame consist of many sample?

thank you

like image 431
wendy0402 Avatar asked Oct 25 '13 12:10

wendy0402


People also ask

Is sample rate the same as frame rate?

For PCM, A-law and μ-law data, a frame is all data that belongs to one sampling intervall. This means that the frame rate is the same as the sample rate.

Does higher sample rate mean better quality?

Sample rate is the frequency at which snapshots of an analog signal are recorded. Thus the more snapshots per second, the higher the sample rate and the better the quality. With that being said, there is a limit of a “practical” sample rate.

How many audio samples are in a frame?

A frame consists of exactly one sample per channel. If there is only one channel (Mono sound) a frame is simply a single sample. If the sound is stereo, each frame consists of two samples, etc. is 8 bits, and we're handling mono sound, the frame size is one byte.

Does FPS matter for audio?

Frame rate applies to picture, not audio. Audio is measured by sample rate (typically 44.1 or 48kHz), bit depth (typically 16 or 24), and bit rate (96–320kbits/sec for mp3).


2 Answers

read the documentation

Sample rate = number of samples / second

Frame = 1 sample from each channel (PCM)

Frame Size = Sample size * Channels

Frame Rate = frames / second.

For PCM the sample rate and the frame rate are the same since a frame consists of a a sample from each channel

like image 125
msam Avatar answered Sep 21 '22 04:09

msam


From: http://www.jsresources.org/faq_audio.html#frame_rate

For PCM, A-law and μ-law data, a frame is all data that belongs to one sampling intervall. This means that the frame rate is the same as the sample rate.

For compressed formats like Ogg Vorbis, mp3 and GSM 06.10, the situation is different. A frame is a block of data as it is output by the encoder. Often, these blocks contain the information for several sampling intervalls. For instance, a mp3 frame represents about 24 ms. So the frame rate is about 40 Hz. However, the sample rate of the original is preserved even inside the frames and is correctly restored after decoding.

like image 33
greg-449 Avatar answered Sep 21 '22 04:09

greg-449