Re: LEAD Screen Capture Filter (2.0) drops a lot of frames
Started by AVIFreak at 12-13-2007 9:08. Topic has 9 replies.
|
|
12-13-2007, 9:08
|
AVIFreak
Joined on 07-12-2007
Posts 10
|
LEAD Screen Capture Filter (2.0) drops a lot of frames
|
 
 
|
|
|
Hello,
I have a graph that looks like this:
LEAD Screen Capture (2.0) -----> AVI Mux -----> File Writer
Initially, I had some RGB conversion and video overlay in that graph, but I took it out to try and figure out the problem. I have the frame rate in the Screen Capture filter set to 30 fps. If I run the above graph for 10 seconds (should generate 300 frames), the AVI mux states that it almost 190 frames were dropped. I look at the generated AVI file and, while the total length is correct, there are a lot of frozen frames and places in the video where it's obvious that a LOT of frames have been dropped.
I am running on a dual-core XP machine with an NVIDIA Quadro 1300 and DirectX 9.0c installed.
Why does it do this? How can I fix it????
Please help!! This is an urgent customer need.
Thanks in advance,
E
|
|
|
|
|
Report
|
|
|
|
12-13-2007, 14:44
|
GregR

Joined on 05-31-2006
In House
Posts 1,536
|
Re: LEAD Screen Capture Filter (2.0) drops a lot of frames
|
 
 
|
|
|
The screen capture filter must capture in real time. Therefore for it must drop frames in order to catch up with the output it's creating. This also depends on the output compressor you are using. If you use an encoder like H264, it will have to drop more frames than MPEG4 in most cases.
If you want to drop the least amount of frames with the Screen Capture filters, you will need to capture full frames, then use the ltmmConvertCtrl to convert it to the format you desire after the capture process is complete.
Greg Ross LEADTOOLS Technical Support
|
|
|
|
|
Report
|
|
|
|
12-13-2007, 14:54
|
AVIFreak
Joined on 07-12-2007
Posts 10
|
Re: LEAD Screen Capture Filter (2.0) drops a lot of frames
|
 
 
|
|
|
Greg,
Thanks for the reply.
My next two question would be:
The way I had planned on implementing this was to make the graph in GraphEdit and then reproduce that graph in code (i.e. making a filter graph, connecting the filters, etc.) Should I not do it this way now? Can I not do it this way?
The problem becomes, if I have to save the frames until after the capture is done, then I have to also capture and save all the frames from my 2nd source of video that I'm mixing with the screen captures until i'm done AND the audio I need to mix in...then post-mux it all together into a AVI file...
Is there an example in the SDK anywhere on how to do this kind of thing? I can post a copy of the graph I would ultimately like to run instead of the simplified example from the previous post.
Thanks,
E
|
|
|
|
|
Report
|
|
|
|
12-13-2007, 17:24
|
GregR

Joined on 05-31-2006
In House
Posts 1,536
|
Re: LEAD Screen Capture Filter (2.0) drops a lot of frames
|
 
 
|
|
|
Let me understand your goals properly first. Are you trying to capture multiple video and audio streams into one file all at the same time?
Please explain what your goals are here because that will help detemine what kind of approach you might take if it's possible.
Greg Ross LEADTOOLS Technical Support
|
|
|
|
|
Report
|
|
|
|
12-14-2007, 7:47
|
AVIFreak
Joined on 07-12-2007
Posts 10
|
Re: LEAD Screen Capture Filter (2.0) drops a lot of frames
|
 
 
|
|
|
Greg,
OK, here is what we are trying to do. I have 2 streams of video that I need to mix together with an audio stream.
Video Stream 1:
Screen Capture -> RGB Converter -> Video Overlay Mixer
This is the first video stream. It is taking screen captures of the desktop and sending them to the LEAD Video Overlay Mixer.
Video Stream 2:
Video Capture USB -> LEAD Video Resize -> Video Overlay Mixer
This is an external camera feed that will get mixed into the lower right corner of the desktop captures using the same Video Overlay Mixer as Stream 1. This mixed stream will then be fed into the MJPEG compressor then to the AVI mux.
Audio Stream:
Audio Capture USB -> MP3 Compressor -> AVI mux
Self-explanatory. We want to mix this compressed audio stream with the mixed, compressed video streams from above into some sort of video file. (AVI at the moment)
So, what I've been trying to do is to get a filter graph together in GraphEdit so I can figure out what I need to get it to work and then I will translate that to C++ code.
Let me know if you need any more info, and thanks as always.
E
|
|
|
|
|
Report
|
|
|
|
12-14-2007, 14:34
|
GregR

