Page 1 of 1

Inaccurate video playback speed for pre-rendered show

Posted: Tue Dec 17, 2019 10:50 pm
by jasonbeyers
Hi,

I’m trying to prepare a pre-rendered New Years Eve show based on my normal realtime/generative one, so that I can play my show from my GPU-constrained backup laptop in an emergency. I’ve been using syphon to record the content being sent to my projector as well as some LED bars, recorded during different takes and stored as separate video files. The whole show is automated using Ableton Live.

So, I have two video files with different parts of the same show, and I included the show’s audio in both video files (using Syphon Recorder) to make it easier for me to align the two videos later.

If I create a cue that simply starts both videos, each with a 100% playback speed, I can get them perfectly aligned at first. However after a few minutes, the videos begin to diverge, with one video falling behind the other. Based on some crude manual timings, each of my exactly-20-minute video files are taking *longer* than 20 minutes to play back with MM, and this time stretching differs between the two videos. And this drift can change on repeated plays too.

If I only needed Madmapper, then the solution would be to record a single (larger resolution) syphon stream with the whole show present somewhere in the window. Then all the pieces would at least remain in sync (and in sync with the audio, if I let Madmapper play that audio). But in my case I’m also driving DMX moving heads from Ableton Live. Live keeps the tempo consistent, but when Live sends a OSC signal to MM to start those videos, the video becomes out of sync with Ableton within a few minutes.

My attempts so far have been with h.264 encoding, 60 fps, with the Syphon Recorder. My attempts with a combined video (projector + LED bars) have a resolution of 2000x1200. Using a 2018 Macbook Pro 15" with maxed-out specs for that model year (32GB RAM, 6-core i9, Pro Vega 20).

I worry that if MM and/or my laptop suffers a temporary performance drop, then MM does not remember the video play position that it *should* be at — resulting in less than 100% actual playback speed and a longer-than-expected runtime.

Any tips for how I can ensure more accurate (and consistent) video playback speed in Madmapper? Could the h264 encoding be the culprit? Is it even possible to ensure consistent playback speed over long time scales, in general? Just wondering if this pre-rendered idea is a lost cause, when MM needs to keep time with other tools (such as Ableton).

Thanks!

cc

Posted: Wed Dec 18, 2019 10:56 am
by mad-matt
Hi,

When using FFMPEG Player (when "Use Hardware Acceleration" is disabled on movies), MadMapper will keep the two movies in sync, at least if played from the same process. There might be an exception in version 3.X when audio is activated and we failed to get audio samples at a specific position, we might jump a little bit, but if the movie is encoded properly, I don't think this can happen. In 4.0 (beta version at the moment), the audio track will never move the playhead differently for two movies (increased by number of sample rendered * duration of an audio sample for current speed and sample rate - ie sample count * 1/44100).

Did you activate "Use Hardware Acceleration" ? If so, on macOS we switch to AVFoundation player, the Apple component used by QuickTime player, and we can't guarantee no drifting in this case.

Another option would be to take the two movies you exported, and use a video edition software to put them side by side in a single movie.

Cheers