5 Replies Latest reply on Aug 26, 2010 2:18 PM by jbodinet

    CS5 Pixel Aspect Ratio Problems...

    jbodinet Level 1

      Hello All,

       

      I am working on porting over an existing .mov file importer from Windows to Mac while also upgrading it from CS4 to CS5 (and also rolling in the creation of a hand-written 64-Bit QuickTime file handling library to boot, ouch).

       

      In my current test bed I am having problems with certain 1920 x 1080 .mov files. Some 1920x1080 files that I have get imported properly, some files that I have get imported with the wrong aspect ratio. I have verified that both files should be displayed using square pixels and have also verified that when the selector is sent that calls SDKGetInfo8( ) that I am setting the following for **all** of the above-mentioned test files:

       

      SDKFileInfo8->vidInfo.pixelAspectNum = 1
      SDKFileInfo8->vidInfo.pixelAspectDen = 1

       

      I have stepped line-by-line through SDKGetInfo8( ) and the stretched and non stretched clips seem to yield exact same traces through this function. However, the files that are being imported with the wrong aspect ratio, of course, preview in a stretched format. Also, in the informational area of the Source Bin, when the *stretched* clips are selected the information that is provided for these clips is:

       

      NameOfTheStretchedClip.mov
      Video, 1920 x 1080 (1.7778)
      00:00:9:13, 23.976 fps
      etc…

       

      For the clips that aren't stretched, the (1.7778) is (1.0). I am not the biggest expert on the actual usage of Premiere, so I can only assume given the values displayed and the respective visual result of the clips when previewed that this value displayed in the UI is the pixel aspect ratio and not the frame ratio as the clip with (1.7778) is stretched and the clip with (1.0) is not, yet both are 1920x1080 clips. What to me is suspect is that 1920/1080.0 is 1.7778 and so somewhere for the clips that are being stretched the pixelAspect ratio values seem to be getting derived using the pixel dimensions and not the values vidInfo.pixelAspectNum and vidInfo.pixelAspectDen that are explicitly set to '1' as shown above.

       

      Thus my question is, aside from setting in SDKGetInfo8() the following values:
      SDKFileInfo8->vidInfo.pixelAspectNum = 1
      SDKFileInfo8->vidInfo.pixelAspectDen = 1
      Where else are the pixelAspect values supposed to get set?

       

      Alternatively:
      - During which other selector calls *CAN* pixel aspect ratio get set? As I mentioned, I am porting existing code, so perhaps these values are getting set elsewhere that I am presently unable to find.
      - Is there some setting that might get set at the import of a file that says to derive the pixel aspect ratio from the pixel dimensions that might be getting triggered for the clips that are being imported as being stretched?

       

      Thanks in advance for any help!
      Josh

        • 1. Re: CS5 Pixel Aspect Ratio Problems...
          Zac Lam Adobe Employee

          Hey Josh,

           

          Premiere Pro gets the pixel aspect ratio from (1) XMP metadata, (2) imGetInfo8, (3) importer metadata, and (4) Interpretation Rules.txt, in that order.  So if the values you set in imGetInfo8 aren't being honored, it must have to do with the XMP metadata.  Is this for a specific codec or set of codecs, that you're seeing the 1.7778 pixel aspect ratio?

           

          Thanks,

           

          Zac

          1 person found this helpful
          • 2. Re: CS5 Pixel Aspect Ratio Problems...
            jbodinet Level 1

            Hi Zac,

             

            That makes sense as from my test bed there is only one 1920x1080 file that is coming in wacky. The weird part is that I believe all of my test files were written out using the same internally-created QuickTime writer that uses the standard QuickTime libary, and so I would expect them all to get written out in the same fashion - at least with regard to extras like XMP.

             

            All this said, having taken a brief look at documentation online pertaining to XMP, there doesn't seem to be an explicit mention of the usage of XMP in QuickTime movie files. Where would XMP metadata be stored in a QuickTime .mov?

             

            BTW - All the files are for our codec - so the files that are importing properly are for our codec and the file that is importing improperly is also for our codec.

             

            Josh
            • 3. Re: CS5 Pixel Aspect Ratio Problems...
              jbodinet Level 1

              Hi Zac,

               

              I am taking a look at this issue further with the aid of an additional engineer here that has more experience with QuickTime files.

               

              First off, upon viewing the XMP metadata of the stretched file in the Metadata Viewer available inside Premiere, the Video Pixel Format is, in fact, listed in the XMP metadata as 1.78.

               

              However, the time signature on the stretched .mov file, as listed in information of the QuickTime atoms, was 23976 / 1000. On a whim we used Dumpster to change the time signature to 24000 / 1001 to see what would happen. After altering the time signature in the Atoms of the file in this fashion, in Premiere the aspect ratio is now shown to be (1.0) in the source information in the Source Bin and the video is imported in the proper unstretched format (or - better stated - played back via our PlayMod in the proper unstretched format). However when viewing the metadata in the Metadata Browser in Premiere, the "Video Pixel Aspect Ratio" is still showing 1.78. This seems to confuse the issue further as now this time signature alteration in the Atoms of the QT file has fixed something and is now seemingly overriding the order of operations you mentioned as the XMP metadata still seems to list an improper format, yet everything else is seemingly behaving fine.

               

              BTW - Clips with other time signatures don't seem to have this problem.

               

              Any ideas?

               

              Thanks,
              Josh
              • 4. Re: CS5 Pixel Aspect Ratio Problems...
                Zac Lam Adobe Employee

                Hi Josh,

                 

                > Where would XMP metadata be stored in a QuickTime .mov?

                 

                This documentation contains descriptions of the file format specific method of storing XMP:

                http://www.adobe.com/devnet/xmp/pdfs/XMPSpecificationPart3.pdf

                QuickTime is described in section 2.2.4.

                 

                I'm guessing that file with the 1.78 PAR setting in its XMP had been manually modified somewhere along the line in Premiere Pro or Bridge, and isn't really a valid test case.  Let me know if you find a way to produce that using a real-world workflow.

                 

                The fact that the file with 1.78 PAR is showing as 1.0 PAR when the timebase is 24000 / 1001 is technically incorrect.  Perhaps our importer knows that there's no such thing (at least that I'm aware of) as a 1920x1080 clip with 1.78 PAR, so it correctly sets it, whereas it misses the 23976 / 1000 case.  But technically it is incorrect because the PAR should be completely flexible for future formats.  Still, I wouldn't imagine it's really a problem an end-user will hit, is it?

                 

                Regards,

                 

                Zac

                • 5. Re: CS5 Pixel Aspect Ratio Problems...
                  jbodinet Level 1

                  Hi Zac,

                   

                  I believe you are correct RE that file. Bad File. Not sure how it got into the test group.

                   

                  Though, I learned a little bit from the experience   Thanks as always!

                   

                  Josh