Page 1 of 1

MP4 File Writing

PostPosted: Tue Feb 19, 2013 11:12 am
by brass286

I have a question capturing the NALPackets from BlackMagic SDK and DeckLink Streaming Device to MP4 Device in C#.NET using MediaFoundation.NET. Currently, I am following the example as given in this tutorial: ... 85%29.aspx

I am not able to create a Sink Writer with pMediaTypeOut to YUY2/NV12. It is giving a COM exception (invalid Media Type). pTypeMediaTypeIn is set to H264.

And If I create a Sink Writer and set the pMediaTypeOut and pTypeMediaTypeIn to H264 after HandleStreamChange (as given in Streaming Preview C++ example), I am able to initialize the Sink Writer. Then I go through the process of creating IMFSample from NALPackets, set SampleTime, SampleDuration and use WriteSample. I am able to create the MP4 file but it is not playing with Windows Media Player/Quick Time Player.

Please help on how to register the sink writer with pMediaTypeOut to YUY2/NV12 and how to get the mp4 file to play with Windows Media Player

Thank you,

Re: MP4 File Writing

PostPosted: Wed Feb 20, 2013 1:41 am
by Sarah Jones
I think this question might be better answered via our developer list ... -developer