Hello,
I need to make a good video/audio loop with smooth transition from ending to the beginnig. The loop is for motion menu.
I have source video clip in both divx and mpeg2.
1. Are there ready standard tools for this.
2. If there is not, and I'd have to do it by hand. I can do audio manipulation with sound forge 5 this is ok. The remaining part in the puzzle for me is video processing.
As I understand, in order for the transition to be smother, it should contain some time of silence. For this I'd need to repeat last frame for the duration of the silence. How to do this? Can I do it straight on mpeg2 video?
Thanks
Note, since I wrote this, years ago, I forgot about it. Coming back to it as a result of somebody recently referencing it in a new forum post, though, ( http://forum.doom9.org/showthread.php?s=&threadid=72964 ) I decided to edit it and make it both simpler and more detailed.
*******************************************************************************
I have never found a perfect solution to looping menu video.
The solution which I decided upon, from trial and error, is not ideal, but it may help you:
Before I begin, I wish to stress that before you undertake the procedure which follows, you should create a copy of your existing menu background video/audio clip and put it safe in your NLE's project bin, so that no matter what you do to the clip, below, you will always have the original to fall back on. The usefulness of this approach will become apparent towards the end of this mini-tut.
OK, imagine you have a clip which is ten seconds long, like so:
1-2-3-4-5-6-7-8-9-10
I would choose a point along this clip to make a cut, for example:
1-2-3-4-5 [CUT] -6-7-8-9-10
Now I would SWAP the two pieces with each other, like so:
-6-7-8-9-10 1-2-3-4-5
They should just 'snap' together again in the timeline, to look like this:
-6-7-8-9-101-2-3-4-5
Now, I would add a transition (e.g. a crossfade) at the joint between the two clips, like so:
-6-7-8-9-10-[TRANSITION]1-2-3-4-5
So now you still have a 10 second-long clip, but it's been rearranged and had a smooth transition/crossfade/dissolve added at the joint.
Now make sure this crossfade has actually been rendered by your NLE. Once you have confirmed this (and remember to check your NLE isn't just pretending it's been rendered, by giving you a realtime preview!) to be the case, you can continue as follows:
Recut your rendered clip, exactly where it was cut before the transition had been applied, and then swap the segments with each other on the timeline like so:
-6-7-8-9-10-[TRANSITION]1-2-3-4-5
BECOMES:
ITION]1-2-3-4-5-6-7-8-9-10-[TRANS
NOW, you may use this new clip by itself, and it will loop very nicely. However, if you (optionally!) duplicate this clip, you will find that the copies will perfectly join to each other, end-to-end and still give a consistent appearance of looping:
ITION]1-2-3-4-5-6-7-8-9-10-[TRANS-ITION]1-2-3-4-5-6-7-8-9-10-[TRANS-ITION]1-2-3-4-5-6-7-8-9-10-[TRANS
Either way (whether you use just the single edited clip, or if you duplicate it a couple of times and concatenate the copies together) you just use what you now have and let the DVD-player loop the clip during menu-playback (there will be a very slight pause when the DVD player's laser has to jump to the beginning of the MPEG stream again, so try to make sure that you chose your cut points where it was not in the middle of a spoken word, or it will sound strange. In other words, choose your cut points according to either the characterisitics of the dialogue, or the characteristics of the video scene, depending on which you think is potentially the most noticeable to the viewer).
Unless you have a large number of such looping menus, and/or space is at a premium, I highly recommend that you do concatenate one or two duplications of your clip, as I described, so that during playback the looping only pauses every second or third time, rather than every single time a short clip loops. It just gives a more professional result.
*******************************************************************************
Possible Complications:
What you created above may suit your purposes perfectly. However, nothing is ever as simple as it seems in DVD authoring, and 'seamlessly'-looping menus (I use the term 'seamless' loosely) are no exception. Therefore, there is a possible complication: if the end frame and start frame of your looping clip differed very significantly before the use of the transtion, then you may find that even after using the transition on your clip, when you initially enter the menu, the result is distracting, with some of the end frame's contribution to the transition being visible for half a second or so, before the transition ends and you get truly clean video, unaffected by transitional material.
Firstly, I would suggest that it is never a good idea to create a loop clip that has dramatic differences (prior to the use of the transition method) between video appearance of the first frame of the clip, and video appearance of the last frame of the clip. It's just not good practice. If you can avoid dramatic differences, then you may find that the problem of entering a transition when the menu is approached for the first time, does not prove to be too distracting.
However, if you cannot avoid this, and entering your menu initially does leave you with half a transition which is too distracting, then there is hope :)
Some authoring packages (Maestro / DVD SP 2, Scenarist etc.) allow you to specify an initial entry point, and then a looping point thereafter. This is a lifesaver for difficult material. If you have this feature, then you can do as follows:
Go ahead as normal, and produce a concatenated clip with the transition method:
ITION]1-2-3-4-5-6-7-8-9-10-[TRANS-ITION]1-2-3-4-5-6-7-8-9-10-[TRANS-ITION]1-2-3-4-5-6-7-8-9-10-[TRANS
but now go back to your NLE's project bin and find the 'virgin' clip you began with before you followed the procedure in this tutorial.
Place it on the timeline before your concatenated sequence, like so (which, in the example shown in this particular diagram, means that there will be a total of 4 clips in the timeline):
1-2-3-4-5-6-7-8-9-10-1-2-3-4-5-6-7-8-9-10-[TRANS-ITION]1-2-3-4-5-6-7-8-9-10-[TRANS-ITION]1-2-3-4-5-6-7-8-9-10-[TRANS
You must now remove that first half-transition, by cutting it away, leaving a perfect matchframed edit. In the diagram below, you can see that this is incredibly easy - I simply made an arbitrary decision to place my cut points at the 8-second mark of each of my first two clips. It does not matter where you place your cuts, just so long as they do not themselves infringe upon any transitions, and so long as both of the cuts are identically-placed. I've underlined the section between both my chosen cuts, for clarity:
1-2-3-4-5-6-7-8-9-10-[ITION]1-2-3-4-5-6-7-8-9-10-[TRANS-ITION]1-2-3-4-5-6-7-8-9-10-[TRANS-ITION]1-2-3-4-5-6-7-8-9-10-[TRANS
Now simply delete the underlined portion, and you should get the following result, regardless of where you chose your own cut points:
1-2-3-4-5-6-7-8-9-10-[TRANS-ITION]1-2-3-4-5-6-7-8-9-10-[TRANS-ITION]1-2-3-4-5-6-7-8-9-10-[TRANS
Great :)
Now encode this to MPEG (# please read my note at the very end of this post!), and import it into Maestro / DVD SP 2 / Scenarist.
Using the menu editor, assign the assets you have created, to build an animated/motion menu, and then carefully implement your looping point, so that when you initially enter your menu, it will begin playback from the beginning of the stream (where there is now no half-transition), but so that when the menu stream gets to the end, and needs to loop, it loops back to the middle of the first transition. I've underlined the correct segment for looping in the following diagram:
1-2-3-4-5-6-7-8-9-10-[TRANS-ITION]1-2-3-4-5-6-7-8-9-10-[TRANS-ITION]1-2-3-4-5-6-7-8-9-10-[TRANS
I hope this makes sense! :D
*******************************************************************************
I hope the above explanations are not too confusing - it is very difficult to explain with words rather than demonstration!
Let me know if you need any clarification.
I am also interested if anyone else has found a better method which I can use instead.
Good luck!
Arky ;o)
#N.B. If your NLE does not automatically support it, you must find a way to insert an I-frame at your desired looping point. If you don't, then once you have encoded your segment to MPEG, and imported it into your DVD-authoring program, you will not be able to place your looping point precisely where it should be (the DVD spec requires all stream entry points to be I-frames. Indeed, you may loosely consider your looping point to be analogous to a chapter point, and I am sure you are familiar with the same I-frame issues when specifying these in your DVD-authoring workflow). Therefore, if we did not precisely insert an I-frame at our desired looping point, during encoding, then when we place our loop point, it will snap to the nearest I-frame (aka 'nearest GOP') and the looping will consequently not be smooth and all that hard work will have been a waste of time.
If your NLE MPEG encoder does not support manual I-frame insertion, then you will need to encode the looping segment seperately from the lead-in segment (which only gets played on initial entry to the menu). This will result in an I-frame being encoded automatically at the beginning of the looping stream (all MPEG encoders must begin an MPEG stream with an I-frame). You will then need to concatenate ('stitch') the two segments back together, using an appropriate MPEG Editor (e.g. M2edit or Womble MPEG VCR <MPEG Append if you're on the MAC platform>. I must try this with TMPGEnc, because I have a nagging feeling it will successfully accomplish this task - anyone care to give me feedback on this in the meantime? ;) ). Certainly, ProCoder (at the time of writing - version 1.5) does not offer manual I-frame insertion, however it DOES offer the possiblity to specify the encoding of two chunks from one DV file, and the [i]simultaneous stitching (concatenation) of the two files back together, which is exactly the result we need.
Once you have concatenated your MPEG segments back together, you can follow the steps I outlined for authoring the stream within your DVD-authoring program. I know it all seems like a big hassle, but once you've done it once, you'll do it incredibly quickly the next time.
Lastly, if your authoring system does not support the placement of a specific looping point, then you will need to use the alternative method of having a 'pre-menu' clip play as a lead-in to your menu-proper. If this is your only option, then you need to have this as your 'pre-menu' clip:
1-2-3-4-5-6-7-8-9-10-[TRANS
...And then this as your normally-looping segment in your menu-proper:
-ITION]1-2-3-4-5-6-7-8-9-10-[TRANS-ITION]1-2-3-4-5-6-7-8-9-10-[TRANS
Simply arrange your project navigation to take account of this arrangement. It's not perfect, but it is workable. It is even possible to improve things further, using scripting, so that the intro segment, preceeding the looping segment, is not played again if the menu is returned to, having been viewed previously. (Check out this thread: http://forum.doom9.org/showthread.php?s=&postid=463855#post463855)
Thank you Arky for a thorougth explanation of video looping technique.
The goal of each approach is not hard to understand as you have been very detailed. Second one appear to be alot simpler. However, for a time being i'm quite a newbe to video editing at all.
I have a couple of questions more:
Which tool is more appropriate for the purpose?
How can i extend clip time by repeating the last frame?
Again thank you for taking your time.
First of all, WHY do you need to repeat/extend the last frame? Are you saying that your audio stream is longer than your videostream? It's not that it isn't possible to achieve, I just wonder why, because it may be unecessary for you. Just let me know your reason, before I write a long decription which may prove to be un-needed! ;)
Any Non Linear Editor (NLE) will do as I have described.
For example:
Adobe "Premiere", Ulead "Video Studio", Ulead "Media Studio Pro", Discreet/Media100/Digital Origin "Cinestream", InSync "Speed Razor" etc. etc.
Arky ;o)
nincollector
28th June 2002, 17:30
arky in your method wont there still be a pause when the menu loops?
also (for example)i have a audio file in my menu that is say 10 seconds but when i add it to the menu, compile and playback the menu loops slightly earlier (before the end of the audio) and screws up the entire looping process. for example say the audio was supposed to go
1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 etc...
it is playing it back as
1 2 3 4 1 2 3 4 1 2 3 4 etc...
is there a way around this or do i need to do some trial and error by inserting silence at the end of the audio and compiling that way.
p.s. this happens in both maestro and also scenarist
Arky
29th June 2002, 11:26
Yes, of course there is still a delay - this is not the fault of the looping method itself - it's a fault of the DVD playback engine, so you don't have a hope in hell of circumventing it, unfortunately. That's precisely why I was at pains to point out that you need to carefully choose where best to have the delay - i.e. not half way through a spoken / narrative sentence, for instance.
To quote myself, from above:
[you just use what you now have and let the DVD-player loop the clip during menu-playback (there will be a very slight pause between loops. so try to make sure that you chose your cut points where it was not in the middle of a spoken word, or it will sound strange).]
Arky ;o)
TRILIGHT
29th June 2002, 13:05
That's a hell of an idea, Arky! Thanks!
easy2Bcheesy
29th June 2002, 18:11
For any one looking at tips for a seamless loops and transitions between menus, I *strongly* recommend picking up a copy of Mission: Impossible 2. Quite simply the most beautiful and elegant interface I've ever seen. It's a masterclass in fooling the eye - and everything looks seamless as you navigate between the menus, even though it's impossible to get seamless transitions in the DVD spec.
I'm talking about the R1 edition by the way.
Arky
30th June 2002, 01:15
Cheers for the "heads-up", easy2Bcheesy, I'll check that out.
Arky ;o)
Arky
21st March 2004, 02:56
Does anyone here have an alternative method? It's been 2 years since I originally posted in this thread, and although my approach does still stand the test of time, I'm still interested to hear other authors' methods to the same problem.
(for those of you who haven't yet noticed, I like to learn! :D )
Arky ;o)
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.