IPB

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
Sound Card Internal Clock Sync
zerowalker
post May 16 2013, 22:30
Post #1





Group: Members
Posts: 268
Joined: 6-August 11
Member No.: 92828



I wonder if itīs possible to detect the clock sync?

As i have problems with Video/Audio sync when record, The audio plays a bit to fast (ca 75ms per hour), and i am currently solving it by assuming samplerate of 47999 (if recorded as 48000).
But i want to know if itīs the Sound Card that produce the problem, and i am looking for a way to see how it keeps sync, but as i am not that knowledgeable at this, i donīt know how to check it.

And the only thing that seems to come up, is that sound cards can have a bad clock sync.

My card is not an onboard, it's an Creative Sound Blaster ZxR.

Thanks!
Go to the top of the page
+Quote Post
saratoga
post May 16 2013, 23:43
Post #2





Group: Members
Posts: 5039
Joined: 2-September 02
Member No.: 3264



Generally you use the same clock for both audio and video to prevent this problem. What are you using?
Go to the top of the page
+Quote Post
DVDdoug
post May 16 2013, 23:50
Post #3





Group: Members
Posts: 2632
Joined: 24-August 07
From: Silicon Valley
Member No.: 46454



QUOTE
But i want to know if itīs the Sound Card that produce the problem
If you are recording sound separately through your soundcard, and not through your video camera or video capture device, yes.

QUOTE
...47999 (if recorded as 48000).
You've got an error of 1/48000? That seems pretty doggone accurate!!! Some cheap consumer soundcards can actually be off by a few percent! (Useless for anything "serious".) A garden-variety quartz crystal is usually rated for 50-100ppm, and that's about what I'd expect from a good soundcard/interface. (I don't think I''ve ever seen clock accuracy in the specs.)

Professional equipment has a master clock input to keep everything in-sync. The stand-alone master clocks that I know of are super-expensive (and super accurate). Absolute accuracy isn't usually that important, and there might be some more-affordable audio interfaces that have a master-cock output (and input). There is also some trick with a MIDI clock to keep multiple audio interfaces (with MIDI in/out) in-sync, but I'm not sure how that works.

I'm not sure if there is anything like that available in consumer/prosumer video equipment. Video equipment uses an SMPT Clock, but I' don't know if there is any consumer equipment with SMPTE inputs/outputs.

This post has been edited by DVDdoug: May 17 2013, 00:00
Go to the top of the page
+Quote Post
zerowalker
post May 16 2013, 23:55
Post #4





Group: Members
Posts: 268
Joined: 6-August 11
Member No.: 92828



QUOTE (saratoga @ May 16 2013, 23:43) *
Generally you use the same clock for both audio and video to prevent this problem. What are you using?


How do you do that?

What am i using, what do you mean?

If you wonder about the recording, i am talking about Recording on the PC, with recording the Audio Playback.
It happens all the time, as long as it doesnīt dynamicly resample (which solves it).

Here is a picture that i think generally proves the clock issue.

Go to the top of the page
+Quote Post
zerowalker
post May 17 2013, 00:01
Post #5





Group: Members
Posts: 268
Joined: 6-August 11
Member No.: 92828



QUOTE (DVDdoug @ May 16 2013, 23:50) *
QUOTE
...47999 (if recorded as 48000).
You've got an error of 1/48000? That seems pretty doggone accurate!!! Some cheap consumer soundcards can actually be off by a few percent! (Useless for anything "serious".) A garden-variety quartz crystal is usually rated for 50-100ppm, and that's about what I'd expect from a good soundcard/interface. (I don't think I''ve ever seen clock accuracy in the specs.)

Professional equipment has a master clock input to keep everything in-sync. The stand-alone master clocks that I know of are super-expensive (and super accurate). Absolute accuracy isn't usually that important, and there might be some more-affordable audio interfaces that have a master-cock output (and input). There is also some trick with a MIDI clock to keep multiple audio interfaces (with MIDI in/out) in-sync, but I'm not sure how that works.

I'm not sure if there is anything like that available in consumer/prosumer video equipment. Video equipment uses an [url=http://en.wikipedia.org/wiki/SMPTE_timecode]SMPT Clock, but I' don't know if there is any consumer equipment with SMPTE inputs/outputs.


I donīt think a Master Clock is for what i am doing, you are talking about Video/Audio production, as in broadcast and studios right?
Go to the top of the page
+Quote Post
saratoga
post May 17 2013, 01:22
Post #6





Group: Members
Posts: 5039
Joined: 2-September 02
Member No.: 3264



QUOTE (zerowalker @ May 16 2013, 18:55) *
QUOTE (saratoga @ May 16 2013, 23:43) *
Generally you use the same clock for both audio and video to prevent this problem. What are you using?


