Quantcast VirtualDub: Loads of Dropped Frames - digitalFAQ.com Forums [Archives]
  #1  
05-11-2003, 06:28 PM
andybno1 andybno1 is offline
Free Member
 
Join Date: Jul 2002
Location: Liverpool, UK
Posts: 832
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to andybno1 Send a message via Yahoo to andybno1
I found a mod version of vdub called virtualdub VCR(some of you lot may have already come across this) I used it today and captured 1hr 45mins with only 28 frames dropped no I'm used to having normal vdub drop 1 frame a minute so when I came back to my capture near the end of the film I was capturing I was a. shocked and b. a very happy chappy. for u peps who wanna knows my settings well here they are:

res: 640X480
codec: Mogan Multimedia MJPEG codec with 100 set in the initial codec selector box and I have 80 down for the codecs settings with forced quality selected.
filters: Deinterlace set 4 times (still leaves finished avi with thoes lines )
25fps audio set to cd quality

disk IO: Chunk size - 16MB chunks in buffer - 2, total buffer is 32768k and disable windows write buffering ticked.

well I don't know about u lot but goin from 1 frame dropped a min to 28 frames in total for 1hr 45min this prog kicks vdub ass for capturing.

download the prog from here.
Reply With Quote
Someday, 12:01 PM
admin's Avatar
Site Staff / Ad Manager
 
Join Date: Dec 2002
Posts: 42
Thanks: ∞
Thanked 42 Times in 42 Posts
  #2  
05-12-2003, 09:55 AM
Boulder Boulder is offline
Free Member
 
Join Date: Sep 2002
Location: Lahti, Finland
Posts: 1,652
Thanks: 0
Thanked 0 Times in 0 Posts
No need to deinterlace while capturing, do that when you encode the clip. This saves CPU cycles and you'll probably end up with zero dropped frames. The disk I/O settings are also fine by default, you may get some problems with such large values.

The reason why the original VirtualDub drops frames is to keep the audio and video in sync. Of course it may drop frames if you don't have enough CPU power or your HD is not fast enough. VirtualDubVCR and VirtualDubMod use a resampling feature which resamples the audio on-the-fly so that it doesn't go off sync.
Reply With Quote
  #3  
05-12-2003, 03:37 PM
andybno1 andybno1 is offline
Free Member
 
Join Date: Jul 2002
Location: Liverpool, UK
Posts: 832
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to andybno1 Send a message via Yahoo to andybno1
oh I do need to deinterlace whilst capturing, I have tried deinterlacing after capturing and it looked bad. I had disk I/O as default initially and had in vdubvcr 1 frame dropped a min. I have 1.1ghz pentium celeron 256mb ramand 8ogb so I would say I have a decent enough power for capturing and enough disk space to capture using mjpeg codec.
Reply With Quote
  #4  
05-13-2003, 04:25 AM
Boulder Boulder is offline
Free Member
 
Join Date: Sep 2002
Location: Lahti, Finland
Posts: 1,652
Thanks: 0
Thanked 0 Times in 0 Posts
What kind of deinterlacing did you try? Believe me, you're much better off deinterlacing when post-processing the clip.

If you use Avisynth and FieldDeinterlace from the Decomb package and there's still comb artifacts, you just have to adjust the threshold accordingly.

TomsMoComp is a very good deinterlacer. All you need to know is whether your clip is top field first or bottom field first. Here's a post by Tom Barry in the Doom9 forum:

Code:
Useful function for checking TopFirst 
When is a clip "TopFirst"? 

Interlaced video clips have 2 different fields in each frame and you are never quite sure which one was intended to be displayed first and which second when displaying interlaced or when deinterlacing. But some of my filters (GreedyHMA, TomsMoComp) make you specify that when invoking them. 

So I just wrote a quickie Avisynth function that makes it easy to know if the clip is stored "TopFirst". The following function will do it fairly reliably: 

later edit: see updated version on page 2 of this thread. 



code:--------------------------------------------------------------------------------
function CheckTopFirst(clip v1){
t0=v1.ComplementParity
t1=t0.separatefields
t2=compare(t1.trim(1,0),t1)
b1=v1.separatefields
b2=compare(b1.trim(1,0),b1)
return stackvertical(t2,b2)}
--------------------------------------------------------------------------------


Run the function with something like: 

v=AVISource("C:\whatever\bikes.avi") 
CheckTopFirst(v) 

