CAsfMuxFilter audio/video sync problem

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Back here again after a few more days of investigating ASF streaming
in DirectShow...

First I struggled with creating my own profile that could handle input
streams compressed with a custom codec. Then I had a look at the
CAsfMuxFilter (http://www.riseoftheants.com/mmx/faq.htm#wmvmuxsample)
which did what I wanted. I use the Asf mux with a network sink, the
stream is then replayed in WMP. The behaviour described below is the
same when the stream is rendered to a file. Using compression or not
doesn't affect the situation.

When the filter is connected to a single video or audio stream it
works fine. However, when I add both audio and video input to the Asf
mux it is not played correctly in the receiver. It seems like when a
sound sample is received (typically 500ms) then all video frames
belonging to this sample (15 when fps is 30) are played immediately.
So the frame rate of the video becomes 2 fps in practice. I hope you
understand what I mean, otherwise I can upload a sample file.

So it seems like there is a problem in the ASF mux filter, I know I
have the source of it so that might be the next thing to investigate.
However, I would need some help to get forward here because I might be
better trying to solve this problem in another way. I have my own
custom network transfer filter but I started investigating ASF
streaming because I hoped that it would take care of the complex
buffering and synchronization (3 streams at the receiver) for me.

The following is the timestamps of the samples that arrives to the ASF
mux, the first columns are the timestamp of the debug printout
(uncompressed Audio and video at 10 fps). Seems like the samples
sometimes arrive at the same time in the ASF mux...

88 2008.3.27 11:1:57.542 Index: 1, start: 30502225, end:
31502225
89 2008.3.27 11:1:57.542 Index: 1, start: 31501908, end: 32501908
90 2008.3.27 11:1:57.542 Index: 1, start: 34501635, end: 35501635
91 2008.3.27 11:1:57.636 Index: 2, start: 36150000, end: 37140000
92 2008.3.27 11:1:57.745 Index: 2, start: 37140000, end: 38150000
93 2008.3.27 11:1:57.839 Index: 2, start: 38150000, end: 39140000
94 2008.3.27 11:1:57.933 Index: 2, start: 39140000, end: 40140000
95 2008.3.27 11:1:58.42 Index: 2, start: 40140000, end: 41150000
96 2008.3.27 11:1:58.42 Index: 1, start: 35501571, end: 36501571
97 2008.3.27 11:1:58.42 Index: 1, start: 36491668, end: 37491668
98 2008.3.27 11:1:58.42 Index: 1, start: 39491744, end: 40491744
99 2008.3.27 11:1:58.136 Index: 2, start: 41150000, end: 42040000
100 2008.3.27 11:1:58.230 Index: 2, start: 42040000, end: 43040000
101 2008.3.27 11:1:58.323 Index: 2, start: 43040000, end: 44050000
102 2008.3.27 11:1:58.433 Index: 2, start: 44050000, end: 45140000
103 2008.3.27 11:1:58.542 Index: 2, start: 45140000, end: 46150000

.



Relevant Pages

  • Re: ASF capabilities
    ... Does ASF file can have clickable area as in MOV files? ... data stream which can be used with our interactive web solution - the ... A typical example might be this video about LSD tests on British ... placeholders are available - WMV, WMA, Script streams, HTML streams. ...
    (microsoft.public.windowsmedia.sdk)
  • Re: Is there a way to create ASF MJPEG formatted file?
    ... > Ken Varn wrote: ... >> that has the ability to stream it to Windows Media ... >> sure if ASF can have video in the format of MJPEG. ...
    (microsoft.public.win32.programmer.mmedia)
  • Re: IWMEncStreamEdit remuxing error: NS_E_VIDEO_CODEC_NOT_INSTALLED
    ... OK well a good tool to analyse ASF content is Sliq Media's WMSnoop. ... I seem to remember Axis cameras typically encode to MPEG4 video so I ... why IWMEncStreamEdit can't handle the axis ... // Add the video stream from the second audience. ...
    (microsoft.public.windowsmedia.sdk)
  • Re: FiltersAsync sample with WMA?
    ... > memory byte stream instead of from a file. ... the stock file source filter does using the registry (but it ... nothing about the stream format. ... (WMA is an audio-only ASF). ...
    (microsoft.public.win32.programmer.directx.audio)
  • Re: Can not start playing video wherever I want in an ASF file being b
    ... > WMFormat v9.5 SDK), it is impossible to start playing ... > of the ASF format? ... I have only one stream, ...
    (microsoft.public.windowsmedia.sdk)