locked
How to play raw h.264 video in metro environment

    Question

  • We plan to develop a h264 streaming player, by receiving network packets with h264 frames, and either play using a Windows metro component (eg. media element etc.) or loading a h.264 decoder and play with directshow.

    Any suggestion on how we can do in Windows 8 metro environment?
    1. What windows component may support to play raw h.264 frames?
    2. Is there h264 decoder available in metro environment? If there is, how can we use it?

    Thank you!

    Monday, January 2, 2012 3:22 AM

Answers

  • Hello Allen,

    Please note that I modified my post above. We don't support RTP but rather the MPEG-4 Part 14 container format. You will need to write our own source to be able to parse the data a pass it directly to the Microsoft decoder. At this time we do not have any samples on how to write a custom source and have it loaded from your Metro style app. Unfortunately it is not possible to simply use the documentation to figure out how to do this. I have been talking with Stan and we are trying to figure out how and when we can make this information available.  As soon as this information is available I will announce it on my blog http://blogs.msdn.com/mediasdkstuff/.

    Thanks for your patience,

    James

    Friday, January 13, 2012 1:42 AM
    Moderator

All replies

  • We planto develop a h264 streaming player, by receiving network packets with h264 frames, and either play using a Windows metro component (eg. media element etc.) or loading a h.264 decoder and play with directshow.

    Any suggestion on how we can do in Windows 8 metro environment?
    1. What windows component may support to play raw h.264 frames?
    2. Is there h264 decoder available in metro environment? If there is, how can we use it?

    Thank you!

    Monday, January 2, 2012 3:20 AM
  • Josephu,

    If your h.264 frames are wrapped in an MPEG-4 Part 14 container then you should be able to use the h.264 codec that will ship with Windows 8. You should be able to use the “media element” and connect directly to your MPEG-4 Part 14 / h.264 host. If for some reason your host does not use the MPEG-4 Part 14 container you will need to write your own MF components to parse your proprietary  protocol and container and then offer the raw frames to the Microsoft decoder.

    I hope this helps,

    James

    Windows Media SDK Technologies
    Microsoft Developer Services

    http://blogs.msdn.com/mediasdkstuff/


    Friday, January 6, 2012 10:50 PM
    Moderator
  • Hi James,

     

    Is there any APIs or documents or sample code about offering raw framws to the Microsoft decoder on Metro environment?

    We already get raw h.264 frames but still unable to decode it by mediaElement.

    It works for a h.264 file but raw frames... 

     

    I have created 2 sample files,

     

    1. output2.mp4 which has frames encoded in h264.

    2. the raw h264 content extracted from the mp4 file

    I have tested mediaElement.SetSource(mediaStreamSource, “video/mp4”) with (1) and it works.

    But while using mediaElement.SetSource(mediaStreamSource,”video/h264”), we receive the message MF_MEDIA_ENGINE_ERR_SRC_NOT_SUPPORTED.

     

    Thank you very much!

    Sunday, January 8, 2012 4:24 AM
  • Hello Allen,

    Please note that I modified my post above. We don't support RTP but rather the MPEG-4 Part 14 container format. You will need to write our own source to be able to parse the data a pass it directly to the Microsoft decoder. At this time we do not have any samples on how to write a custom source and have it loaded from your Metro style app. Unfortunately it is not possible to simply use the documentation to figure out how to do this. I have been talking with Stan and we are trying to figure out how and when we can make this information available.  As soon as this information is available I will announce it on my blog http://blogs.msdn.com/mediasdkstuff/.

    Thanks for your patience,

    James

    Friday, January 13, 2012 1:42 AM
    Moderator
  • James:

    I'm searching for similar solution of decoding raw H264 frame by frame in byte buffer in WinRT too.
    Do you have more information about writing the media source now? And I found the CLSID of MF
    H264 decoder CLSID_CMSH264DecoderMFT is between the preprocessor
    WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) in wmcodecdsp.h, so I'm not sure
    it's possible to use the MF H264 decoder?

    Friday, February 17, 2012 10:07 AM
  • I also would like to know how to input raw h264 view and aac audio frames in metro.

    I have video being transported over a custom protocol and need to be able to display it, ideally with the built in decoders so I wouldn't have to ship my own decoders (and try to get them for arm....)

    Wednesday, August 1, 2012 5:39 PM
  • Was there ever an update for this? I couldn't see anything new about RTSP on your blog.

    Sunday, April 12, 2015 12:59 AM
  • Are there any updates ?   I'm looking forward to the solution as well !!!
    Friday, May 29, 2015 10:39 AM
  • Anything new in Windows 10 about this ??? 
    Friday, May 29, 2015 10:40 AM