Reading sample from buffer,writestreamsample dropped all video sample?? RRS feed

  • Question

  •   Body:   I read a live source stream from a network port,then i put the received
    sample of getting throngh onstreamsample function to a queue
    buffer,waiting for a sencond,i get the sample from buffer,using
    writer's writestreamsample to send it to writer.The result asf  file's
    size are correct,but only have audio stream,all samples of video stream
    failed to write to file,i don't know why?? could anyone help me??
    Sunday, July 9, 2006 4:10 AM


  • You're asking about the Windows Media Format SDK; this forum is primarily for Media Foundation questions.  That said, I'll give you a couple ideas for how to figure out what's going wrong here.

    There is lots of good WMFSDK expertise at this newsgroup: http://www.microsoft.com/windows/windowsmedia/community/newsgroups/WindowsMedia/default.mspx?dg=microsoft.public.windowsmedia.sdk&lang=en&cr=US

    First thing, when you create content that you don't think is correct, open it with the ASF Viewer, which you can download at http://www.microsoft.com/windows/windowsmedia/forpros/format/asfviewer.aspx.  The first thing to determine in your case is whether the ASF header even mentions your video stream.  If it doesn't, that means your IWMProfile was probably not set up correctly.

    If the header does know about the video stream, then look for the video frames in the packets.  If you don't see any data for that stream, then you might have given the IWMWriter the wrong parameters for the stream; for instance, if the bitrate and buffer window for that stream were specified too low, then the IWMWriter will drop all or some video frames to stay under the numbers you gave it.


    Monday, July 10, 2006 4:19 PM