1 Reply Latest reply on May 26, 2012 4:59 AM by Andrew Yoole

    Randomly arrange frames in a movie?


      I have a gallery of 70 pictures. I need to be able to create new movies by randomizing the frames. One person suggested it involved random numbers and time-remapping. Here is an old thread: Never found a solution




      I'm a neophyte when it comes to after effects, so any help would be appreciated

        • 1. Re: Randomly arrange frames in a movie?
          Andrew Yoole MVP & Adobe Community Professional

          Here's a very simple solution.  Others may be able to offer something much more elegant.


          Create a composition that is the correct resolution etc.  Drag all your photos into the composition.  Select all layers. Move to the first frame of the composition and trim all the layers so they are just one frame long ( press Alt-] ). 


          Use Animation/Keyframe Assistants/Sequence Layers to spread the layers across the comp.  Trim or extend your comp so that it fits the frames exactly. You should be left with a comp containing a string of consecutive single frame images.


          In your main composition, drag the photo comp (created above) in as a layer.


          Activate Time remapping on your layer, then apply this expression:



          holdTime = .5; //time to hold each position (seconds);

          ld = 100; //number of images/frames in the source composition

          seed = Math.floor(time/holdTime);


          rn = random(ld)





          You need to change the value in the first line to define how long you want each photo to stay on screen.  At the moment, .5 means each photo will stay for half a second.


          You need to change the value in the second line to the number of photos in your photo comp.  With the value at 100, it will only display the first 100 images in the photo comp, regardless of how many are there.  If there are less than 100 photos you will get some blank frames displayed.


          This expression is just an adaptation of Dan Ebbert's Random Motion expression on his website.  I've simply changed it to work with frames over time, rather than position within a comp.