MP4 File Writing

Ask software engineering and SDK questions for developers working on Mac OS X, Windows or Linux.
  • Author
  • Message

brass286

MP4 File Writing

PostTue Feb 19, 2013 11:12 am

Hi,

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:

http://msdn.microsoft.com/en-us/library ... 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,
B.Arunkumar
Offline

Sarah Jones

Blackmagic Design

  • Posts: 231
  • Joined: Wed Aug 22, 2012 3:45 pm

Re: MP4 File Writing

PostWed Feb 20, 2013 1:41 am

I think this question might be better answered via our developer list http://lists.blackmagicdesign.com/mailm ... -developer
Sarah Jones

Blackmagic Design

Return to Software Developers

Who is online

Users browsing this forum: No registered users and 8 guests