loading next movie causes a pause
I am building a video player application, and this is the patch where I have the videos being played and crossfaded.
The thing I would like to know if it is possible to solve is, when the next video is loaded, the previous video pauses for less then a second and then the cross fade starts. It is a picky issue but it is hitting my eyes everytime I load a new video.
Any help on this will be very apreciated
----------begin_max5_patcher---------- 2278.3oc2b91iiZyD.+0Y+Tfh5KSiv1XfzW0J0Ss8UU5pZkdzopUjf2bzB3T vYu8ZU+t+X7.rPhg3PHbrUmTxxeBL9mGOy3wiu+4gEK2xegkuz5ar9f0hE+y CKVnNUwIVTd7hkIAurKNHWcaK2wSRXohkqfqIXuHTm+6e+28CV+ue9Weu0u8 Se+694ew5Ge26eW0cEEptG91+3qw9Um7IdpHMHgotz2kEEDWckCAhceLJc+i YrcBP3bv9qsWYswo3Sju5.r8Zaqeu72jdLIJMlITRIpwqHO5uUuBDV9apuW9 QQ0MaWbx+8gGJ9XkgTX6Qgfmpq441Sif5nDeruWk3aRinszVcV3ThOefAO6k aCR2uz52G0FCsmFCwCjee2YUiIgkmGrmcl9YtHHSnqMhFj9Hlp5CQNaJ9hnZ 8H2tZ8Xc5i1cnO1ITFafvOniG1CiGnMM3Ady7kGOEykO+ZbjEkuKHV8HsWu4 bdfrwCCHaTiKPXTwW.VP9WkAqt.BtKfHaZARc76wvmr.Ay5qPK0AH+aBP.Zb lwifRYeR1POCI+QjX8930OGEx3GhCRYVI7PquUjEjl+DOKQ1VyYBKrFlQ7FD xJM4V5KDsgLEJUxl4iIAxwIuTnYMLBVfpmNju+XjFXP2LHX3B5MDED7UfgzD EGJvepHPDI8s01CzEPjy0hnRvn4E2Te2UYI.6QOUfG.P6JJLkE.ImzMNcPTF A94Havfl2YZbCGycoIZ2OGQfcCr2lSknQjieJJMj+IKkrpQicXnDqh9iPTBt qyWdTtgBNqcNUfFQRlDjKXY5zGICaXuaCH5P9xCQLL.w1+TAZ.P7nDgGqa7Y bAuvJSMaTtZBiRx0gSCFeW7vJmr2q7RihpMzjnJ0CjMDZOYnPNHNZe5UarkT 0D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banXOlZ8kmTJ9vxelG7LK7Q4aQFg4iABQVz1iBH9slKGpAK.XOW5Rq8 39X91f3xUhs9Yz5Ie1RRdUqi4CuRgwpVApWCltWUaBUUMJDb0mewqUfxYLTV FijpOGToBbHHkUux9a4Ygvhni0TVEj9pIefQP4KisI0YnXLf0kJksxv5JqKL ZU58pe0a2uiGyypV7cJwCSoqz9WnQthKJWqlLVPntpD2YXEvJj5GDT8ifZvH U+pSSM+J34eNYKOVGRH2DRnJEvRWsyRjzUog+xSAgLolnNlfG3l8orVm7ZrZ dus1cE1qKFRVT7b15LdOrRdl.k9ZYsFVlru2TXAstvlUmXYX6j.Bw6MBV5vp x9hMWA1R6tqvcfHg.9yfcehW+VUvixFEX3aOftL1Vj5bcLYf0eMTVqXXUakw CQu+adhVoFeLYSUVu0NLB4bK.BAlccI8ui9zpzfVS2PQ9dS0t86BQunbMoiP N2x9ug.KAqmyatvWJlbndO0H6ahHDn52cGw5mcJsyDKszny56lAF9BXng3ZB TtJ0DRePoxXyqKH+UxmvL9ghBOVCI7ux8PfiM90B+.S.2Pnqa2AO0Z.51odd Cb2ACSzElR2aHMfd1pi+kXcB+4HVwFsnXeVX8sOyi0aLw4lF1.VWQDm2J6tw wAZjaRS6+RPqKu13axEEL2IG5TDJbe.R8dauJ0.uNM8skT6rz1toY5XMIksm mtV8op8rdvqQhPWPhPalbQBeIQxcREIeC52vjIUj7LPjldI5hpR9StHMyTkb MneSsXS3ISjbLniCOsTxwjAbsD66sDQLARzIERDCgzzIQXS52TC3ltNNrQXZ Z85hQ2Pf.nubhDYZEI64GkrmeTxDIxaRUuQlDma6Ru39KS9yPYxyzfAlaxD5 JsW54WjxdB7+9BNzyN.4WVK7t0GcqsCWCbXOsSrAYRreS7HUpATxY5Eo40La PFEN5zFOJxY1E8GxDWQzIdLmQbBQmXgxjoJek5SU+28keYIehTFY88ucKo19 yt3vLSlHSrLgMJDioMEHHShXEcKl3kG7uO7+AdC5YBC -----------end_max5_patcher-----------
loadram and vps tuts from Andrew Benson are your next hours
Andrew Benson is good, but you will have 5-10 double frames
it is discussed in this thread:
still no solution for this problem ….
perhaps someone found a way to switch directly from
one movie to another without hickup od double frames.
the only way i found out is to copy all the clips into
one, save it with the quicktime player and jump into
this single movie.
heelo gisela, thank you for your reply
it is really weird the fact that there is no solution for this, I will continue my research and post the results.. if I found any
yep if you can do it, put them all into one movie and jump frames. totally dead-on instant in my experience—I did hours of testing with a movie that has 400-frame chunks, running alongside precisely-timed audio (bpm 120). Locked perfectly. Changing the audio rate along with the movie rate all the time, no problems at all. (No audio in the movie, it was separate… changing movie rate with audio in the movie can behave strangely, so I had sfplay~ running instead.)
putting them all into one single movie is not an option because I need them to crossfade when I switch to the next movie.
it’s odd the fact that sometimes it doesn’t do any stops and it is very smooth when switching to the next video, other times it stops a bit, you only notice if you are really focused on the video.
i’m running a MBP 15", 2.8ghz, 4GB ram, Max 5
here is an interesting document about max performance settings:
and this post is a must read, I have just started:
Without having really tested your patch or having read all the links in this thread, I’ll just comment that you might want to try making everything be triggered by the ‘read’ message that comes out of the right outlet of the jit.qt.movie object when you drag-’n'-drop a new movie file into the dropfile object, rather than by the ‘read’ message going into the jit.qt.movie object. The amount of time it takes the jit.qt.movie file to read the movie in from the hard drive and begin to play it is "unknowable", so if you wait till it actually tells you it’s ready you might get better results.
"putting them all into one single movie is not an option because I need them to crossfade when I switch to the next movie."
You can do a workaround for this using a jit.xfade-with-itself bit. When you send a new frame command for jumping around, it delays it while the xfade gets to maximum (and playback now looks faded from the frame "reverb"), sends the new frame number, then the xfade ramps back down. Tweak the timings to suit. I made the ramps linear but it would work better if it was rounded at the top like an exponential curve, as jit.xfade doesn’t seem to work linearly (there’s a big difference in the range 0.9 to 0.99 versus 0.0 to 0.09, for example).
At the very least, the jit.xfade-with-itself is a simple way to get some fun echoey effects in your visuals :)
----------begin_max5_patcher---------- 1406.3ocyZkriiaCD8rGf4efPH2RGMhKZa.lC4RNjefbHXv.YKZ2bh0xHQG2 ICx+d3hWz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gIelRSeADpni6.Hxtx2ihG.QoyqRlw6zLsnzAHD7FDvnAnrvXGqxqukRK2 xpFWl2ThPVUtNJIcPKfxPgyURpux3gs6Y0kM6uFm9aPWKL6ZGqy4yDCizsOl 7CauWiyln6myg9D9p+r4lZVlFvMUQAspRyzjAUQMn4ENM9R5S8j7fZmRUBhE 8KUE7N1SWvsibCwZ3bcWnSCQ9niOpdXfFU57DW3IDdKZmSicQiL7vggAGgrN 4LrLTh40OsYrpuXZGLTrKYpz+2HbwQMa2AHp6dADhOTv5rdTyScoXjfKJQ9f 1X4H73nyJ+9aUTdWyDqs4BklYWUDpFTnHbSgyl3lKkf5a7vpl+l49bT1iW5d bkRl2ytYTFEUJcmvnfrJO9gZ5g5jT5yP8MvlnuMUKfe9ebM0CSdgmga8M65V cbqb7OSAXvCrj1yY0JsuCuKw1C.OeWmOwyAYYJaaDzOGrDvmG+0o4FGwDi6Y 6.WYaXiAN2abHSrMnevMSLMjWLMnQnFzKgBPyLtL+.bl8RMxOwBQFgb9ggCA ueiTQ2wrHH78qs8bFhK3v4AfiXbzfGLNiDif7jwkYjwk6GiK23bW2qoG7Utq TSLNL1KFGN4d13xLhmK0OFmYuVytioRv9A4HFIIAMJxAm0WqFk2G8lKIDC0m rSzgteoqKORUK9TPxXjFTB1eUxBMxaz8BjSte04gMJmKNwejyW237iZEhQFG wSFWtab4jSH95+8S+ZCF -----------end_max5_patcher-----------
@seejayjames nice workaround!! pitty it doesn’t work with sound, but anyway, it’s a really cool effect and I’m sure I will use this is the near future!
Thanks a lot!
My research continues :)
@Christopher Dobrian, I think I can understand what you mean, but I can’t figure out the way to do it :
@seejayjames, your jit.xfade-with-itself patch is very clever. Just for the record, thought I’d mention that it does the same job as the Auvi object "au.tween" (http://auvi-software.com)
@visualiz, I think Chris Dobrian means this: when you send a "read" message to jit.qt.movie, it loads the file. When it’s completed loading, it sends the message "read xxxx.mov 1" out its right outlet. If you are crossfading, you could delay the start of the crossfade until you are sure that this message appeared out the right outlet. A "route read" object might be useful.
@Kurt, endeed, now I got it, I was being confused by the fact that when a message "read" is sent to the jit.qt.movie it starts the playback automatically. But now I understand that I can turn on the metro just after the video being totally loaded.
thanks! yep I found that little trick way back on the Forums (where else?) and have made some good use of it. Looks very cool for that dream-like effect.
I was thinking about the sound—you could do a similar hack with spigot~ instead of the regular jit.qt.movie volume (set @vol 0.) Grab the audio with spigot~ and split it into two streams, going into different channels of a matrix~. When you jump a frame, gate the audio through tapin~/tapout~ of the right length (so the last audio before frame-jumping has an echo) and then cross-fade that with the new audio. You’d need to tweak the tapin~/tapout~ lengths and amount of feedback to match the frame-jumping transition time, but it should be doable.
Anyway, fun stuff to mess with… as always with Max :)