6 Replies Latest reply on Apr 23, 2009 8:45 AM by imagex ideas

    Extra frames in Ae CS3 H.264 render

    imagex ideas Level 1

      I have a simple 24-second Ae CS3 project created at 1940x1080 resolution and 29.97fps.  If I render it to a SD output, no surprise.  But if I render it to m4v using H.264 with the intent of creating a Blu-ray, the mp4 runs an extra half second - or 17 frames to be precise.  The project action seems to end on schedule, so I think the extra frames are content-free.  The wav audio file matches the 24-second project.  A second project does the same thing.  Anyone know what's going on?

        • 1. Re: Extra frames in Ae CS3 H.264 render
          TimeRemapper Level 4

          Do you mean "1920" by 1080?

          If your HD comp is 1940, that may be causing the encoder to behave strangely.

          Are you sure your work area is set to the desired duration (24 seconds)?

          Separately, you should really consider rendering uncompressed/losslessly compressed first, and then compress that render to H.264 using a third party application (such as Quicktime Pro, Compressor, Squeeze, etc...). The quality of compression will drastically improve over the results that you will get rendering straight from AE.

          • 2. Re: Extra frames in Ae CS3 H.264 render
            imagex ideas Level 1

            Steve - Yes, sorry for my typo.  The comp is 1920 x 1080.  The other data from the comp properties are:

            Preset: HDTV 1080 29.97

            Square  pixels

            Resolution:full

            0;00;00;00 start

            0;00;24;00 duration

            and yes, the work area is set to match the 24 second comp duration.

             

            Spurred by your comments I rendered the project in AVI (is there a better way to get uncompressed or lossless rendering?).  In that case I got no extra frames.  So there must be something in the way the Ae H.264 codec interacts with this comp that causes the extra frames.  The only thing that I can think might be a bit unusual is that one layer is a 3D text string that scrolls along a closed path in the x-z plane using keyframing of the "First Margin" parameter.  The last keyframe is at the last frame of the comp at which time the text is almost (but not quite) out of view.  The other flat layers are in the x-y plane, but are designated as 3D so the text is obscured when it goes in back of them.  There is no custom camera layer; I use the default.

             

            I'm interested in your closing comment.  I've assumed that for a given codec, the quality vs. compression tradeoff was in the bit rate and CBR vs VBR choice.  I assumed that interchangeability of results severely limited flexibility in the implementation.  Is there a good independent reference on quality / compression comparisons for different H.264/MPEG-4 AVC encoders?

            • 3. Re: Extra frames in Ae CS3 H.264 render
              TimeRemapper Level 4
              (is there a better way to get uncompressed or lossless rendering?).

              I would choose Quicktime (Animation codec) at best/full quality. It provides lossless compression (no quality degeneration, but a smaller file size than uncompressed QT or AVI).

               

              So there must be something in the way the Ae H.264 codec interacts with this comp that causes the extra frames. 

              How are you going about choosing H.264?

              Confusingly enough, there's more than one way via the Output Module to choose H.264.

              Instead of choosing H.264 under the "Format" pulldown menu in the Output Module settings, choose "Quicktime". Then, in the video section below, click on the "Format Options" button. There, choose H.264 from the "Compression Type" pulldown menu. This will make a QT-wrapped H.264 movie. Maybe you'll have different results than using H.264 directly from the "Format" menu.

              I believe the latter is MainConcept wrapping as opposed to QT.

               

              I'm interested in your closing comment.  I've assumed that for a given codec, the quality vs. compression tradeoff was in the bit rate and CBR vs VBR choice.  I assumed that interchangeability of results severely limited flexibility in the implementation.  Is there a good independent reference on quality / compression comparisons for different H.264/MPEG-4 AVC encoders?

              What I had meant was, that due to how AE renders (processes/writes) every frame, getting the best temporal compression (i.e. multiple pass) can't occur when a number of the frames down the timeline don't effectively exist yet (because they haven't been rendered). The Adobe Media Encoder will give better results than compressing right out of AE (because it caches a few frames ahead of, and behind the current frame for analysis), if you can get access to it. Otherwise, third party compression solutions are much better because they can evaluate the entire file before determining where the best compression can take place.

              1 person found this helpful
              • 4. Re: Extra frames in Ae CS3 H.264 render
                imagex ideas Level 1

                Steve -

                 

                I would choose Quicktime (Animation codec) at best/full quality. It provides lossless compression (no quality degeneration, but a smaller file size than uncompressed QT or AVI).

                 

                Thanks for the recommendation, Steve

                 

                Instead of choosing H.264 under the "Format" pulldown menu in the Output Module settings, choose "Quicktime". Then, in the video section below, click on the "Format Options" button. There, choose H.264 from the "Compression Type" pulldown menu.

                 

                I was choosing H.264 from the main menu.  However, I tried choosing it this way with no change in result.  Still get extra frames.

                 

                What I had meant was, that due to how AE renders (processes/writes) every frame, getting the best temporal compression (i.e. multiple pass) can't occur when a number of the frames down the timeline don't effectively exist yet (because they haven't been rendered). The Adobe Media Encoder will give better results than compressing right out of AE (because it caches a few frames ahead of, and behind the current frame for analysis), if you can get access to it. Otherwise, third party compression solutions are much better because they can evaluate the entire file before determining where the best compression can take place.

                 

                I get it.  Good point.  The manuals for CS3 Ae, Pr and En all state that their compression and export is done through the Adobe Media Encoder (in Pr I think its optional).  So I guess the engine is the same as running AME as a free standing follow-up to rendering, but when coupled in one operation (as in Ae) its crippled, as you explain very well.

                 

                Again thanks.   The extra frames puzzle still remains, but you've upped my skills a lot.

                • 5. Re: Extra frames in Ae CS3 H.264 render
                  TimeRemapper Level 4

                  Glad to help, Imagex.

                   

                  The only other thing I could think of is that you're setting some kind of custom duration in your "Render Settings".

                  In the "Time Sampling" section, do you have the "Time Span" set to anything other than "Work Area Only" (that's assuming your work area is trimmed appropriately as you confirmed earlier)?

                  • 6. Re: Extra frames in Ae CS3 H.264 render
                    imagex ideas Level 1

                    No, in all renders time span was set at work area, and covered 0 to 23;29, ie 24 seconds.  The non-compressed renderings yielded 24 second output.  The various ways of rendering to H.264 (direct and through QT) yielded 24;17 second video output.  I'm not going to pursue it further because (a) it appears unique to this project, and (b) it is fairly easy to chop off the extra frames when authoring the final DVD product.