ExKode Forum

Dxtory => Help & Support => Topic started by: zerowalker on May 23, 2013, 08:12:52 pm

Title: How does Dxtory capture audio?
Post by: zerowalker 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.
Title: Re: How does Dxtory capture audio?
Post by: ExKoder 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.
Title: Re: How does Dxtory capture audio?
Post by: zerowalker 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.
Title: Re: How does Dxtory capture audio?
Post by: zerowalker 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?
Title: Re: How does Dxtory capture audio?
Post by: Malix 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... :-\
Title: Re: How does Dxtory capture audio?
Post by: zerowalker 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
Title: Re: How does Dxtory capture audio?
Post by: Malix on May 24, 2013, 07:47:19 pm
hmm... tough.
Windows clock screensaver? :P
I recall fakenes http://fakenes.sourceforge.net/svn/ (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...
Title: Re: How does Dxtory capture audio?
Post by: zerowalker 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?

Title: Re: How does Dxtory capture audio?
Post by: zerowalker 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.
Title: Re: How does Dxtory capture audio?
Post by: Malix 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? :)
Title: Re: How does Dxtory capture audio?
Post by: zerowalker 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
Title: Re: How does Dxtory capture audio?
Post by: zerowalker 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.




Title: Re: How does Dxtory capture audio?
Post by: De-M-oN 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
Title: Re: How does Dxtory capture audio?
Post by: zerowalker 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.
Title: Re: How does Dxtory capture audio?
Post by: De-M-oN on June 07, 2013, 04:51:59 am
No I dont.

http://www.youtube.com/watch?v=0I7jP7Q5f8c
Title: Re: How does Dxtory capture audio?
Post by: zerowalker on June 07, 2013, 04:56:44 am
1 hour is to little to detect it on most cards.

The sync issues seems to be around 50ms per hour more or less, and either the audio goes to fast or to slow.

1 hour is to little to detect, and hard when you can't compare it, which you can't when you play games.
Which is why i recommend something that goes repeat all the time.

Cause if you really get NO sync issues at 5hours, then that is really something, and i have to try to understand why you don't get any sync issues.
Title: Re: How does Dxtory capture audio?
Post by: De-M-oN on June 07, 2013, 05:04:10 am
I'm pretty sure it is also with over 5 hours the case :P

But 5 hours is a little bit very time consuming  :-\
Title: Re: How does Dxtory capture audio?
Post by: zerowalker on June 07, 2013, 05:09:01 am
Hopefully it is, but i doubt it.
If it is, it would break what i have concluded;P

If you can have your PC on through when you sleep, please try and record Super Mario World,
It takes no space as it's 2D with Lagarith.

That's how i do it, as i would never record 5 hours of nothing just waiting;P
Title: Re: How does Dxtory capture audio?
Post by: zerowalker on June 09, 2013, 12:00:06 am
Exkoder,

Can i get a timing log option?
Cause as said, if i have a timing log, i will be able to get a precise number to sync, it will solve all my problems.
Title: Re: How does Dxtory capture audio?
Post by: ExKoder on June 09, 2013, 01:36:51 am
It will not solve the problem.
A special program is required in order to investigate.
Regrettably there is no excessive resource for carrying out the program development.
Title: Re: How does Dxtory capture audio?
Post by: zerowalker on June 09, 2013, 01:40:03 am
Why not?
If i can get the relative rate of the audio and video, it will be all i need to make it sync.

There is no need for a special program, all that´s needed is a log where it writes the frametimes and ms per byte for the audio.
Then the relative rate can be calculated and fixed:)
Title: Re: How does Dxtory capture audio?
Post by: ExKoder on June 09, 2013, 02:04:30 am
When it is an AVI file, it is a correct time stamp.
Even if it outputs a log, it will be equivalent to the time stamp calculated from AVI file.
For investigating what a cause is, special test is required.
I think that it is difficult to investigate this case since you are not an expert programer.
Title: Re: How does Dxtory capture audio?
Post by: zerowalker on June 09, 2013, 02:09:09 am
That depends.

If you output a log compare to how the sample and frametimes are recieved, than it will not be equal to the AVI timestamp.

As when the data is written, Dxtory assumes the AVI is correct, the Video and Audio is the same length also, which i guess comes from how it´s recorded.

