4 Replies Latest reply on Mar 11, 2011 9:41 AM by Richard G Patterson

    Deleting Every nth Frame

    Richard G Patterson Level 1

      I am trying to conform some footage to replace a sequence in my project with a better image quality version of the same clip from an old move.  It appears to me that because the new footage has taken a convoluted route from film to video to digital files, I need to drop every sixth frame, although there may also be cadence problems so that I may need to change the number of frames I drop occasionally in order to stay in sync.

       

      I am sure there must be a simple way to do this in After Effects, but I can't figure out how to do it so I have complete control over the selection of the frame to drop.  If I put a 30 fps movie in a 25 fps comp, does the frame which I set as the start frame in the clip determine which frames will be dropped.

       

      For what it is worth, this does not appear to have anything to do with interlacing.  It looks as though the clip underwent a frame rate change at some point that used full blended frames instead of fields.

       

      Also is there anything around for Mac OS10.6 that will let you go through a movie and cut out single frames the way the old QuickTime Pro would?

       

      Thanks.

        • 1. Re: Deleting Every nth Frame
          Mylenium Most Valuable Participant

          I am sure there must be a simple way to do this in After Effects

           

          People call it time-remapping. If really every 6th frame needs be dropped, an expression would work, if it's irregualr you will have to keyframe it manually.

           

          Mylenium

          1 person found this helpful
          • 2. Re: Deleting Every nth Frame
            Richard G Patterson Level 1

            Thanks.  I tried again with Time Remapping but I am having trouble making it do what I want to do.  My problem is that the frame I need to delete is not every 6th frame, but seems to wander arbitrarily.  I need to match the frames as closely as possible because the replacement footage needs to sync to an existing sound track with dialogue and gunshots, etc.

             

            So what I really want to do it just work my way through the clip deleting each frame that does not match and have it pull all the remaining frames up.  When I attempt to do this is time remapping I either get a two frame hold on the frame and have to work my way along one frame at a time setting keyframes to correct the sync or else if I remove the end sync point I just get a hold frame to the end.  I suspect I am missing some option or technique which will accomplish what I guess amounts to a rolling edit every time I cut a frame.  I suppose I should be doing this in Final Cut Pro, but I am not adept enough to know how to compare the new and old sequences.

             

            Do you have any further suggestions for how I should approach this.

             

            Thanks for taking the time to help.

             

            Richard Patterson

            135 S Medio Drive

            Los Angeles, CA 90049-3935

            310 472-8065

            richard@rgpost.com

            • 3. Re: Deleting Every nth Frame
              Mylenium Most Valuable Participant

              I'm not exactly sure what you are doing, but if this were regular intervals one would simply skip the offending frame - divide time by n, multiply back with n+1, where n is the interval of the frames. So in effect it would go from 5 to 7 instead of 6. you should be able to create that just as well with some simple keyframes. If it still appears to freeze, then probably the interpolation was done wrongly in the first place and frames are already missing. That would be nigh on impossible to resolve otehr than applying another temporal blur effect such as Timewarp with motion blur and accept teh insane rendering times this will cause... i don't think there is an easy way here. You could provide a short snippet and someone might take a look and have a better idea or provide a template setup for you to work from, though. after all, I know a lot, but sometimes miss the obvious, too.

               

              Mylenium

              • 4. Re: Deleting Every nth Frame
                Richard G Patterson Level 1

                Again, thank you for taking the time to help me deal with this.  I have managed to do what I needed to do in what seems to be the best and simplest way, but just for the record perhaps I'll try to explain more clearly exactly what the problem was.

                 

                I am restoring an old film to a DVD and my initial project was based on a transfer of a print of the film where I was able to remove all the pulldown and get 24fps clean frames corresponding to the original film.  I am now trying to replace some sections of it with material with film clips I am extracting from DVDs which were made in mysterious ways.  Depending on how I extracted the material from the DVD I got different results in terms of frame blending or interlace artifacts so I finally settled on extracting just the unscaled demuxed m2v files and then trying to analyze them in various ways in After Effects.  I even used a plug-in I had written last year to display just the even or odd fields.  In the case of this one title what I saw was a sequence of 2 clean frames followed by 3 blended frames where the blending was built into each field.  I also discovered that the cuts were longer than the 24 fps cuts from the print.  After a lot of arithmetic and head scratching I finally concluded that somewhere in the film to tape transfers used in making the DVD a decision had been made to use 25 fps and a frame rate conversion had been done with frame blending rather than interlacing or motion interpolation.  So clearly I was never going to be able to remove all the blended frames.  In some cases the frames were clearly a blend of two adjacent frames and in others it sometimes looked as if there had maybe been some attempt (on another transfer at some stage?) to do motion interpolation.  So the best I could do was to find the frames that seemed to coincide most closely with the ones in the footage I was trying to replace and drop the extra frame in each set.

                 

                I confess I am still puzzled and confused by some of the things I saw, but the best solution was in fact the simplest: turn off field separation and do a time stretch of 83.33% making sure the in-point for the layer was a first clean frame.  I was able to step through and compare the results with the frames I was replacing.

                 

                The problem I had with time remapping was that if I set the final frame for a cut to be the appropriate frame and tried to set a key frame on an appropriate frame at the beginning of the cut, I seemed to have to make adjustments in the middle of the cut and I could never settle on a systematic way of doing this that did not result in having to manually set a key frame for every frame after the adjusted keyframe (or perhaps for a bunch of keyframes until the time remapping got back on track). 

                 

                My biggest problem was the classic one of going around in circles for so long that I got dizzy and confused and perhaps just dug myself in deeper.  I kept having to start all over again and rethink what I was doing.

                 

                Richard Patterson

                135 S Medio Drive

                Los Angeles, CA 90049-3935

                310 472-8065

                richard@rgpost.com