clementgallet / libTAS

GNU/Linux software to (hopefully) give TAS tools to games
GNU General Public License v3.0
496 stars 56 forks source link

Mame encode at half speed #380

Open clementgallet opened 3 years ago

clementgallet commented 3 years ago

From Karwood:

when I'm recording MAME TAS at 30FPS (instead of 60), the encoded video ends up running at 1/2 game speed, regardless of requested encode framerate (IE, the MKV runs at the requested fps, the game runs at 15fps)

I triple checked in triplicate- playing arcade games in MAME, and setting libTAS to 30 frames per second in general options to record the clickstream movie results in a playback encoding of an MKV video file that runs at 1/2 speed with stuttering audio (which I think is playing the 'correct' audio every other frame) Also regardless of what framerate the video encoder is set to encode in h.264, the result is an encode at the rate set in general options. setting libTAS general options to 60FPS or 120FPS works just fine

vadosnaprimer commented 3 years ago

I think matching the emulated machine's framerate is required to get the correct results with MAME, because every device may have its own framerate which isn't plain 60.

Numerator is always 1000000000. And denominator can be obtained through MAME Lua console (code for latest re;ease):

print(math.floor(manager.machine.screens:at(1).refresh_attoseconds/1000000000))