[hatari-devel] new support for avi recording

npomarede at corp.free.fr npomarede at corp.free.fr
Sun Oct 18 11:41:11 CEST 2009


On Sun, 18 Oct 2009, Eero Tamminen wrote:

>> summary could be : "if your pc is not fast enough to run hatari with
>> frame skip off, don't even try to record avi" :)
>
> In that case the AVI code should disable frameskip when the recording
> starts and restore it when stopped.  Best would be if it would ask user
> confirmation for this if frameskip is enabled[1], or at least notify user
> that frameskip was disabled[2].
>
> [1]  if (nFrameSkips) DlgAlert_Query(..);
> [2] if (..) DlgAlert_Notice(..)

I'm not sure this is really useful, we can keep frameskip to copy data 
from atari's video memory to the SDL surface, but we must save one video 
frame on every vbl. So, if you have frame skip resulting in 25 fps, you 
will get twice each video frame in the avi file if recording at 50 
fps.
So, you will get the same thing in your avi file as what was displayed on 
the screen. And if you play the avi, you will get what you saw on screen 
while recording (that is same skipping effect).

I'm not sure we should add a dialog for this ; I will mention in the doc 
that frameskip should be off for best results, but if a user want to 
record anyway with frameskip to be able to play a game in "real time", why 
not ? I don't think we should turn off fskip automatically.

>> If frame skipping is constant (that is 25 fps for example), it is
>> theorically possible to mix 25 fps video with 50 "fps" audio, but the
>> use case is not worth the coding complexity.
>
> In this case, how "--avi-fps" / "AviRecordDefaultFps" can work?
>
> Shouldn't the recording FPS rate be then taken directly from the Hatari
> internal screen update frequency  (nScreenRefreshRate: 50, 60, 71Hz)?
>

This is what is done in most cases, but as I wrote in a previous mail, if
the first frames you're recording are 60 Hz and the rest is 50 Hz, this 
can help to force the FPS in the avi header. Of course, the 60 Hz frames 
will look like being played to slow, but then the 50 Hz frames will be 
fine.

Only use I see for this is when you want to record an Atari after reboot. 
In that case, the shifter starts at 60 Hz, then goes to 50 Hz latter 
(depending on your country). But as the booting phase only display a white 
screen, you won't be able to notice you're playing 60 Hz at 50 Hz.
If we had used nScreenRefreshRate in that case, the whole video would be 
marked as 60 Hz and would look bad when played.


Nicolas



More information about the hatari-devel mailing list