mkanar
17th February 2002, 16:58
DSPGuru or other,
This question has to do with the audio part of video capture. I'm placing this message in this forum as those in this forum tend to have a more accurate and mathematical understanding of audio datarate/conversion than others. :) I make statements here
I am capturing video+audio at 29.9706fps (frames per second). VirtualDub actually calculates a more specific and accurate fps during capture. I assume that VirtualDub assumes that its calculated fps is accurate; this seems pretty simple, as I assume it is dividing the clock against the number of frames received from the video capture driver.
Anyhow, VirtualDub then calculated the relative audio frequency; maybe against the clock or maybe against the fps? There has been discussion that sound cards are inaccurate and that the relative frequency of capture varies during the capture. However, my tests with my various sound cards shows that each sound card captures at an inaccurate but consistant datarate. For example, my Dell machine captures at 44107.01 Hz. However, VirtualDub stores a flag in the AVI somewhere that describes the embedded audio frequency as being 44100Hz, the intended frequency. VirtualDub does however have an option when I open an AVI file for modification so that I can force the audio frequency to 44107Hz. Unfortunately, this value of 44107Hz is used by VirtualDub, but not stored back within the AVI file; I have posted a message in the capture forum to see if I can change the AVI file myself to reflect this more accurate value. Opening the AVI file with an audio frequency of 44107Hz is important because otherwise the length of the audio and video streams differ and thus will become out-of-sync.
My question here is what is more accurate in changing the audio frequency back to the standard 44100Hz: resampling the audio from 44107Hz to 44100Hz or simply cutting out 7 out of every 44107 samples (spaced-out) (I think that SSRC might use this method). In other words, what is more accurate: playing the 44107Hz-relative-datarate audio back as 44100Hz or 44107Hz?
I realize that the sound card can't play back 44107Hz. I ask this question so that I can understand if it is better to resample or cut-out-samples in order to match the length of the audio and video.
Thanks,
MKanar
This question has to do with the audio part of video capture. I'm placing this message in this forum as those in this forum tend to have a more accurate and mathematical understanding of audio datarate/conversion than others. :) I make statements here
I am capturing video+audio at 29.9706fps (frames per second). VirtualDub actually calculates a more specific and accurate fps during capture. I assume that VirtualDub assumes that its calculated fps is accurate; this seems pretty simple, as I assume it is dividing the clock against the number of frames received from the video capture driver.
Anyhow, VirtualDub then calculated the relative audio frequency; maybe against the clock or maybe against the fps? There has been discussion that sound cards are inaccurate and that the relative frequency of capture varies during the capture. However, my tests with my various sound cards shows that each sound card captures at an inaccurate but consistant datarate. For example, my Dell machine captures at 44107.01 Hz. However, VirtualDub stores a flag in the AVI somewhere that describes the embedded audio frequency as being 44100Hz, the intended frequency. VirtualDub does however have an option when I open an AVI file for modification so that I can force the audio frequency to 44107Hz. Unfortunately, this value of 44107Hz is used by VirtualDub, but not stored back within the AVI file; I have posted a message in the capture forum to see if I can change the AVI file myself to reflect this more accurate value. Opening the AVI file with an audio frequency of 44107Hz is important because otherwise the length of the audio and video streams differ and thus will become out-of-sync.
My question here is what is more accurate in changing the audio frequency back to the standard 44100Hz: resampling the audio from 44107Hz to 44100Hz or simply cutting out 7 out of every 44107 samples (spaced-out) (I think that SSRC might use this method). In other words, what is more accurate: playing the 44107Hz-relative-datarate audio back as 44100Hz or 44107Hz?
I realize that the sound card can't play back 44107Hz. I ask this question so that I can understand if it is better to resample or cut-out-samples in order to match the length of the audio and video.
Thanks,
MKanar