Then preview a few frames. It will use Compare to evaluate the two possibilities and vertically stack the results. This shows 2 useful pieces of info. First the preview of either the top or bottom half of the screen will probably be jerky, so choose the other one. 

But just as reliable is the "Avg Mean Abs Dev" value that is displayed for each. Choose either the top (TopFirst=1) or bottom (TopFirst=0) clip that has the LOWEST value for Avg Mean Abs Dev. 

Picture attached. In this example the Avg Mean Abs Dev is 6.143 for the top and 7.549 for the bottom, so the clip is TopFirst. 

- Tom
Just use TomsMoComp(0,5,1) for bottom field first and TomsMoComp(1,5,1) for top field first in your Avisynth script. Deinterlacing must be done before any other processing so you should place the line right after your AVISource line.

You can find the TomsMoComp DLL here:

http://forum.doom9.org/showthread.php?s=&threadid=28778

Remember to extract the correct DLL, there's one for AviSynth 2.5x and one for 2.0x.
Reply With Quote
  #5  
05-13-2003, 06:32 AM
ozjeff99 ozjeff99 is offline
Free Member
 
Join Date: May 2002
Location: Sydney, Australia
Posts: 159
Thanks: 0
Thanked 0 Times in 0 Posts
I agree with post Deinterlacing. In fact my even my P4 could not be fast enough to Deinterlace on the fly.

Interesting script Boulder but I'm not sure if I can trust it. Correct me if I am wrong but I believe that it assumes Avisynth will make the "t0" clip top first (TFF). This is a reasonable assumption only if clip "v1" has no field order data of its own in which case Avisynth will make it bottom first (BFF) and give correct result. To be sure I prefer to use:

AssumeFrameBased()
SeparateFields()

on the input clip which throws away all field order data and forces clip to be BFF and then look at resulting field string in Vdub (right-click for x2 magnification). As you advance clip one field (now a frame) at a time you will see by the forward motion whether or not BFF is correct. If it jerks back and forth then it is TFF.

Often, a capture card drops a field (not a frame) and a segment within the clip reverses field order. This method enables you check all the way along the clip to see that this has not happened. If it does, I note position and use ComplimentParity() in the script just on that segment.

When the card switches fields (ie spacially not temporaly) it is another story as you probably know. This can also be checked in Vdub(mod).

Because Deinterlace() in Decomb fuses the 2 fields, the temporal placement is not important so I prefer to use it with less trouble.

Sorry to rave on but I have seen on Doom9 how much trouble getting this wrong has caused people particulary if interlacing is maintained for SVCD coding.

Ozjeff99
Reply With Quote
  #6  
05-13-2003, 07:13 AM
Boulder Boulder is offline
Free Member
 
Join Date: Sep 2002
Location: Lahti, Finland
Posts: 1,652
Thanks: 0
Thanked 0 Times in 0 Posts
Hey, comments are always contributing

Actually there's some discussion in the thread I took that post from, find it here:

http://forum.doom9.org/showthread.php?s=&threadid=34511
Reply With Quote
  #7  
05-13-2003, 02:42 PM
andybno1 andybno1 is offline
Free Member
 
Join Date: Jul 2002
Location: Liverpool, UK
Posts: 832
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to andybno1 Send a message via Yahoo to andybno1
well I was using blend fields deinterlace, wow boulder u sure are one handy guy, first u help with my script probs now this thanx a lot and thanx for the help ozjeff99.
Reply With Quote
  #8  
05-13-2003, 10:29 PM
rendalunit rendalunit is offline
Free Member
 
Join Date: Apr 2002
Location: san jose, Ca
Posts: 1,148
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by boulder
TomsMoComp is a very good deinterlacer. All you need to know is whether your clip is top field first or bottom field first. Here's a post by Tom Barry in the Doom9 forum:

Code:
Useful function for checking TopFirst
When is a clip "TopFirst"?

Interlaced video clips have 2 different fields in each frame and you are never quite sure which one was intended to be displayed first and which second when displaying interlaced or when deinterlacing. But some of my filters (GreedyHMA, TomsMoComp) make you specify that when invoking them.

So I just wrote a quickie Avisynth function that makes it easy to know if the clip is stored "TopFirst". The following function will do it fairly reliably:

later edit: see updated version on page 2 of this thread.



