MathewWi / vba-rerecording

Automatically exported from code.google.com/p/vba-rerecording
GNU General Public License v2.0
0 stars 0 forks source link

Video/Audio length issue #25

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
VBA doesn't record a video in 60fps exactly. Sometimes, a frame is
duplicated, or over 1/60 seconds of audio samples are generated per frame.
As a result, a video/audio length becomes somewhat longer than vbm length.

I think I've understood why this happens now, the problem comes from the
sound emulation code.

VBA sometimes generates over 1/60 seconds of audio samples per frame (it's
a sort of emulation error, I assume). That causes an audio desync with
video frames. To prevent the desync, VBA needs to duplicate a frame to
match the video length to audio length.

To fix the problem, we need to modify the sound emulation code, and let VBA
generate 1/60 seconds of samples always. That may change movie timings, though.

Original issue reported on code.google.com by gochaism on 16 Mar 2009 at 10:16

GoogleCodeExporter commented 9 years ago
Issue 24 has been merged into this issue.

Original comment by gochaism on 16 Mar 2009 at 10:20

GoogleCodeExporter commented 9 years ago
Also, the real framerate of gameboy seems to be not 60 though. The real 
framerate is

1/((1/(16*1024*1024))*280896) = 59.7275006

Note: some documents may say 1/((1/16780000)*280896) = 59.7374117

The fact might be concerned to the problem, but I'm not sure.

Original comment by gochaism on 16 Mar 2009 at 11:41

GoogleCodeExporter commented 9 years ago
Oops, the formula above is the one for gba framerate, not older gameboy 
families.

Original comment by gochaism on 17 Mar 2009 at 12:02

GoogleCodeExporter commented 9 years ago
I'm a bit confused.

If the vbm vs AVI timings are off, then I don't see how the sound core changes 
would 
affect vbm timings.  If the emulator duplicates frames, then it would affect 
vbm 
timings (movies would be faster than on old versions) and there would be no 
discrepency between vbm & AVI.

I hope all that made sense.

Original comment by andres.d...@gmail.com on 19 Mar 2009 at 6:10

GoogleCodeExporter commented 9 years ago
I'm confused, too.

@adelikat: Are you suggesting that since the current frame timings independ on 
how
long sound samples are, fixing sound core timings won't affect VBM 
synchronization?

Original comment by aquan...@gmail.com on 25 Mar 2009 at 10:59