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.
OS after Vista is implemented by the WASAPI system.
However, your question is meaningless.
Except OpenAL, WASAPI is used internally.
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.
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?
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... :-\
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
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...
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?
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.
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? :)
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
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.
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
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.
No I dont.
http://www.youtube.com/watch?v=0I7jP7Q5f8c
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.
I'm pretty sure it is also with over 5 hours the case :P
But 5 hours is a little bit very time consuming :-\
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
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.
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.
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:)
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.
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.
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.
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.
Actually, I take that back, audio and video are NOT the same length.
(https://dl.dropboxusercontent.com/u/7484348/track_diff.png)
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).
Just remove the too long audio part so that it is exactly at the .xxx ms same length as the video is.
Quote from: 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.
doesn't change the fact that the audiosync is way off.
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.
anyhoo, I'll be making another test overnight and see if anything changes.
Also,
Quote from: 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).
Can't. I was a bit too fast to delete the recording :P
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.
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.
Quoteanyhoo, I'll be making another test overnight and see if anything changes.
Please do, i am eager to see what the results are.
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 ..
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.
Fraps records without filtering as well.
but you have synchronous surface lock enabled? sry if I asked already.
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?
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
========== 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.
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.
could probably try the NES-emulator recording tonight with Fraps to rule out my system derping.
Please do.
Here is information from my 16 hour clip:
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)
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
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.
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 :/
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.
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.
Newer fraps versions have a checkmark option if they should do 4 GB splits or not.
QuoteAnother 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.
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.
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.
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.
You're right. I was able to fix it by installing 3rd party sound card drivers from PAX. Creative makes such horrible software.
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)
QuoteThesycon'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 :)
So, did all I could with the xonar drivers & latencies, no dice. DxTory audio still goes off sync with time.
*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.
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.