3 Replies Latest reply on Jun 6, 2010 6:53 AM by FTQuest

    aspect ratio correction




      My videos are encoded with a resolution of 640x480, but the aspect ratio must be 16:9, so I need to scale my videos to 848x480. This is my code:


      var ratioCorrection:LayoutMetadata = new LayoutMetadata();
      ratioCorrection.width = 848;
      ratioCorrection.height = 480;
      element.addMetadata(LayoutMetadata.LAYOUT_NAMESPACE, ratioCorrection);


      It works, but if I go to fullscreen the video doesn't scale at all. How can I change "internally" the size of the video, so if I scale my container it will scale the video correctly?


      Please help me! thanks.

        • 1. Re: aspect ratio correction
          FTQuest Level 3



          Looking at the numbers you use - in this post and previous one - you seem to confuse two things: the aspect ratio of the picture and the aspect ratio of individual pixel.

          The pixels that you initially work with - from your anamorphic video - are NOT square. They are stretched horizontally. Computer monitor always uses square pixels, therefore your numbers won't give you correct 16:9 picture. By changing the width/height in the layout property you simply change the number of pixels used.

          Changing your encoding numbers should solve the problem. You may want to go to forums such as FCP to clarify the issue.



          • 2. Re: aspect ratio correction
            dr_dano Level 1

            Yes, I know. but, is there another way to do this without encoding my videos again? I have hundreds of videos.

            • 3. Re: aspect ratio correction
              FTQuest Level 3

              IMHO even if you come up with a trick that works on one particular platform, you would still face uncertainty how it would behave on multitude of hardware/software combinations out there. In other words you leave end user at the mercy of a chance.

              So, I'd go back to video encoding, take one small sample, find the optimal parameters, and then let your computer do batch processing for all your videos.