Normally the Audio and Video will never be the same length over a long period of time. The audio will either grow shorter or longer then the Video, (if the recording isn't done by a single device and One sync clock).

I would like to know how you Dxtory manages to assume the sync?
Cause if you record with other softwares that does similar things, the audio and video will grow away from each other sooner or later.
Title: Re: How does Dxtory capture audio?
Post by: Malix on June 22, 2013, 05:56:39 am
Bump & resurrection of old thread

I just did a test recording out of curiosity, ~2hours of Nestopia (nes emulator)

Both video and audio tracks are the same length, but the audio starts to get delayed  quite a bit, roughly a half a second, at the end of the video.

edit:
recording settings were
60fps capture, lagarith (excessive, I know)
1 audio channel 44.1kHz, 16bit, stereo.

occasionally the recording fps dipped to 58fps, for whatever reason.

Going to make a new test with 30fps capture if the audio lags with that.
Title: Re: How does Dxtory capture audio?
Post by: zerowalker on June 22, 2013, 05:59:17 am
There you go:)

I am not alone, the problem exists, and differs from PC to PC, depending on the clock.

It´s weird that they are the same duration though, that has something to do with how Dxtory capture, or handles the streams, as normally, the audio stream and video stream are independent, and should be as long as it takes. But of course if they are in sync, they should be very close to each other.
Title: Re: How does Dxtory capture audio?
Post by: Malix on June 22, 2013, 06:26:18 am
Actually, I take that back, audio and video are NOT the same length.
(https://dl.dropboxusercontent.com/u/7484348/track_diff.png)
Title: Re: How does Dxtory capture audio?
Post by: zerowalker on June 22, 2013, 06:28:44 am
Hmm, very weird.
What does it say if you open the video, and check the wave file (tell me the duration of the video file, and the wave file).
Title: Re: How does Dxtory capture audio?
Post by: De-M-oN on June 22, 2013, 06:37:18 am
Just remove the too long audio part so that it is exactly at the .xxx ms same length as the video is.
Title: Re: How does Dxtory capture audio?
Post by: Malix on June 22, 2013, 06:40:11 am
Just remove the too long audio part so that it is exactly at the .xxx ms same length as the video is.
doesn't change the fact that the audiosync is way off.
Title: Re: How does Dxtory capture audio?
Post by: zerowalker on June 22, 2013, 06:40:46 am
If he removes it, it will still be desynced, he will have to stretch it, but making it the same length at video won´t make the sync precise, however it will probably be close.
Title: Re: How does Dxtory capture audio?
Post by: Malix on June 22, 2013, 06:43:01 am
anyhoo, I'll be making another test overnight and see if anything changes.

Also,
Hmm, very weird.
What does it say if you open the video, and check the wave file (tell me the duration of the video file, and the wave file).
Can't. I was a bit too fast to delete the recording  :P
Title: Re: How does Dxtory capture audio?
Post by: De-M-oN on June 22, 2013, 06:46:37 am
The streams themselfs are perfectly synchron. At least for me.

It is normal that the lengths differ.

For 30fps video a frame has a length of 33ms. Audio can be closed anytime.

DXTory closes the file as soon as possible. No computer does close 3 files at .xxx ms exact same time.

But if the streams arent synchron for you within the track - then thats an else problem with - how said - I cant in any way share with you. All perfect for me.
Title: Re: How does Dxtory capture audio?
Post by: zerowalker on June 22, 2013, 07:07:04 am
As i said before, record over night, and see if it is in perfect sync.
Probably the aren´t.

You probably are lucky with the Clock being fairly close, making it, maybe 30ms desync per hour, which isn´t noticable until 3hours+.

And as you say, audio and video shouldn´t be precise the same duration, which is what i mean that stretching them would make a sync, but it wouldn´t be perfect, as if they are the same duration, something isn´t right as they never are exactly the same.

The thing is, it´s better to have desync with streams that are in length according to the desync, then to have them close to length with each other (video,audio) as that will make the desynced information going away If the audio plays to slow, if it plays to fast, then it it´s possible to sync without loss of any "real" information.


Quote
anyhoo, I'll be making another test overnight and see if anything changes.

Please do, i am eager to see what the results are.
Title: Re: How does Dxtory capture audio?
Post by: De-M-oN on June 22, 2013, 07:12:56 am
I dont mean stretching, I just meant that you cut off the too long audio. This doesnt change the rest of the remaining audio of course.

But you say you have it also within the track, and thats strange..

I can remember a 3,5 hour doom 3 LP Together session, but that was with Fraps though.. But it was synchron 'til the end.
How said: It would wonder me if it would be with DXTory else. I had never synch problems with my pc ..
Title: Re: How does Dxtory capture audio?
Post by: zerowalker on June 22, 2013, 07:50:42 am
I think fraps have done something to get sync, i think they resample the audio or something.
Dxtory is pure, it gives you the Audio and Video without doing anything, which ends in higher quality.

I may be wrong though about the fraps resampling, but i do think it does something.

However, when i think about it, when i used fraps, i got desync as well, not sure if it was the same, but it probably was.
Hmm, well nto sure anymore.


But as said, desync with audio/video will never really give you any problem in normal use, it only affects recording.
The only way to solve it is by either letting the video and audio run on the same clock (best solution), or fixing the problem afterwards by slowin/speeding the audio, or video.
Title: Re: How does Dxtory capture audio?
Post by: De-M-oN on June 22, 2013, 07:57:59 am
Fraps records without filtering as well.

but you have synchronous surface lock enabled? sry if I asked already.
Title: Re: How does Dxtory capture audio?
Post by: zerowalker on June 22, 2013, 08:01:54 am
Well that explains the desync there aswell, however, i wonder how it does when you record a mic, as it adds it into the same stream.

And yes, have tried that, usually have that and Wait for available buffer on.

Doesn´t change the sync at all though.

Do you get desync if you have it off?
Title: Re: How does Dxtory capture audio?
Post by: Malix on June 22, 2013, 03:32:12 pm
Aand back after recording 6 hours of looping nes footage, I used UT codec & 30fps capture this time around.

The results are pretty much the same than the first time, my video goes more and more desync the further the video gets. At 1 hour mark, the sync is very slight, 2h mark it's noticeable and at the 6 hour mark it's roughly a full second off.
Also the audiotrack is roughly 1 second too long. For "lulz", I tried stretching the audio to same length as the video and then it seems to sync up perfectly... wow. :D


 My errorlog contained thousands of lines of this

Code: [Select]
========== 2013/06/21 22:42:14 ==========
PID:1784     C:\Program Files (x86)\Dxtory Software\Dxtory2.0\Dxtory.exe
PID:1784     TID:3540     TickCount:115129109 Logical Error eIndex=250000 m_DebugIndex=249999
PID:1784     TID:3540     TickCount:115129125 Logical Error eIndex=250001 m_DebugIndex=250000
PID:1784     TID:3540     TickCount:115129140 Logical Error eIndex=250002 m_DebugIndex=250001
PID:1784     TID:3540     TickCount:115129156 Logical Error eIndex=250003 m_DebugIndex=250002
PID:1784     TID:3540     TickCount:115129171 Logical Error eIndex=250004 m_DebugIndex=250003
PID:1784     TID:3540     TickCount:115129187 Logical Error eIndex=250005 m_DebugIndex=250004
PID:1784     TID:3540     TickCount:115129203 Logical Error eIndex=250006 m_DebugIndex=250005

but judging by the timestamp, that was for the first test I did


edit: did a test with another game, Gunpoint, ~1.5h of footage and towards the end the audiosync starts to drift off. Though video and audio tracks are the same length.

edit 2: some bit more specific data if needed
Timed the difference between jumping animation and accompanying sound in the Gunpoint recording
00:00:26,29 ~2 frames. https://dl.dropboxusercontent.com/u/7484348/gunpoint_1.avi (https://dl.dropboxusercontent.com/u/7484348/gunpoint_1.avi) ~2MB
01:23:53,20 ~9 frames https://dl.dropboxusercontent.com/u/7484348/gunpoint_2.avi (https://dl.dropboxusercontent.com/u/7484348/gunpoint_2.avi) ~10MB

so roughly 230ms of delay in audio in 1h23min of recording, that starts to get quite noticeable.
Title: Re: How does Dxtory capture audio?
Post by: zerowalker on June 23, 2013, 12:01:55 am
Interesting.

Though i´t´s very weird that your audio length is longer, i have a clip that is 16 hours long, and they are the same.

Hmm, may be game dependent though as it seems to differ for you.

But this proves that the problem exists.
Title: Re: How does Dxtory capture audio?
Post by: Malix on June 23, 2013, 12:11:34 am
could probably try the NES-emulator recording tonight with Fraps to rule out my system derping.
Title: Re: How does Dxtory capture audio?
Post by: zerowalker on June 23, 2013, 12:17:40 am
Please do.

Here is information from my 16 hour clip:

Code: [Select]

Video
ID                                       : 0
Format                                   : Lagarith
Codec ID                                 : LAGS
Duration                                 : 16h 11mn
Bit rate                                 : 20.0 Mbps
Width                                    : 897 pixels
Height                                   : 672 pixels
Display aspect ratio                     : 4:3
Frame rate                               : 60.000 fps
Color space                              : RGB
Bit depth                                : 8 bits
Bits/(Pixel*Frame)                       : 0.552
Stream size                              : 136 GiB (93%)

Audio
ID                                       : 1
Format                                   : PCM
Format settings, Endianness              : Little
Format settings, Sign                    : Signed
Codec ID                                 : 1
Duration                                 : 16h 11mn
Bit rate mode                            : Constant
Bit rate                                 : 1 536 Kbps
Channel(s)                               : 2 channels
Sampling rate                            : 48.0 KHz
Bit depth                                : 16 bits
Stream size                              : 10.4 GiB (7%)
Alignment                                : Aligned on interleaves
Interleave, duration                     : 1000 ms (60.00 video frames)
Title: Re: How does Dxtory capture audio?
Post by: Malix on June 23, 2013, 04:06:21 am
I might be on to something.

Zerowalker, are you per any chance using Virtual Audio Cables?

I noticed in my preliminary fraps tests that some NES sounds sounded a bit different every so often, it seemed that my VAC was over/underflowing occasionally.
Noticed my clock rates were fluctuating quite a bit, tweaked my settings & elevated priorities to make it more  stable.

It was easier to spot from simpler audio than from normal music or game audio :P
Title: Re: How does Dxtory capture audio?
Post by: zerowalker on June 23, 2013, 04:09:31 am
Nope, i am not using VAC at all.

I have been using my sound card output.
But has also tried the soundcard "what you hear" input, which plays what is, played (if you get what i mean;P)

And both give the exact same results.
Title: Re: How does Dxtory capture audio?
Post by: Malix on June 23, 2013, 10:17:34 pm
Testing done.

6 hours of fraps recording and no sound desync.

did a new test of 3 hours with dxtory, ~2/3rd second off & audio track longer than video. the sync can be fixed with stretching the audio track to same length as video, but I'd rather not. Wish this was fixed in DxTory side :/
Title: Re: How does Dxtory capture audio?
Post by: zerowalker on June 24, 2013, 12:13:20 am
Great!

Weird that Fraps isn´t wrong though, make me think that it may be resampling and stuff after all.
Though if it isn´t, and it just works, then it´s awesome!

And as you say, you shouldn´t need top fix it, as the problem shouldn´t even be there (at least not if it can be fixed).
Hope Exkoder looks into this.
Title: Re: How does Dxtory capture audio?
Post by: Mora on July 01, 2013, 03:41:49 am
Doesn't Fraps split the video in parts. Like 10mins each? Another simple fix would be to just stop and start recording every now and then, to reset the delay.
Title: Re: How does Dxtory capture audio?
Post by: De-M-oN on July 01, 2013, 04:01:23 am
Newer fraps versions have a checkmark option if they should do 4 GB splits or not.

Quote
Another simple fix would be to just stop and start recording every now and then, to reset the delay.
But dont forget to correct the lengths of the tracks for each file if you set them together later.
Title: Re: How does Dxtory capture audio?
Post by: Fish on July 17, 2013, 11:05:15 am
Add another to the list. Fraps (and other software) works perfectly for recording. Dxtory gives me out of sync audio. But it's happening much faster than described in this thread.

At about 20 seconds into the video, there's a noticeable desync of about 1/3 of a second (10 frames). Sometimes less, sometimes more. But that's about average.
Title: Re: How does Dxtory capture audio?
Post by: Fish on July 17, 2013, 11:31:26 am
Exkoder, for me this issue arose when I updated to the most recent Dxtory. I was running a version 2-3 versions old and it worked fine. Can you make older versions available for download for those of us having this issue?

UPDATE: You can disregard that idea. I tried various older version of Dxtory going back to 2.0.112, mixed with various versions of the Nvidia drivers going back to 314.22. It was a long process... and annoying. But the end result was that I'm still 1/4-1/2 second off on the audio of any files recorded with Dxtory. I also tested with Fraps at every stage -- No audio desync at all. Every video was also tested in BOTH Sony Vegas Pro 12 and Adobe Premiere Pro CC. The results were the same, regardless of the editing software.

My only guess is that it has something to do with Windows 8, since the last time I was recording regularly was when I was on Windows 7.
Title: Re: How does Dxtory capture audio?
Post by: zerowalker on July 17, 2013, 10:11:33 pm
Your problem isn´t the same as the threads.
The problem you are facing is caused by something, as it has various differences.

Our sync problem is the same all the time (it depends on hardware, but for me it´s about 75ms per hour).
Some people can have it speed up by 1 second per hour, or slow down by 1 seconds, it´s always different.
But it never changes, unless the user change the soundcard or perhaps motherboard.
Title: Re: How does Dxtory capture audio?
Post by: Fish on July 18, 2013, 06:43:54 am
You're right. I was able to fix it by installing 3rd party sound card drivers from PAX. Creative makes such horrible software.
Title: Re: How does Dxtory capture audio?
Post by: Malix on July 18, 2013, 04:22:57 pm
hmm, wonder if my issue could be fixed with drivers too, the asus xonar drivers have been said to be weak too.

OH WELL, maybe I'll break my system and try the UNi Xonar drivers (http://maxedtech.com/asus-xonar-unified-drivers/), since they have claim to have option for ridiculously low latencies and whatnot.

EDIT:
Now that I spent some time on UNi Xonar driver page, I came accross this: http://www.thesycon.de/eng/latency_check.shtml (http://www.thesycon.de/eng/latency_check.shtml)
Quote
Thesycon’s DPC Latency Checker is a Windows tool that analyses the capabilities of a computer system to handle real-time data streams properly. It may help to find the cause for interruptions in real-time audio and video streams
So, probably worth a try to see if there is something weird going on with audio stuff in general.

EDIT2:
Also found this: http://forums.guru3d.com/showpost.php?p=3770113&postcount=2 (http://forums.guru3d.com/showpost.php?p=3770113&postcount=2)
apparently having high precision event timer (HPET) enabled in bios is BAD for DPC latency.

EDIT3:
(well spent lunch @ work, heh)
Mixed opinions & results accross the board with HPET ON/OFF, also apparently win7 (probably 8, too) must be specifically told to ENABLE the use of HPET. go figure.

also, atleast my throwaway win7 laptop here went more stable & lower on DPC latency when I completely disabled core parking. Core parking basically is turning off "idling" cpu cores, windows does this way too aggressively, it seems. http://bitsum.com/about_cpu_core_parking.php (http://bitsum.com/about_cpu_core_parking.php)

Will do testing with DxTory when I get off from work :)
Title: Re: How does Dxtory capture audio?
Post by: Malix on July 19, 2013, 06:00:46 pm
So, did all I could with the xonar drivers & latencies, no dice. DxTory audio still goes off sync with time.
Title: Re: How does Dxtory capture audio?
Post by: Malix on August 20, 2013, 05:30:44 pm
*BUMP*

could this http://www.hwbot.org/news/9824_breaking_windows_8_benchmark_results_no_longer_accepted_at_hwbot/ (http://www.hwbot.org/news/9824_breaking_windows_8_benchmark_results_no_longer_accepted_at_hwbot/) be the cause for the audio/video sync drifting? Apparently Win8 has some weird clock drifting issues.
Title: Re: How does Dxtory capture audio?
Post by: De-M-oN on August 21, 2013, 05:44:15 am
Can you please do a test with 25fps.

I do for someone the audio editing in audition for his lets plays and so I get for every video his audiofiles and he records in 25fps and some other games in 30fps. His 25 fps videos have all the same length +40ms.

I mean

video is for example 35:10.500
then both audiotracks are 35:10.540.
Everytime the same lengths + 40ms.

His 30fps videos have always different difference between videolength and audiolength and also both audio tracks have then different lengths.