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

    Can OSMF access video metadata to test for h264 codec?

    William Spence Level 1

      I am a complete OSMF newbie, so bear with me.  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 can open a MOV file, but if it is not in an H264 wrapper, it will not play.  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 OSMF offer any components that are capable of this currently?


      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: Can OSMF access video metadata to test for h264 codec?
          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!!!