3 Replies Latest reply on Jan 21, 2009 9:14 AM by rtalton

    VideoDisplay component to play mp4/h.264 content

    flexchief Level 1
      Hi,
      I want to build a simple video player that plays HD movie content.

      Can the VideoDisplay component in flex builder 3 be used play mp4/h.264 content?

      If so how is it done as I have tried setting VideoDisplay's source to a local MP4 file and it will not play? I know for sure that the file is loaded and that it is h.264.

      Can anyone please help me?

      Regards
      Adam
      Flexchief
        • 1. Re: VideoDisplay component to play mp4/h.264 content
          rtalton Level 4
          Hey chief,
          I think you'll find the answer to this issue lies in your encoding, not in Flex.

          The VideoDisplay component plays FLV files and H.264. Your video file must adhere to the MPEG4 specs. If you've created an MP4 file using an Adobe product, this should work if you did not stray too far from the Adobe Media Encoder settings, like trying to squeeze the file size down too far. Flash player 9.0.115.0 or later must be used to view H.264 video.

          If in doubt, use AME to create a small MP4 clip at default settings (use something like "web banner 320x240") and see if that plays. If it plays, start going through all your encoding settings and see if you set something out of spec--like maybe the audio settings. Just use straight AAC for the audio, 48kHz, 192 kbps bitrate. Video, use NTSC (fps shouldn't matter...) progressive, square pixels, "main" profile, "level" of 3. Change the Bitrate encoding to CBR (you are probably using VBR for high quality, but just try it).
          Any of these settings may trip Flex up. You just have to experiment. If this doesn't work, send me some more info on how you created the video file.
          • 2. Re: VideoDisplay component to play mp4/h.264 content
            flexchief Level 1
            Hey rtalton,

            Thanks so much for you fast and hugely helpful response.

            I got it working now perfectly thanks to you! The problem was I was using a different application (not made by adobe) to convert my files into h.264 quality and as you pointed out the problem was indeed with the way these files were being encoded. I simply created a small test animation in photoshop and exported it in h.264. I then pointed the source of the VideoDisplay object at this new file and it played perectly ;-)

            Thank you again rtalton you're a life saver mate!

            Flexchief

            • 3. Re: VideoDisplay component to play mp4/h.264 content
              rtalton Level 4
              Yay, Adobe! Glad it's working.