1 Reply Latest reply on Mar 21, 2012 12:06 PM by William Spence

    Video component that can access metadata to test for H264?

    William Spence Level 1

      Pressing question.  I am writing an Air application that will be used as a video player for content located on the users computer, not streamed across the internet.  Our requirement is that the user can open video in a MOV, AVI, or MP4 wrapper but it has to be encoded using H264.  Flex has a spark videodisplay component that will play the content requirements that we have, but it is not able to check the metadata to test the file for H264.  In other words, the user might open a MOV file, but if it is not in an H264 wrapper, it will not play so we need to stop them from opening inappropriate content.  So I need a video component that can check the video metadata and can give the user feedback that their file is not encoded in H264 if they try and open an inappropriate file.  Does anyone know how to test the metadata for MOV, AVI, or MP4 files to check for H264 encoding?

       

      If not, does anyone have any suggestions on how I can get the video file metadata information?  My only thought is that I could convert the video to a bytearray and then parse it, but I have no idea where the metadata is stored in the various video wrappers.

       

      Thanks for any feedback or thoughts that you can provide!  Getting a little desperate.

        • 1. Re: Video component that can access metadata to test for H264?
          William Spence Level 1

          Here is another thought.  The metadata is stored in different places and formats for MOV, AVI, and MP4 video files based on standards that were set for each wrapper. Once the user selects the file they want to watch, I could use the Filestream class to quickly navigate to the part of the file where the metadata is kept for the various video file formats and attempt to get the codec from the filestream.  I would like to think that this would be quicker than loading an entire ByteArray to analyze the file.

           

          Either way, I would love to hear any comments or thoughts that people have on this.  Trying to find the standards for these movie file formats and reading about how the metadata is stored has not been easy(I don't read HEX, and the standards have been hard to find).  I would be very disheartened if I did all of this work just to find out that the information is easily accessed as a property of the File Class.  So let me know if you think I am on the right track.  Thanks!!!