Author Topic: How does Dxtory capture audio?  (Read 17497 times)

zerowalker

  • Veteran
  • ***
  • Posts: 132
How does Dxtory capture audio?
« on: May 23, 2013, 08:12:52 pm »
As topic says. How does it capture it?
Does it go with Directsound, or Wasapi etc, trying to use it to figure out my sync issue.

ExKoder

  • Administrator
  • Saint
  • *****
  • Posts: 1204
    • ExKode
Re: How does Dxtory capture audio?
« Reply #1 on: May 23, 2013, 09:48:47 pm »
OS after Vista is implemented by the WASAPI system.

However, your question is meaningless.
Except OpenAL, WASAPI is used internally.

zerowalker

  • Veteran
  • ***
  • Posts: 132
Re: How does Dxtory capture audio?
« Reply #2 on: May 23, 2013, 11:15:30 pm »
Okay, well i am trying to figure out what the correct desync is. How much does it desync.

So i am trying to make record a way to easily identify it by waveform.

But i don´t get desync when recording audio playback for some reason, i tried recording an 1khz tone for 1 hour and see if it ever changed, and it didn´t.

But when i record games, i get desync, always.

I guess it has to do with how an application is used, playback is probably more accurate, and therefore Desync doesn´t happen, while applications maybe is a bit faster as it goes by the system clock or something (as my system seems to have sync problems).

Do you have any idea?

And do you know a way to make an application play a tone forever, so i can record that window and sound with dxtory?
Caused that should be a way to accurately get a correct number.

zerowalker

  • Veteran
  • ***
  • Posts: 132
Re: How does Dxtory capture audio?
« Reply #3 on: May 24, 2013, 01:29:43 pm »
Exkoder, is it possible that it´s the video that goes out of sync?
Cause i can´t reproduce audio desync by looking at waveforms.

It seems to only happen in games, as there it´s  audiovisual, so i am starting to think that the video get´s recorded slightly faster than the audio,
is that possible?

Malix

  • Monster
  • ****
  • Posts: 402
    • Youtube channel
Re: How does Dxtory capture audio?
« Reply #4 on: May 24, 2013, 07:13:17 pm »
or, maybe for some reason some frames are dropped. ie, if you record with 30fps but occasionally only 29 were encoded, thus leaving one second "shorter"?

Of course this is a bit hard to verify unless you record some kind of clock display with milliseconds/framecount... :-\

zerowalker

  • Veteran
  • ***
  • Posts: 132
Re: How does Dxtory capture audio?
« Reply #5 on: May 24, 2013, 07:30:08 pm »
Doubt it, as the desync is always the same.
But if you know a way to try it out with clock display, i am all in, i am desperate;P

Malix

  • Monster
  • ****
  • Posts: 402
    • Youtube channel
Re: How does Dxtory capture audio?
« Reply #6 on: May 24, 2013, 07:47:19 pm »
hmm... tough.
Windows clock screensaver? :P
I recall fakenes http://fakenes.sourceforge.net/svn/ having some kind of framecount or such on screen if enabled.

the clock screensaver (the 3d bouncing clock display) might be easier though. verifying the recorded video might still be a bit cumbersome operation...

zerowalker

  • Veteran
  • ***
  • Posts: 132
Re: How does Dxtory capture audio?
« Reply #7 on: May 27, 2013, 11:28:59 pm »
I think i am trying to get somewhere.

It seems that Audio and Video uses different Clocks, and if they are off, there will be sync problems.

It seems that when recording, you could use Timestamps to correct sync and stuff.
Audio timestamps and Capture timestamps.

I don´t know how Dxtory does it, but it must use a certain clock that the audio needs to sync to.
And as the Soundcard is never the same as the Video clock, there is always desync, but it can be very low so most people don't notice.

Exkoder, how do Dxtory record?
Is it possible to let it record by using the Audio Clock as Master Clock to correct Video Timing?


zerowalker

  • Veteran
  • ***
  • Posts: 132
Re: How does Dxtory capture audio?
« Reply #8 on: May 29, 2013, 07:22:26 pm »
Okay Exkoder, i tried recording on another PC. The entire system was different, not the same soundcard, cpu motherboard etc.

And it has desync issues as well.

It as lower though, probably 20-30ms per hour.

EDIT:

Exkoder, when you Mux the Audio and Video, can you set a Master Stream for helping capture drift?
It should be possible, there is such an option in AVI Mux.

I think this can solve the problem.
« Last Edit: May 29, 2013, 07:40:55 pm by zerowalker »

Malix

  • Monster
  • ****
  • Posts: 402
    • Youtube channel
Re: How does Dxtory capture audio?
« Reply #9 on: May 29, 2013, 08:57:36 pm »
this might be really stupid thing to ask, but are you running hwmonitor (or other voltage/temperature monitoring apps?)

Last night even my editing stuttered. Did some drive benchmarking and noticed my read/write speeds jumped up and down all the time, all operations paused completely every other second. When I turned off hwmonitor, all stutter and jerkiness stopped... apparently asking temperatures from a hdd makes it "freeze" for a second.

I'd assume this could have weird effects during recording, so worth checking out, right? :)

zerowalker

  • Veteran
  • ***
  • Posts: 132
Re: How does Dxtory capture audio?
« Reply #10 on: May 29, 2013, 11:06:01 pm »
Sadly that's isn't the case:(

I think you also have desync issues, i think all have. But it's different for everyone, and you probably won't notice till 2hours of recording;S

zerowalker

  • Veteran
  • ***
  • Posts: 132
Re: How does Dxtory capture audio?
« Reply #11 on: June 07, 2013, 01:06:10 am »
Exkoder,

I noticed  a thing.

How come, Audio and Video is always the same length?

Well of course the should be the same, if they are synced.
But for example.

One of my sound card has a slower clock than the video, making for example. 1 hours become 1 hour and 5 seconds.

And in the recording, the audio and video is only 1 hour. So the audio will both be of sync, And the 5 seconds at the end is lost.


How is the audio and video recorded to the AVI?
If you care to explain in more detail surrounding this.

I would very much appreciate it!


EDIT:

If i can just get a timing long when recording that shows,
frames / video timestamp / Video Global Time.

If i get those, i can calculate the sync problem.




« Last Edit: June 07, 2013, 02:30:22 am by zerowalker »

De-M-oN

  • Veteran
  • ***
  • Posts: 166
Re: How does Dxtory capture audio?
« Reply #12 on: June 07, 2013, 04:47:29 am »
Have you checkmarked Synchronous Surface Lock and Wait for available Buffer?

I have no problems at all with my audio.

http://www.youtube.com/watch?v=JfCytLurL3w

zerowalker

  • Veteran
  • ***
  • Posts: 132
Re: How does Dxtory capture audio?
« Reply #13 on: June 07, 2013, 04:49:56 am »
Have tried everything, believe me:S

And if possible, please record something for a very long time (5 hours+).
I would suggest: Super Mario World, as it's intro goes in repeat.

I am pretty convinced you will get sync issues, but you probably don't notice it as it's so low.

De-M-oN

  • Veteran
  • ***
  • Posts: 166
Re: How does Dxtory capture audio?
« Reply #14 on: June 07, 2013, 04:51:59 am »