5 Replies Latest reply on Aug 25, 2010 3:48 PM by Tim Kurkoski

    Rendering to H.264 Baseline Profile

    Top Branded Clothing Level 1

      I have a project which is 920 x 300 pixels which won't render with the Baseline 3.0 Profile.
      Is this profile restriced to certain pixel sizes or ratios?


        • 1. Re: Rendering to H.264 Baseline Profile
          Tim Kurkoski Adobe Employee

          All MPEG-based formats have limits built into each Level.  Profiles also impose limits, but not on the practical settings like frame rate and frame size.   The Levels section of the Wikipedia article on H.264 provides a good overview for that format.


          A simplified explanation is that each level has a maximum bitrate, and your bitrate is determined mostly by the combination of frame rate and frame dimensions of your video.  In other words, if you use a slower frame rate you can use larger frame dimensions.  Pixel aspect ratio doesn't enter into the picture, it's just a flag set on the file to tell the application how much to stretch the pixels.


          I did some empirical tests in After Effects CS5 and found that 920x300 @ 30fps is within the limits and of H.264 Baseline 3.0 so you shouldn't have any problem with that frame size/frame rate combo (or a slower rate).  However, the Output Module dialog does show a constraint warning the first time you OK the H.264 settings.  If you OK the Output Module settings dialog and reopen it the warning will go away.  You shouldn't see it again unless you reset your preferences.  (This erroneous warning is of course a bug, which I have filed.  Thanks for bringing it up.)


          Worth noting that Adobe Media Encoder makes the limits for MPEG4-based formats somewhat more opaque, since it avoids the elaborate dance that After Effects has to do with comp values + output module settings.  If you want to know where the limits for a particular MPEG4/H.264 level is you can expriment with the settings there.  When you set one of the values too large for the level, AME will give you an error.


          If you're not using After Effects CS5, please let us know which version you're using and what indication you're given that the render won't work.  (ie., What error message do you get or how does the render otherwise fail?)  Not that the H.264 limits are any different, but how you get there may be.



          -=After Effects QE/Adobe Media Encoder QE

          • 2. Re: Rendering to H.264 Baseline Profile
            Dave LaRonde Level 6

            Here's a question, Tim:


            When rendering to H.264, does AE allow multipass encoding, as a compression application can when converting a file?

            • 3. Re: Rendering to H.264 Baseline Profile
              Tim Kurkoski Adobe Employee

              Hi Dave,


              No, After Effects doesn't allow multi-pass encoding to any export format.  It's a limitation in the rendering pipeline that feeds frames from the comp to the encoders.  It's been that way from the beginning in After Effects, since long before multi-pass encoding was common, and it's something we'd like to fix in the future.  That said, please don't hesitate to file a feature request about it.  The more feedback we get about a particular feature the more likely it is to happen.


              Now I'm going to conditionally contradict myself: yes, you can write two-pass files from After Effects, if you use Adobe Media Encoder. AME does allow two-pass encoding to H.264 and other formats, and it will even do so from an After Effects comp (fed to AME via Dynamic Link).  Just open AME first, add your After Effects comp, and set the format and encoding options as desired.


              An aside: if you haven't tried After Effects CS5 yet, I encourage you to do so to experience the big improvements we've made to encoding and decoding, and also Dynamc Link.  All three areas received significant polish and love for the Adobe CS5 video applications.


              I hope that helps answer your question, Dave.  If you have other questions about encoding from After Effects that aren't related to the OP's question, please start a new thread.



              • 4. Re: Rendering to H.264 Baseline Profile
                Dave LaRonde Level 6

                Now, THAT'S a complete answer. 

                I've always assumed that since a lot of the AE  code was written long before there were long-gop codecs, it couldn't do multipass encoding.  On the Creative Cow, I encourage people to render lossless from AE, then use a different application to encode for various delivery codecs.  You never know when you might need the same animation in ProRes, Motion JPEG and mp4/H.264.  Just render once in AE, I say.

                • 5. Re: Rendering to H.264 Baseline Profile
                  Tim Kurkoski Adobe Employee

                  While the basic shape of After Effect's rendering pipeline hasn't fundamentally changed in a long time, the encoders that actually process the rendered frames into the different formats have changed significantly over the years.  Especially in CS5, so I encourage people to encode directly to MPEG-based formats directly from After Effects, granted that it fits their workflow and they don't need two-pass encoding.  The results should be quite good.


                  Your advice to render once out of After Effects to a lossless format is smart for people who have expensive renders (ie., long render times due to heavy effects or processing).  Rendering once is what many users do anyway, since After Effects isn't often the end of their workflow chain and there will be an additional encode at a later time.