0

I am trying to decode mpeg4 frames using media foundation with no luck. Using MFTrace i've found that the decoder keeps requesting samples but produces no decoded image. MFTrace log also highlights that the decoder returns need more input.

Currently i am only sending the keyframes to the decoder. All the properties have been set correctly.

Is there something wrong with the mpeg4 decoder on Windows 7 machine or am i doing something wrong.

Any ideas or suggestion would be really helpful as i have been stuck with this problem for over a week now.

Thanks

Kartik150
  • 555
  • 1
  • 5
  • 19
  • You have most probably not sent in the stream level header. If this is obtained from a streaming session (say rtsp) then you may have something like a sdp which you need to feed in. – av501 May 22 '13 at 03:09
  • thanks for the reply. I'm not quite sure with stream level header your referring to. Would you be kind enough to provide me some information or direct me in the appropriate direction. Also when referring to SDP, is it sames as MFVideoInfoHeader [link](http://msdn.microsoft.com/en-us/library/windows/desktop/dd407325(v=vs.85).aspx) – Kartik150 May 22 '13 at 08:45
  • Hi, @av501 i tried your recommendation but still no luck. So i am guessing i am still doing something wrong as decoder still says need more input. I'm guessing the timestamp and duration of each sample is either not set correctly. What is the correct way of setting the timestamps on the sample. Also would it be better for me to use a Source Reader than a media session ?. – Kartik150 May 23 '13 at 08:35
  • I am not sure on the mft details. But a raw stream decoder would not care for timestamps of samples. It simply gets a frame of bitstream data and gives a yuv out. If there is none out it means it does not have a frame to decode or did not get the header right. So if your decoder is saying it needs more input then I am not sure this is the issue. If it is wrapped by something that needs timestamps then perhaps fixing that will help. – av501 May 26 '13 at 12:47

0 Answers0