views:

212

answers:

2

Hello

I build a DirectShow graph consisting of my video capture filter (grabbing the screen), default audio input filter both connected through spliiter to WM Asf Writter output filter and to VMR9 renderer. This means I want to have realtime audio/video encoding to disk together with preview. The problem is that no matter what WM profile I choose (even very low resolution profile) the output video file is always "jitter" - every few frames there is a delay. The audio is ok - there is no jitter in audio. The CPU usage is low < 10% so I believe this is not a problem of lack of CPU resources. I think I'm time- stamping my frames correctly. What could be the reason?

Below is a link to recorder video explaining the problem:

http://www.youtube.com/watch?v=b71iK-wG0zU

Thanks Dominik Tomczak

+1  A: 

I have had this problem in the past. Your problem is the volume of data being written to disk. Writing to a faster drive is a great and simple solution to this problem. The other thing I've done is placing a video compressor into the graph. You need to make sure both input streams are using the same reference clock. I have had a lot of problems using this compressor scheme and keeping a good preview. My preview's frame rate dies even if i use an infinite Tee rather than a Smart Tee, the result written to disk was fine though. Its also worth noting that the more of a beast the machine i was running it on was the less of an issue so it may not actually provide much of a win if you need both over sticking a new faster hard disk in the machine.

Goz
A: 

Hello

I don't think this is an issue. The volume of data written is less than 1MB/s (average compression ratio during encoding). I found the reason - when I build the graph without audio input (WM ASF writer has only video input pint) and my video capture pin is connected through Smart Tree to preview pin and to WM ASF writer input video pin then there is no glitch in the output movie. I reckon this is the problem with audio to video synchronization in my graph. The same happens when I build the graph in GraphEdit. Without audio, no glitch. With audio, there is a constant glitch every 1s. I wonder whether I time stamp my frames wrongly bu I think I'm doing it correctly. How is the general solution for audio to video synchronization in DirectShow graphs?

dominolog