[ANSWERED] Smooth looping
I am trying to achieve something very simple - a smooth looped playback of a video with sound. but even after weeks of trying, I'm struggling.
I have a video recording of a song that has two parts. I would like to loop the first part until a key is pressed. Then the player should finish the current loop and move on the to the second part.
I have split the original recording into two AVI HAPQ files using Premier Pro. In Isadora I'm using a movie player, its loop end trigger, a gate, and a jump actor. Below is a screenshot of the scene.
Unfortunately, the looping isn't smooth. There is a delay when the end of file is reached and before the new loop starts. The same happens when the Jump actor is activated and the next scenes plays the movie with the second part of the song.
I've been experimenting quite a lot. When I rendered the AVI files with audio only, the looping works just fine. That hints me that I'm having a performance issue. To be perfectly honest I'm quite confused about all the codec performance stuff, and I chose AVI HAPQ after lots of reading of this forum and the manual. I'm on a Windows 10 laptop with i7-5600U CPU, 8GB RAM, and 500 GB SSD HDD. I'm testing the videos at low resolution (720x576), but the final show should be at 1920x1080px.
I'm running out of ideas. Could you please point me in the right direction?
FYI, I gather that Windows isn't great for Isadora performance, but for this project there is no chance I can switch to a MAC system.
dbini last edited by
did you try setting your Optimize input to Performance? if you're playing the file at regular speed, it doesn't need to be on Interactive. I'm not sure why there is a pause between loops - could it be in the original media? did you try using 2 Movie Players that trigger each other? using a Comparator to trigger just before the loop end?
to speed up the transition into the next scene, try adding a Preload Scene actor and triggering it with the key press.
just an idea - what about using just one file, setting the first loop by 'play start' and 'play length' and then change the 'play length' ?
CitizenJoe last edited by
A couple of additional thoughts: Have you tried preloading the next scene? Do it with a bit of a delay after entering the current scene. The HAP codec should be fine, but personally I'm going to try out the Black Magic codecs which, according to @DusX, appear to have a much lower impact on the CPU. Finally, I would suggest that Isadora runs just as well on Windows as it does on MAC - there is no performance hit given equal hardware.
Thank you everyone! I'll try to organize the post so that others can potentially find answers here.
dbini: did you try setting your Optimize input to Performance?
I've tried switching between the two settings, but it doesn't seem to have an effect on the delay of the loop
dbini: could it be in the original media?
That's a very good point. I've imported my media into PremierPro and recreated what I am trying to achieve. In Premier Pro, everything looks good. I'm including links to the files below.
dbini: did you try using 2 Movie Players that trigger each other?
I've created a scene whose snapshot is below. I used a comparator and when the position of the first player is equal to 100, I set the speed of the second video player to 1. There is still a lag between the playback of the two videos. I tried to play around with the Position value such that the second video player starts when the first one is at 95, but there was still some clicking.
Reinhard: what about using just one file, setting the first loop by 'play start' and 'play length' and then change the 'play length'
I did try this before! It doesn't help with the looping lag, but for the transition between the two parts of the song, it works. The problem is that setting up the scene is a pain. It is very hard to set the percentage value of the exact time for looping. In Premiere Pro it's very easy because I have all the waveform previews, zooming functionality, etc, but in Isadora it is hard. I abandoned this solution because it just doesn't seem to be a good workflow for larger projects. Maybe there is a way how to make it work, though.
CitizenJoe: Have you tried preloading the next scene?
I added a Preload Scene actor and manually activated it by clicking on it when the first video is looping. A snapshot is below. Unfortunately, it doesn't seem to make the transition smoother.
Some additional info:
I have made a test video with single color and 500Hz sound in the background. The last frame is red to check if the loops are hanging after their playback. I think it's a good test piece for judging the smoothness of the transitions. You can download it here: https://drive.google.com/open?... .
The files that I'm using are:
The desired result that I created in Premiere Pro is here: https://drive.google.com/open?...
Let me also add that when I was playing around with the two-player layout, the delay between the two playbacks seems to be somehow random. The test 500Hz video makes it quite easy to evaluate the lag. Sometimes it is significant, but other time I could barely hear it.
Thanks again everyone! Very cool to have so many answers only a few hours after posting the question!
Hi there @mcermak,
I tried to give you a hand and make an example patch for you :) I re-encoded the movies to a .mov container with a HAP codec so that we are sure that it isn't an issue with our codec. The patch allows you to specify after how many loops we should advance to the next cue. Ofcourse you can alter this, I also added some comments regarding how the patch works. Let me know or this is something that works for you.
jfg last edited by
I did try this before! It doesn't help with the looping lag, but for the transition between the two parts of the song, it works. The problem is that setting up the scene is a pain.
Have you tried with Timecode. You can copy the TC from Premiere Pro
I superimposed your example video with the intro loop. As you can clearly see in the recording, the loop is done clean, but it diverse over time from the example.
Like @Juriaan stated, the loop is probably not cut at the exact point of the natural loop. Limiting the intro loop to a length of 99 to 99,3% helps to keep 'em straight until the last riff, but this is probably due to a different timing in your original play before triggering the transition.
appear to have a much lower impact on the CPU
To be clear. HAP has the lowest impact on cpu usage for playback (it uses the GPU instead). Hap is currently going to be the best playback codec for perfromance.
The Black Magic Codec mentioned, I had recommended for stage recording. In my tests of stage recording they seemed to use less cpu time.
the two parts of the song, it works. The problem is that setting up the scene is a pain.
This appraoch may be the best, since there is no reload/preload cycle initialed by the Windows Media Foundation (which is where I expected the loop point pause is coming from).
You can switch the Movie Player to use TimeCode, Perhaps that will make setting exact selections easier than with the % based position.
One thing to ensure in Premiere then will be that the audio lines up precisely with these timecode settings. Its still not as fine grained as sample based selection so you will need to ensure no clipping occurs.
Thanks everyone. I will post here once I have tried all the suggestions and figured out my workflow.
I've finally had some time to look into this again. Things are starting to make sense with all your advice, but there is one hanging question that's in a way of everything - at least I think so.
Let's simplify stuff and focus only on the sample video with 500 Hz sound in the background (https://drive.google.com/open?...). When I drop it into Isadora and play it in a loop, what I hear is not only 500 Hz sound. At the end of each loop there is a delay/click. Is that only on my system, or is that a general behavior? If general, is there a way around it? Can it be codec-dependent, system-speed dependent, or what actually causes the 'click'?
Just to explain my reasoning - I realized that the deal-breaker now is the sound quality. In the examples above I just grabbed a guitar and played random chords to test things out in Isadora. For the show that I'm working on, the music will be recorded by musicians, and the click/delay in the loops is something I will have to deal with. It has to sound just right. I have an idea how to workaround the click using the Envelope Generator actor, but it's quite a convoluted solution that I'd like to avoid. I'd much rather find out why is there a click/delay between the loop in the first place.