How to play stream video - raw h264 frames with media element? RRS feed

  • Question

  • I want to play a h264 encoded video stream, using mediaElement. (The develop environment is Windows Developer Preview, Windows 8)

    I tried first using a file of h264 encoded MP4 file, and we can play using below API.

     mediaElement.SetSource(mediaStreamSource, "video/mp4");

    However, when I tried a raw video encoded in h264 (xxx.h264) raw file, the video cannot play.

      mediaElement.SetSource(mediaStreamSource, "video/h264");

    I also created a memory stream to store our raw video frames from network and use

      mediaElement.SetSource(mediaStreamSource, "video/h264");

    The video will not play either.

    Therefore, my question is, (1) can mediaElement support playing streaming raw video frames? If it does, then (2) what may be the proper way to use it?

    Thank you!


    Monday, December 26, 2011 6:19 AM

All replies

  • Raw H264 content cannot be played through the media element or other multimedia APIs in Windows.  There is no parser that handles raw h264 files and supplies their raw frames.
    Saturday, January 14, 2012 12:37 AM