Page MenuHome

Animation Playback Delayed With Time Remapping And AV-Sync
Confirmed, NormalPublic


System Information
Operating system: Windows 10 64 bit
Graphics card: Nvidia GTX 750 Ti

Blender Version
Broken: 2.82.7 hash: 77d23b0bd76f

Short description of error
When an animation is played back while both

  • AV-Sync is enabled
  • Time Remapping is enabled

the animation playback starts with a delay (upon pressing spacebar).
The delay is the longer, the higher the current frame number is.
Also each time you start playback, it seems as if it started from 0.

Exact steps for others to reproduce the error

  1. Open file
  2. Don't move playhead
  3. Start playback

Notice a ~1s delay, before the cube or playhead actually starts moving.

Event Timeline

Richard Antalik (ISS) changed the task status from Needs Triage to Needs Information from User.Feb 24 2020, 5:10 PM

Can not reproduce this

Does this happen, when you click on File -> Defaults -> Load Factory Settings?

Philip Holzmann (Foaly) changed the task status from Needs Information from User to Needs Triage.Feb 24 2020, 6:36 PM

I ran with --factory-startup

I also just tried this on Linux with recent master and it happens as well.
commit 24ea6b713d7db459327cf2c62e8d596eebf74d59
Date: Sun Feb 23 16:52:43 2020 +0100

Note that the frame counter starts right away when you play the animation, but the cube starts to move with a delay.

Richard Antalik (ISS) changed the task status from Needs Triage to Confirmed.Feb 24 2020, 6:50 PM

I accidentally moved playhead to 0, so i didn't see the issue...

Sebastian Parborg (zeddb) changed the task status from Confirmed to Needs Information from User.Tue, Mar 24, 11:37 AM

I'm unsure if I am missing something obvious here... It seems to work fine for me with the latest master.
Has this issue been fixed or am I missing something?

Philip Holzmann (Foaly) changed the task status from Needs Information from User to Needs Developer to Reproduce.Tue, Mar 24, 3:44 PM

I just tried with a self-built master b759857825b80af98621c2ff4b52f106ab79576c Tue Mar 24 14:02:16 2020 +0100
and with the alpha from 94b8166a8b05

The issue still exists.

I don't know why it works for you.

Richard Antalik (ISS) changed the task status from Needs Developer to Reproduce to Confirmed.Tue, Mar 24, 4:37 PM

I can still confirm as well.

I have looked into this briefly, in screen_animation_step()

else if (scene_eval->id.recalc & ID_RECALC_AUDIO_SEEK) {
  /* Ignore seek here, the audio will be updated to the scene frame after jump during next
   * dependency graph update. */
else if ((scene->audio.flag & AUDIO_SYNC) && (sad->flag & ANIMPLAY_FLAG_REVERSE) == false &&
         isfinite(time = BKE_sound_sync_scene(scene_eval))) {
  double newfra = (double)time * FPS;

When I start playback, value of newfra starts at 64

So following condition ignores AV sync, until it reaches scene->r.cfra

/* give some space here to avoid jumps */
if (newfra + 0.5 > scene->r.cfra && newfra - 0.5 < scene->r.cfra) {
else {
  scene->r.cfra = max_ii(scene->r.cfra, newfra + 0.5);

It seems to me that either BKE_sound_sync_scene(scene_eval) or audio seek position is not corrected by time remapping. Also I am not sure if time remapping is supposed to control audio pitch - that would be another thing to consider.

Ah, nvm... I can reproduce this on my end too. I had just built blender without any sound support and that is why it was working x)

@Richard Antalik (ISS) I fix it for this particular case with this patch: D7248