14 Replies Latest reply on Feb 14, 2011 12:22 PM by joe bloe premiere

    CS5 - Interpret alpha as premultiplied

    joe bloe premiere Level 5

      I have some QT files with premultiplied/matted with color alpha:


      mjp2 - Motion JPEG 2000 32bit
      1920 x 1080
      30.000 fps
      61397 kbps

       

      AE imports these files with premultiplied alpha as default, but PR interprets alpha as straight.
      Documentation says:
      "Premiere Pro and After Effects recognize both straight and premultiplied channels,

      but only the first alpha channel they encounter in a file containing multiple alpha channels."
      http://help.adobe.com/en_US/premierepro/cs/using/WS1c9bc5c2e465a58a91cf0b1038518aef7-7c6fa .html

       

      It does appear that these files contain both premultiplied and straight alpha channels.
      If I  import to AE then change the default alpha interpretation to "Straight - Unmatted",
      I get the straight alpha key that PR is using by default.

       

      Why would AE encounter premultiplied, and PR encounter straight?
      Is there a way to force PR to interpret alpha as premultiplied without sending the comp to AE?

       

      thanks

        • 2. Re: CS5 - Interpret alpha as premultiplied
          Colin Brougham Level 6

          Have you tried changing the interpretationin the Interpret Footage dialog box?

           

          Todd,

           

          Premiere doesn't have the same alpha interpretation options as AE; it's pretty simplistic with just an "Invert Alpha" and "Ignore Alpha" option. There isn't a way--at least from the UI--to force a particular alpha channel interpretation (straight or premultiplied).

           

          Would it be possible to cook a custom recipe in the "Interpretation Rules.txt" file (C:\Program Files\Adobe\Adobe Premiere Pro CS5\Plug-ins\en_US)? From the comments in that document:

          # alpha interp: (I=ignore, S=straight, P=premul/black, W=premul/white)
          #    alpha interp is ignored for footage without an alpha channel

           

          You'd have to come up with a custom filter to isolate these files (and I've never really messed with that, so I won't be much help ), but it seems feasible that you could force a custom interpretation of the alpha channel if you get the recipe right.

          1 person found this helpful
          • 3. Re: CS5 - Interpret alpha as premultiplied
            joe bloe premiere Level 5

            That is the problem.

            The PR interpret footage dialog has no options for specifying alpha type,

            only checkboxes to either ignore or invert:

            PR_interpret_menu.jpg

             

            The AE interpret footage dialog has the additional options for specifying alpha interpretation...

            either straight, premultiplied with a color picker box, or guess.

            AE_interpret_menu.jpg

             

            I am confused why PR would default to straight alpha on import of these files,

            while AE recognizes and defaults to premultiplied alpha on import.

             

            Documentation says:

            "Premiere Pro and After Effects recognize both straight and premultiplied channels,but only

            the first alpha channel they encounter in a file containing multiple alpha channels"

             

            Is there a way to force PR to interpret alpha as premultiplied by default as AE is doing?

             

            thanks

            • 4. Re: CS5 - Interpret alpha as premultiplied
              Todd_Kopriva Level 8

              D'oh! Sorry. You can probably tell that I spend more of my time in After Effects.

               

              I'll look into this.

              • 5. Re: CS5 - Interpret alpha as premultiplied
                Colin Brougham Level 6

                OK, after doing a little studying, the following might force your files (or, at least, this particular one) to be interpreted as premultipled:

                 

                # Motion JPEG 2000 with premultiplied alpha (black)
                1920, 1080, 30, *, "mjp2" = *, *, *, P

                 

                Paste that into the "Interpretation Rules.txt" file at the location mentioned above; I'd add it at the bottom of the file. What this is saying is to look for a 1920x1080, 30fps file with the "mjp2" codec, and then interpret the alpha channel as premultiplied against black. I don't have a file like this to test, so you get to be the guinea pig

                • 6. Re: CS5 - Interpret alpha as premultiplied
                  joe bloe premiere Level 5

                  Colin,

                   

                  Thanks for giving it a shot, but no go.

                  • 7. Re: CS5 - Interpret alpha as premultiplied
                    joe bloe premiere Level 5

                    After rendering a few test images in 3ds max using premultiplied alpha,

                    I can confirm that this problem is not specific to the the "mjp2" codec files.

                    • 8. Re: CS5 - Interpret alpha as premultiplied
                      joe bloe premiere Level 5

                      Repeating two posts that seem to have vanished into ether...

                       

                      Colin,
                      Thanks for your attempt at a fix, but it didn't work..

                       

                      After rendering a few premultiplied alpha test images in 3ds max and

                      saving in both .tga and .tif formats, I am experiencing the same behavior.


                      I can confirm that this problem is not specific to the the "mjp2" codec QT files.

                      • 9. Re: CS5 - Interpret alpha as premultiplied
                        Todd_Kopriva Level 8

                        If you send me a file that is showing this behavior for you, I'll check it out. My email address is kopriva (at) adobe (dot) com.

                        1 person found this helpful
                        • 10. Re: CS5 - Interpret alpha as premultiplied
                          joe bloe premiere Level 5

                          Todd,

                           

                          I have rendered a single frame of a chrome sphere passing
                          from left to right through the frame with motion blur applied.

                           

                          This image is posted in 1920x1080  .tga and .tif formats
                          with a premultiplied alpha channel.
                          motionblur_premultiplied.tga
                          motionblur_premultiplied.tif

                           

                          For comparison purposes, I have also posted the same image
                          in .tga format with a straight alpha channel.
                          motionblur_straight.tga

                           

                          For good measure, and in case you're interested, I have also
                          posted one of the Motion JPEG 2000 32bit premultiplied alpha
                          quicktimes as well.
                          be25.mov

                           

                          The download link is in your email.

                           


                          thanks

                          • 11. Re: CS5 - Interpret alpha as premultiplied
                            Todd_Kopriva Level 8

                            I just talked with one of the software engineers, and he filled me in on the support in Premiere Pro for premultiplied channels. Here are the relevant details:

                             

                            Each importer provides its own support for premultiplied channels, so determining whether Premiere Pro will read premultiplied channels from a given format is a matter of checking for that specific format. We don't have a document that lists the formats that Premiere Pro does read premultiplied channels for; we should, so that is now on our to-do list. As you have determined, TGA is not one of the formats for which the importer provides this functionality. We don't include an MJPEG importer, so you must be using a third-party codec---and that codec isn't providing the functionality to Premiere Pro, either.

                             

                            Regarding the flag in the interpretation rules that Colin tried to use: That parameter isn't honored by all of the importers. It is honored by the FLV importer.

                             

                            So, as you've surmised, you can either use straight channels or come through After Effects for the files of the type that you've posted. I just tried the files that you posted in After Effects, and they look fine. And the straight-channel file looked fine in Premiere Pro.

                             

                            Is there a reason that you don't want to work with straight channels anyway?

                            • 12. Re: CS5 - Interpret alpha as premultiplied
                              Colin Brougham Level 6

                              Interesting info, Todd--thanks for pulling back the curtain

                               

                              Just to clarify your comment:

                               

                              That parameter isn't honored by all of the importers. It is honored by the FLV importer.

                               

                              Do you mean that the alpha channel interpretation in the Interpretation Rules file only applies to FLV, or that the Interpretation Rules file only applies to FLV?

                              • 13. Re: CS5 - Interpret alpha as premultiplied
                                Todd_Kopriva Level 8

                                > Do you mean that the alpha channel interpretation in the Interpretation Rules file only applies to FLV, or that the Interpretation Rules file only applies to FLV?

                                 

                                 

                                I was just referring to that parameter in the file. Other parameters in the file apply to other formats.

                                • 14. Re: CS5 - Interpret alpha as premultiplied
                                  joe bloe premiere Level 5
                                  As you have determined, TGA is not one of the formats for which the importer provides this functionality.

                                   

                                  AE imports .tif. and mjp2 files with premultiplied alpha as default, but PR interprets alpha as straight...

                                  so you can add those two file formats to the unsupported list.

                                  ...so you must be using a third-party codec---and that codec isn't providing the functionality to Premiere Pro, either.

                                  Did you have a chance to download and import the Motion JPEG 2000 32bit premultiplied alpha file I posted (be25.mov)?

                                  I did not install any third party codec to import this media to PR or AE. I would be interested to know if you have to.

                                   Is there a reason that you don't want to work with straight channels anyway?

                                  For elements I create myself and want to be able to comp in the PR timeline, no.

                                  It is simple for me to render using straight alpha instead of premultiplied... and I will remember to do that.

                                  The mjp2 - Motion JPEG 2000 32bit QT files are precomposed elements with embedded premultiplied alpha

                                  and I will use AE for any comps that use these elements.

                                   

                                  Documentation says:
                                  "Premiere Pro and After Effects recognize both straight and premultiplied channels,

                                  but only the first alpha channel they encounter in a file containing multiple alpha channels."

                                   

                                  Why would AE encounter premultiplied, and PR encounter straight?

                                  Is there a different importer for each or is it a shared importer for both?

                                   

                                  At this point, I will assume that PR does not support premultiplied alpha and plan accordingly.

                                   

                                  I appreciate your time and effort tracking this issue.