How do you do that?


The easiest way is to use the same device to record both audio and video.

QUOTE (zerowalker @ May 16 2013, 18:55) *
Here is a picture that i think generally proves the clock issue.


I don't know what that is a picture of, but my point is that if you have multiple clocks you will not have audio and video in sync after recording long enough. I'm surprised you only gain 75ms per hour. Thats quite good.
Go to the top of the page
+Quote Post
zerowalker
post May 17 2013, 01:26
Post #7





Group: Members
Posts: 268
Joined: 6-August 11
Member No.: 92828



QUOTE (saratoga @ May 17 2013, 01:22) *
QUOTE (zerowalker @ May 16 2013, 18:55) *
QUOTE (saratoga @ May 16 2013, 23:43) *
Generally you use the same clock for both audio and video to prevent this problem. What are you using?


How do you do that?


The easiest way is to use the same device to record both audio and video.

QUOTE (zerowalker @ May 16 2013, 18:55) *
Here is a picture that i think generally proves the clock issue.


I don't know what that is a picture of, but my point is that if you have multiple clocks you will not have audio and video in sync after recording long enough. I'm surprised you only gain 75ms per hour. Thats quite good.


Well i am using same device, all is done internally.
Well from the PC, a game, recording or whatever i do to record from the audio card (I am not talking about capturing from outside, itīs all done from playback).

The picture shows Virtualdub, and i am recording randomly just to let it check my samplerate (itīs the only way i could think of to check the sync).
And as you can see, itīs set to 47999 (itīs fluctuating a bit though), but i am recording at 48000.
So it will go out of sync, and 47999 vs 48000 is about 75ms per hour.
Go to the top of the page
+Quote Post
saratoga
post May 17 2013, 01:44
Post #8





Group: Members
Posts: 5039
Joined: 2-September 02
Member No.: 3264



QUOTE (zerowalker @ May 16 2013, 20:26) *
QUOTE (saratoga @ May 17 2013, 01:22) *
QUOTE (zerowalker @ May 16 2013, 18:55) *
QUOTE (saratoga @ May 16 2013, 23:43) *
Generally you use the same clock for both audio and video to prevent this problem. What are you using?


How do you do that?


The easiest way is to use the same device to record both audio and video.

QUOTE (zerowalker @ May 16 2013, 18:55) *
Here is a picture that i think generally proves the clock issue.


I don't know what that is a picture of, but my point is that if you have multiple clocks you will not have audio and video in sync after recording long enough. I'm surprised you only gain 75ms per hour. Thats quite good.


Well i am using same device, all is done internally.
Well from the PC, a game, recording or whatever i do to record from the audio card


What sound card do you have that can record video?
Go to the top of the page
+Quote Post
hlloyge
post May 17 2013, 07:43
Post #9





Group: Members
Posts: 699
Joined: 10-January 06
From: Zagreb
Member No.: 27018



Yeah, but you don't have correct frame rates for either video or audio. There is checkbox while capturing to sync either video to audio, or audio to video. Set the correct frame rate for your video (I'll assume it's NTSC, so 29,97) and sync audio to video. If it fails, try the other way.
Go to the top of the page
+Quote Post
Arnold B. Kruege...
post May 17 2013, 13:29
Post #10





Group: Members
Posts: 3930
Joined: 29-October 08
From: USA, 48236
Member No.: 61311



QUOTE (zerowalker @ May 16 2013, 18:55) *
QUOTE (saratoga @ May 16 2013, 23:43) *
Generally you use the same clock for both audio and video to prevent this problem. What are you using?


How do you do that?


You use a video capture card that has its own audio interface.

As a rule, video capture cards that have their own audio interfaces clock the audio and video capture functions from the same clock.


Go to the top of the page
+Quote Post
zerowalker
post May 17 2013, 17:34
Post #11





Group: Members
Posts: 268
Joined: 6-August 11
Member No.: 92828



I have been a bit uninformative i think.

I am NOT capturing from outside the PC (VCR Console Broadcast etc).

I am recording what the PC displays or produces.

For example recording games, but it doesnīt really matter what i record.

It will always be desynced at about 47999 (if recorded as 48000), the audio is always off, probably even if i only record audio with no video at all (though then i donīt know how to check the sync, as i got nothing to compare to.)

Go to the top of the page
+Quote Post
pdq
post May 17 2013, 18:36
Post #12





Group: Members
Posts: 3420
Joined: 1-September 05
From: SE Pennsylvania
Member No.: 24233



I know nothing about VirtualDub, but does the fact that it inserted 3 frames (i.e. 100mSec) have anything to do with the video running longer than the audio?
Go to the top of the page
+Quote Post
zerowalker
post May 17 2013, 19:09
Post #13





