finalburnneo / FBNeo

FinalBurn Neo - We are Team FBNeo.
http://neo-source.com
Other
879 stars 354 forks source link

[Fixed] desync #1797

Closed player987386 closed 1 week ago

player987386 commented 3 weeks ago

Rules and recommendations

player987386 commented 3 weeks ago

Hi!

Whenever I record a CPS-1/CPS-2 game via "Record AVI" option, I get a progressive audio desync in the AVI file. The problem starts at some 7-8 minutes video, the audio starts to delay. The desync doesn't occur in AVI recorded from other systems.

I did some tests (tried other FB versions, other games, screen capture, other codecs, etc) and the problem seems exclusive to Capcom CPS games/FBN "Record AVI" option, since the screen capture test didn't show any desync. I'd be glad to elaborate on my tests if needed, and suply some recorded gameplays for the matter.

BTW, I tried Konami games (Vendetta and TMNT) and Mortal Kombat I and II. No desync.

Thanks for your attention!

dinkc64 commented 3 weeks ago

Hi player987386, I need to reproduce the problem on my side so I can fix it, so I need a little more info:

Could you tell me exactly the game or games you've noticed it with? Please zip/attach your config/fbneo*.ini file and recorded gameplays of the games which the problem appears when recorded to avi.

best regards,

player987386 commented 3 weeks ago

@dinkc64 glad to chat with u again! :)

At the moment, I'm using a FBN version you did to fix an Aero Fighters 2 sound issue. Info says:

FBN 1.0.0.03 build on Feb 20 2023, 07:05:57

Do you need the testing done on the last nightly build? I ask because, as I said, I've detected it in other FB versions like Fightcade 2 and an old FB version I still use ocasionally.

If so, I'll have to re-do the gameplays (not a problem, btw! :) )

dinkc64 commented 3 weeks ago

Hey there! :)

Yes, you'll have to use the latest - but, see if the replay from that version will play back with the new exe from the usual spot: https://github.com/finalburnneo/FBNeo/releases/tag/latest

I can't remember if things were changed since then which would affect the recordings..., or not :)

best regards,

player987386 commented 3 weeks ago

Hi! My tests so far:

TMNT (oceania 2 players, version ?); no desync Vendetta (world, 2 players, ver. W); no desync Mortal Kombat 3 (rev 2.1); no desync Street Fighter II': Champion Edition (Red Wave PtII, bootleg); desync Super Street Fighter II Turbo (World); desync Captain Commando (World 911202); desync

I'm sending you all these replays, and my fbneo.ini. You can notice the desync after some 5-6 minutes. (TMNT and Vendetta were recorded on the old FBN version, but works perfectly on the current build)

All games recorded on default settings.

codec used: x264vfw (I've tried XviD as well; same issue)

As a side note, I demuxed the audio and video from a desynched AVI, did a screen record of the game and then muxed the audio with the new video. Result was perfectly synched, with makes me conclude the problem is in the video recording, if that makes sense.

Feel free to ask further testing. :)

recordings.zip

dinkc64 commented 3 weeks ago

Hi, Thanks for the info's and files I rendered out ssf2t for about 7 minutes, using x264vfw. I'm not really sure I can tell the difference near the end or beginning of the video. Are any of the desyncs more noticible than others?

best regards,

player987386 commented 3 weeks ago

Since the desync is progressive, try to render ssf2t entire replay or at least until the last round. You'll notice the desync at the end of the first round against Akuma. When he's knocked out and fall to the ground, the bump sound comes some half second later (should be perfectly synched).

EDIT: here's a Youtube link https://www.youtube.com/watch?v=_xpCnrPDyXA codec: x264vfw no further editing, just uploaded it as-is

Check out when Sagat and Akuma hit the ground, the bump sound should be exactly synchronous.

dinkc64 commented 3 weeks ago

Hi, Thanks for the clarification & helping me to understand the issue, I have a test-fix for you to try at the usual spot: https://github.com/finalburnneo/FBNeo/releases/tag/latest

best regards,

player987386 commented 3 weeks ago

Amazing! Did a bunch of CPS 1/2 recordings today and they're perfectly synched! Thank you very much @dinkc64 !! :D

Games tested:

SF II' Champion Edition (World) Captain Commando (World) SSF II Turbo (World) Dungeons & Dragons: Shadow Over Mystara (Plus Hack)

I can test other games but, for now, I'd say the issue was fixed!

Out of curiosity: how did you find the problem? I wonder how it went unnoticed since probably forever... o.O

dinkc64 commented 3 weeks ago

Great, that's good news!

A bit on that process: I thought about the differences in those systems, and noted the ones that didn't have a problem operated at 60hz. The cps1/2 games operate at 59.63hz (or so). Then I took at look at how the avi writer calculates the frames and after a bit of messing around, I found that it wasn't correctly tallying the buffer sizes for games that aren't 60hz, yikes!

best regards,

player987386 commented 3 weeks ago

Interesting. Makes total sense. :)

Before close the issue with a "fixed" tag, I'd like to leave a sugestion: would it be possible to have a toggle/hide frame counter option during the recordings replay? There are people (not my case, but...) who preffer to capture the screen via OBS or similar apps.

dinkc64 commented 3 weeks ago

I think its shift+backspace to toggle the frame counter

player987386 commented 3 weeks ago

I think its shift+backspace to toggle the frame counter

oh, exactly! Would never figure it out!! 👍

Again, thank you for your attention and good will! See ya!!

dinkc64 commented 3 weeks ago

I should document that somewhere :)