code:--------------------------------------------------------------------------------
function CheckTopFirst(clip v1){
t0=v1.ComplementParity
t1=t0.separatefields
t2=compare(t1.trim(1,0),t1)
b1=v1.separatefields
b2=compare(b1.trim(1,0),b1)
return stackvertical(t2,b2)}
--------------------------------------------------------------------------------


Run the function with something like:

v=AVISource("C:\whatever\bikes.avi")
CheckTopFirst(v)

Then preview a few frames. It will use Compare to evaluate the two possibilities and vertically stack the results. This shows 2 useful pieces of info. First the preview of either the top or bottom half of the screen will probably be jerky, so choose the other one.

But just as reliable is the "Avg Mean Abs Dev" value that is displayed for each. Choose either the top (TopFirst=1) or bottom (TopFirst=0) clip that has the LOWEST value for Avg Mean Abs Dev.

Picture attached. In this example the Avg Mean Abs Dev is 6.143 for the top and 7.549 for the bottom, so the clip is TopFirst.

- Tom
boulder, thanx for posting that-- top/bottom fields first has always confused me

-ren
Reply With Quote
  #9  
05-13-2003, 11:14 PM
ozjeff99 ozjeff99 is offline
Free Member
 
Join Date: May 2002
Location: Sydney, Australia
Posts: 159
Thanks: 0
Thanked 0 Times in 0 Posts
As mentioned Ren I would include the line :

AssumeFrameBased(v1)

up front to ensure Avisynth renders BFF input to the rest of the script. This would be particularly true if v1 was derived from an Mpeg2 source that is TFF in which case t(1) would be a bottom led field stream and give the wrong result. I'll check further with originator.

ozjeff99
Reply With Quote
  #10  
05-13-2003, 11:50 PM
ozjeff99 ozjeff99 is offline
Free Member
 
Join Date: May 2002
Location: Sydney, Australia
Posts: 159
Thanks: 0
Thanked 0 Times in 0 Posts
Hi Bouder, I checked the thread and there is definitely doubt that above script will always work. My understanding is that Avisynth will default to BFF if there is no file info to the contrary. If there is file info it could be wrong!!! So there is no way of knowing whether t(1) is a top led field stream

As I mentioned above sure fire method is to force Avisynth to supply BFF irrespective of file info, then check field stream (using SeparateFields()) in Vdub. If OK then you know what Avisynth will deliver. If it is wrong use ComplimentParity() which will deliver BFF which will be correct.

A very important thing as I mentioned is field shifting (reversal) occuring during captures, as well as rips, and these will not be picked up either in above script. If you want to stay interlaced, this is a real prob as it will cause jerkyness in parts of your resulting encode. It is also a prob if you deinterlace with program that needs field order (as above). Once you have found them in Vdub they are easily fixed. Just take a note of the range in the field clip above, and in your script trim out one field, Weave() and add back in. This provides correct paring. I have sample script if anyone is interested. It's full proof.
Reply With Quote
  #11  
05-14-2003, 12:39 AM
Boulder Boulder is offline
Free Member
 
Join Date: Sep 2002
Location: Lahti, Finland
Posts: 1,652
Thanks: 0
Thanked 0 Times in 0 Posts
Please post the script, I'm interested
Reply With Quote
  #12  
05-14-2003, 08:29 AM
ozjeff99 ozjeff99 is offline
Free Member
 
Join Date: May 2002
Location: Sydney, Australia
Posts: 159
Thanks: 0
Thanked 0 Times in 0 Posts
Hi Boulder

I thought the answer to your question should be under a different topic heading so please see post at:

http://www.kvcd.net/forum/viewtopic.php?p=25993#25993

Cheers
Ozjeff99
Reply With Quote
Reply




Similar Threads
Thread Thread Starter Forum Replies Last Post
Recording Video: Dropped Frames and Audio sync errors! the viking Video Capturing / Recording 19 01-06-2005 10:42 AM
Why are frames dropped with MencodeME v023 glent2k3 Video Encoding and Conversion 5 05-29-2004 08:06 AM
TMPGEnc: Dropped frames? encoded video plays with fast forwarding FireBlade Video Encoding and Conversion 1 01-26-2004 04:17 AM
Help with my hardware - dropped frames while recording MrTibs Video Capturing / Recording 22 11-22-2003 07:07 AM
close apps in system tray to avoid dropped frames! rendalunit Video Capturing / Recording 4 08-06-2002 01:31 AM

Thread Tools



 
All times are GMT -5. The time now is 09:27 AM  —  vBulletin © Jelsoft Enterprises Ltd