Group: Members
Posts: 268
Joined: 6-August 11
Member No.: 92828



QUOTE (pdq @ May 17 2013, 18:36) *
I know nothing about VirtualDub, but does the fact that it inserted 3 frames (i.e. 100mSec) have anything to do with the video running longer than the audio?


Not in this case. It happens no matter what.
I am starting to think that it has to do with the motherboard, but itīs not a fault in it really.
Itīs very hard to find any information on this stuff, i guess itīs because no one really cares, 75ms per hour isnīt that much.
But i get frustrated by it.

I can solve it more or less by resampling and stuff, but it just shouldnīt be needed.
Go to the top of the page
+Quote Post
zerowalker
post May 20 2013, 08:31
Post #14





Group: Members
Posts: 268
Joined: 6-August 11
Member No.: 92828



Does anyone know a way to compare playback to recording?

In another words.

I have a file wave file that plays a tone for 8 hours.

And the application (or whatever way to do it), will play that file, and compare it to what actually being played.

Comparing frequency, so it's possible to detect what the distortion is.

Something like how this seems to work:

http://www.agm.me.uk/blog/2007/09/soundcar...ck-accuracy.php

But it doesnīt work for my, maybe itīs only for older OSes.
But the application is supposed to compare the soundcard clock to the system clock, which i guess is what i am trying to do, so i can get the difference.

This post has been edited by zerowalker: May 20 2013, 08:34
Go to the top of the page
+Quote Post
phofman
post May 20 2013, 12:03
Post #15





Group: Members
Posts: 310
Joined: 14-February 12
Member No.: 97162



Did you record and analyze the screencast on the same PC, i.e. using the same soundcard?

How did you create the video/audio file you are analyzing? Was video/audio recorded into the same video file, or merged from separate video and audio files later on? What software did you use for recording?

Was the recorded sound produced by the PC itself, or recorded via mic input (i.e. the soundcard)?
Go to the top of the page
+Quote Post
zerowalker
post May 27 2013, 07:23
Post #16





Group: Members
Posts: 268
Joined: 6-August 11
Member No.: 92828



QUOTE (phofman @ May 20 2013, 13:03) *
Did you record and analyze the screencast on the same PC, i.e. using the same soundcard?

How did you create the video/audio file you are analyzing? Was video/audio recorded into the same video file, or merged from separate video and audio files later on? What software did you use for recording?

Was the recorded sound produced by the PC itself, or recorded via mic input (i.e. the soundcard)?


I analyzed the Waveform on the same PC using the same soundcard, correct.
With that, there is no problem, itīs the same ocmpared to the generated waveform.
If i compare to a video it isnīt.

The video and audio was recorded in the same file.
Doesnīt matter what software, but i use dxtory.

The sync is always off by the same amount.
I am pretty sure it has something to do with a clock drift occurring between the Sound Card clock and Multimedia clock.

The recorded sound was produced by the PC itself.
I am pretty sure i will get the same problem if i record outside through line in or mic aswell.

For example, if i record with my USB Mic the sync is off by another amount, as itīs clock is different.
Go to the top of the page
+Quote Post
AndyH-ha
post May 27 2013, 09:47
Post #17





Group: Members
Posts: 2210
Joined: 31-August 05
Member No.: 24222



Different clocks will essentially always be different. What would be rare and unusual is two that run exactly at the same frequency. It might be possible if one had a large pool from which to choose. One might be able to find two that just happened to be close enough not to make a difference.

The differences are small with good equipment but they are enough that things will be noticeably out of synch if the recording is very long. The exact clock frequency isn't important. The important thing is that everything stays together. That is why any professional setup always uses one single clock for everything.

This post has been edited by AndyH-ha: May 27 2013, 09:49
Go to the top of the page
+Quote Post
zerowalker
post May 27 2013, 10:09
Post #18





Group: Members
Posts: 268
Joined: 6-August 11
Member No.: 92828



QUOTE (AndyH-ha @ May 27 2013, 10:47) *
Different clocks will essentially always be different. What would be rare and unusual is two that run exactly at the same frequency. It might be possible if one had a large pool from which to choose. One might be able to find two that just happened to be close enough not to make a difference.

The differences are small with good equipment but they are enough that things will be noticeably out of synch if the recording is very long. The exact clock frequency isn't important. The important thing is that everything stays together. That is why any professional setup always uses one single clock for everything.


Yeah but the thing is, if i record something on the PC, what clock is it going after?
I guess there must be to clocks, Audio Clock and Video Clock.

What i want to do, is to know the difference between them, if i know the difference, i can compensate for it.
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 21st October 2014 - 11:55