Joined on 05-31-2006
In House
Posts 1,536
|
|
|
Unfortunately, this is not possible with our toolkit, but we do have a Video Overlay filter that can do this, but you have to use it in low-level DirectShow. Additionally, we won't give support for low level DirectShow programming, but I'm willing to help with the concept since you're using our filters.
I was able to successfully create an AVI according to your description. I've attached an AVI file, the graph I used to create it, and a screenshot of the graph in case you're missing any of the filters.
A possible workaround would be to use our callback filter in all live captures. Using the callback you could grab the bitmap for that frame, then using our Raster SDK to combine the images, then multiplex the audio in using the ltmmMultiStreamSource. I would imagine that this would take even more processing and produce more dropped frames than creating a graph like above with DirectShow.
Greg Ross LEADTOOLS Technical Support
|
|
|
|
|
Report
|
|
|
|
12-17-2007, 7:38
|
AVIFreak
Joined on 07-12-2007
Posts 10
|
Re: LEAD Screen Capture Filter (2.0) drops a lot of frames
|
 
 
|
|
|
Greg,
The graph you sent me is the exact graph I created. Does your graph drop frames too? How is it that this graph that I've created and you've subsequently replicated drops major amounts of frames on my PC and not on yours?
Thanks,
E
|
|
|
|
|
Report
|
|
|
|
12-17-2007, 10:44
|
GregR

Joined on 05-31-2006
In House
Posts 1,536
|
Re: LEAD Screen Capture Filter (2.0) drops a lot of frames
|
 
 
|
|
|
If it's the same codecs and same graph, then the problem is likely in your hardware and possibly the settings of the filters and codecs. The more processing you do or the longer it takes to do the processing the more frames that will be dropped from your input source(s).
I'm using XP with a Intel Core 2 duo 6600 (2.4 GHz) and 2GB of RAM and an 80 GB SATA HD. The video card shouldn't have an affect since nothing is getting rendered to the screen when running this graph in GraphEdit. Therefore your main hardware factors should only be your processor, RAM, and hard disk. It sounds like our processors may be similar, so the difference is probably in the RAM or the HD, mine is SATA which is a lot faster than IDE, so that could be the problem.
The biggest affects filter wise is the capture size of the Screen Capture filter (mine was capturing the entire screen at 1280x1024) and then the resize filter (I don't remember what I resized it to).
Greg Ross LEADTOOLS Technical Support
|
|
|
|
|
Report
|
|
|
|
12-17-2007, 11:54
|
AVIFreak
Joined on 07-12-2007
Posts 10
|
Re: LEAD Screen Capture Filter (2.0) drops a lot of frames
|
 
 
|
|
|
I am using something very similar: XP Intel Xeon dual-core 3.0 gHz 2.0 GB of RAM 80 GB SCSI Hard Drive
I am also capturing the desktop at 1280x1024. Ignoring the resize filter for a second, even if I just use the desktop capture straight to the AVI mux by itself, it still drop 60-75% of the frames.
E
|
|
|
|
|
Report
|
|
|
|
12-18-2007, 9:09
|
GregR

Joined on 05-31-2006
In House
Posts 1,536
|
Re: LEAD Screen Capture Filter (2.0) drops a lot of frames
|
 
 
|
|
|
I can't say for sure why you are having more frames dropped than I appear to have dropped. Either way dropping frames is inevitable when capturing live data, and the only ways to minimize it are these:
1. Limit the processing you are doing while capturing 2. Increase your computer's physical power 3. Capture your streams to disk uncompressed, then do your processing on the files instead of live streams
Greg Ross LEADTOOLS Technical Support
|
|
|
|
|
Report
|
|
|
|
|
LEAD Support Fo... » Developer » Multimedia Filt... » Re: LEAD Screen Capture Filter (2.0) drops a lot of frames
|
|
Copyright LEAD Technologies, Inc. 2008
