When using .kkapture with OpenGL GPU plugin (unsure about OGL2 plugin), the capture files seem to be missing load/duplicate frames that the software GPU has. The audio can also be messed up for the OpenGL capture. To fix this, try the following:
1. Capture with OpenGL plugin without audio (we will use software audio) at normal 60 FPS (there may be exceptions to this)
2. Capture with software plugin with audio
3. Create the dup and times file for the software capture making sure you only get the unique frames. For example:
Language: AviSynth
AVISource("software.avi")
ExactDedup(firstpass=true, dupinfo="software_dups.txt", times="software_times.txt", maxdupcount=999999)
4. Create the dup and times file for the OpenGL capture making sure you only get the unique frames. For example:
Language: AviSynth
AVISource("OpenGL.avi")
ExactDedup(firstpass=true, dupinfo="OpenGL_dups.txt", times="OpenGL_times.txt", maxdupcount=999999)
5. Compare the amount of unique frames the software capture has versus the OpenGL capture. You can do this by setting ExactDedup parameter "firstpass" to false and open up the AVS in VDub to get a frame count. If the amount of unique frames are different, see below under "What to do if the frame count is different"
6. Do a quick check to see if the two captures have the same unique frames. You can do this by opening both of the captures with only unique frames up and go to a random frame number on both captures and compare to see if they are the same
7. Encode the OpenGL capture using the times file created with the software capture. For example:
The AVS being sent to x264:
Language: AviSynth
AVISource("OpenGL.avi")
ExactDedup(firstpass=false, dupinfo="OpenGL_dups.txt", maxdupcount=999999)
Notice dupinfo is using "OpenGL_dups.txt"
The x264 line:
x264.exe --tcfile-in "software_times.txt" --output OpenGL.mkv OpenGL.avs
Notice tcfile-in is set to "software_times.txt"
8. When combining the audio with the OpenGL encode, use the audio from the software capture
What to do if the frame count is different
Assuming the count difference is minimal, there are a couple of solutions. If there are more unique frames in the OpenGL capture than the software capture, you could do one of the following:
1. It's more than likely the OpenGL has some near duplicate frames that was just rendered a bit off, so you can compare the two captures, find those extra frames, and remove them with DeleteFrame lines added in the AVS
2. You could also just modify the software_times.txt file to add in new times for those near duplicate frames in the OpenGL capture
Now, if there are more unique frames in the software capture than the OpenGL capture, you could do one of the following:
1. Modify the software_times.txt to remove the times of extra frames that don't exist in the OpenGL capture
2. Make a duplicate OpenGL frame to act as the extra frame in the software capture via using trim
If the difference in unique frames is not small, I don't really have a solution.
Here is an example fix using Spike's Crash sample (requires 64-bit AviSynth or get the 32-bit versions of the plugin) (FixFPS
here) (Also can use
VFRtoCFR to do the same thing):
https://www.mediafire.com/file/gx22ljdn3fcpx2r/Crash.zip/file