PDA

View Full Version : Why I dropped AVI_IO and use VirtualDub VCR now


bb
11th August 2002, 11:09
To get decent quality without getting the HUGE filesizes and processing times when using HUFFYUV, my way to go is the PicVideo MJPEG codec @ quality 19. I used to capture through AVI_IO, and I really have some noise because of this crappy WinTV PCI card (BTW: Hauppauge drivers, I never succeeded in using btwincap, only system crashes).

Somehow I have to get rid of the noise, because I want to encode to DivX5 with reasonable bitrate and good quality. With AVI_IO there's no option to filter the frames before the encoding step (MJPEG). Thus the noise will be encoded, which makes the overall quality worse, and which makes it even harder to get rid of the noise later.

Using VirtualDub VCR (the VirtualDub version with the recording timer, see www.virtualdub.net) I switch on the noise reduction in the video menu (capture mode). This way I get rid of the noise BEFORE encoding to MJPEG, and I encoded films to DivX5 from this MJPEG source without further denoising (no spatial or temporal filters), and I got better quality than ever before!

There were no frame drops due to the extra denoising while capturing on my Athlon 1.3 GHz, Win2000.

bb

BaronVlad
11th August 2002, 12:08
What resolution do you capture ? Full PAL or 1/4 PAL ? I have a very crappy VHS Tape that I want to capture to harddisk, think noise reduction has to be the one to choose, what else is recommended ?

Cheers

BaronVlad

bb
11th August 2002, 19:04
I capture @ 768x576 (full PAL), but what I do is capture from TV source, not VHS.

BaronVlad, in your case you could lower the capture resolution, e.g. to 384x288, although the best way is to capture @ full PAL, then filter and lower the resolution afterwards (512xYYY or even lower). But the high res way is more time&space consuming.

There are a lot of filters available, e.g. spatial & temporal smoothers, sharpeners, color correctors, etc. You have to try which combination and settings work best for you. You might have to deinterlace, too (if you choose the XXXx576 capture resolution, for XXXx288 you don't need to deinterlace). It depends on your source. Make sure you deinterlace correctly...

Hope that helps,

bb

BaronVlad
14th August 2002, 21:15
Thanks for your tips, bb.

I did it this way:
VirtualDub Sync
Capture MJPEG @20
384x574
Vertical reduction 2:1 cubic
Noise Reduction 3 ticks

After the capture:
Divx 2pass
pre processing source strong, gmc...quantizer 8 / 3 etc.
temporal smoother 3 ticks
2nd cleaner optimized with y cropping of 5

What I got was very good quality, for me it was a better view on the TV as the Tape was :sly:

\AX
15th August 2002, 08:08
i boldly started out to write a new driver for my wintv card. what i got was something working but the same damn thing with the card...wouldnt work. the point where i threw in the towel is where i guess i fuc't up and wrote something wrong and had to wind up disabling the pci slot the card was in and then windows would boot correctly. problem was my pinnacle pro card kept trying to acess that driver and i for some reason could not uninstall the driver...gave me the off the wall message saying it couldnt locate it although i could see it. just access denied.

ive tried vdub vcr a few times i ran into the reoccurring problem of asynch audio that was really asynch. i cap off cable/sat and after about the 7min mark it just goes asynch.

so i was left with some noise so i had to atleast filter some out some way right. well youve probably already this but what i started out doing was writing a another driver and when i was searching for more stable code for current drivers i say yet another link to a german website decribing DScaler. i ran it into alstalavista's translator and could really get a good translation on the whole thing but what i did get is how it acess the chipset directly.

so i guess you know what im about to say. i started up dscaler, went to the bt848 options and tweaked those as much as possible. couldnt figure out how to capture in dscaler though. i still in fact dont know and would love to know but i never saw a option for it at all.
after closing that up and option vdub i started to do a test cap and then noticed out the settings where still stored how i set them in dscaler. so i said screw this and fired up avi_io which to my luck the settings where still set.

so now i tweak it in dscaler first and wind up clearing ALOT of noise out. then cap in avi_io

if there was soemway i could just cap in avi_io and pass it straight to vdub for use of those filters i would be set. but so far no luck and i have no idea on how to write something like that at all. ive looked at some of the documentation on graph edit but it's not to clear to me so it's not so helpfull(the most helpfull documentation is in german and i just don't know that.)

if you know how to keep synch in vdub please let me know.

bb
15th August 2002, 10:31
There's an option in VirtualDub somewhere (in capture mode, but I don't remember where) to synchronize video and audio. I can look it up this evening... This option will lead to a few dropped frames due to the way synchronization is handled.

There's another version called VirtualDub_synch which is told to synchronize using an advanced method without dropping frames. But that one is not available with a timer like VirtualDub_VCR AFAIK.

bb

BaronVlad
15th August 2002, 11:07
The VirtualDub_Sync Version that bb meant you can find here:
http://www-user.rhrk.uni-kl.de/~dittrich/sync/
But it will give you drops to get sync, so your video and audio are sync in the end but depending on your source sometimes many drops, but for me this version works fine, I am sorry it has no Timer, as bb said already.

To get Video and audio sync in "normal" VDub you have two options:
1. The best is to get it sync during recording:
in VirtualDub Capture mode you choose capture -> Timing -> enable "adjust..." Thats it
2. If you forgot this, or if you have asynch movies on your Harddisk, just open it in VDub, set Video -> Frame Rate -> enable "Change so audio and video.." That will give you a new frame rate (i.g. 24.9876 not 25 PAL) and your movies gets sync.:)

If you want to know more about drops, you can :readfaq: on the top of this site.

theReal
17th August 2002, 03:57
But it will give you drops to get syncNo, the normal VDub versions (including VCR) drop frames (or double frames!) to sync the audio. VDub sync resamples the audio to keep the sync without dropping or doubling frames.

I'm very sure because I've captured 60 minutes of full-size HuffYUV recently with VDub sync without a single dropped frame. I've never had that before, it's amazing!

(Unfortunately, like bb said, there's no VDub VCR&Sync - I'm still hoping someone will soon combine those two to a new superior capture solution :))

BaronVlad
17th August 2002, 08:21
Oh, thanks for clearing the situation, it is strange, in my testruns i had many drops when using the sync version and audio was sync in the end, so I thought the frames were dropped to get the crappy tape sync on the computer.

So why I had these ? Is it only because of the bad source quality ?

kevzee
17th August 2002, 12:43
hi

i use virtualdub_sync as well and i get only 1 or 2 dropped frames over 2 hours,but i have to keep the recording level down really low becase if the audio is to loud i get a "clicking" sound, i think its as the audio waveform is being clipped. I checked the audio before mp3 encoding and the clicking sounds are nothing to do with the encoding proccess. anyone else had this problem ?

kevzee

kevzee
17th August 2002, 12:56
hi

ok since last post i found update to virtualdub_sync that address that last problem
"- bug: overstearing audio produces spikes in the src-filter - fixed in 1_01c"

thanks for a great forum

kevzee

theReal
17th August 2002, 14:21
BaronVlad, how many frame drops do you get with the normal VDub?

I'm asking because when I'm recording to 44.1 kHz, my soundcard is running out of sync massively (like 1 framedrop every 5 seconds in normal VDub) and this is so strong that even VDub sync cannot correct it totally (much less drops, but still a few).

When using 48 kHz, the sound is almost in sync without correction, but I still get around 15 drops in 60 minutes (btw. it's not even framedrops, it's DOUBLED frames, as I recently found out).
With VDub_sync and 48 kHz, there are no more drops or doubled frames at all.

1loser
18th August 2002, 11:50
Originally posted by bb
To get decent quality without getting the HUGE filesizes and processing times when using HUFFYUV, my way to go is the PicVideo MJPEG codec @ quality 19. How big will a one minute capture be if I CAP at 720 x 480?

PicVideo MJPEG CODEC (http://www.pegasusimaging.com/picvideomjpeg.htm)

Ookami
18th August 2002, 13:23
Originally posted by BaronVlad
Oh, thanks for clearing the situation, it is strange, in my testruns i had many drops when using the sync version and audio was sync in the end, so I thought the frames were dropped to get the crappy tape sync on the computer.

So why I had these ? Is it only because of the bad source quality ?

Hello Tim!

It can be many different things! First, be sure to set VD_sync the way the author has written (audio buffer size etc.), tune your PC etc. But as you've wrote the FAQ, I think you've done that :D .

Reasons for framedrops with VD_sync:

1) Soundcard (Your soundcard has many "fluctuations" in the sample frequency and the VD audio re-sampling algorithm cannot fix that, without adding audible errros. Therefore a frame (or more) is dropped)

2) Bad source (Says it all, possible solutions: realtime cropping (if you have a BT card try to crop a few pixels from the vertical res.); RT noise reduction; better VCR with TBC, picture enhancement etc. and so on)

3) Unoptimized PC (programs running in background, slow hardware, Windows installation with much garbage etc.)

4) Believing what some suckers like "Ookami" write (this alone let the dropped frame ratio increase by 3,57689 %)

Always be sure to check these things before bugging Andreas with questions (like I did :) )...

Hope I understood everything right... Andreas, if you are reading this, please add or correct something. Thanks.

P.s.: Tim, have you got my reply-mail regarding the FAQ merging?

Cheers,

Mijo.

BaronVlad
18th August 2002, 14:37
Oh Guys...
writing a FAQ but being too stupid to setup the own computer :angry:
Now I have a green movie, that very nice...arghh
But I could fix this :)
Think it is a bad compilation that I have:
WD 60 AB (Cache only 2 MB @5400 U/min)
bad source (no cable TV)
Sound on Board (Epox 8k7a)
Athlon 1,4 should be ok

I have Chunk size 1MB, chunks in Buffer 15, Audio Buffer Size 36000, no background programs running, HD defragmented, Audio on 48 hz now, I tried my ATI Radeon 7200 Card (connected with VCR via Cinch, think I have to buy myself a longer cable for SVHS !!!) Res 720*576 MJPEG 19 Yuy2. I had a testrun with 5 drops in one minute (with the newest syncversion) Thats too much !!!
Normally I capture Huffy 384*288 with VDub VCR via WinTV, I have about 15 or 20 drops an hour.

I will try some testruns with different codecs, resolutions, Video in of the Radeon and WinTV.

@Mijo: Yes I got your Mail, I am sorry I didnt answer, but my girlfriend was angry with me and I had to do "some testruns" with her, means no time to capture, no time for FAQ, much time for her, but after writing this, I will have a look into it. You will get a Mail in a an hour or so. Ok ?

Ookami
18th August 2002, 16:10
Originally posted by BaronVlad
Oh Guys...
writing a FAQ but being too stupid to setup the own computer :angry:
Now I have a green movie, that very nice...arghh
But I could fix this :)
Think it is a bad compilation that I have:
WD 60 AB (Cache only 2 MB @5400 U/min)
bad source (no cable TV)
Sound on Board (Epox 8k7a)
Athlon 1,4 should be ok

I have Chunk size 1MB, chunks in Buffer 15, Audio Buffer Size 36000, no background programs running, HD defragmented, Audio on 48 hz now, I tried my ATI Radeon 7200 Card (connected with VCR via Cinch, think I have to buy myself a longer cable for SVHS !!!) Res 720*576 MJPEG 19 Yuy2. I had a testrun with 5 drops in one minute (with the newest syncversion) Thats too much !!!
Normally I capture Huffy 384*288 with VDub VCR via WinTV, I have about 15 or 20 drops an hour.

I will try some testruns with different codecs, resolutions, Video in of the Radeon and WinTV.

@Mijo: Yes I got your Mail, I am sorry I didnt answer, but my girlfriend was angry with me and I had to do "some testruns" with her, means no time to capture, no time for FAQ, much time for her, but after writing this, I will have a look into it. You will get a Mail in a an hour or so. Ok ?

5 drops/ minute seems too much. Did you tried a test capture (F7) before the real captureing (F6)? That could help...

What is your source? Tuner? VHS tape?

-@5400 U/min

This could be the problem. Have you tried the VD benchmark?

-email:

"Testruns" Stick with your girlfriend and leave us "no life" geeks where we belong :D . Hihi... No, don't hurry... The last few days I'm waay too much on the internet, and the weather is getting nice here so I'll change my Internet behaviour soon.

Cheers,

Mijo.

BaronVlad
18th August 2002, 16:40
@Mijo:

Hehe...After some testruns with my Girlfriend, I can tell you:
Zero Drops :D

FAQ: Check your EMail

My Computer:
I think I have done most of what you told me, but I will check it again now and tell you about my results. And if all of that is not working, I will capture MPEG2 with my ATI Prog, there I dont see the drops and can work with GKnot afterwards. I only have to fix this buggy sound ;)

Edit:
My source is the Tuner of my VCR, video as well as audio

Edit2:
Ok, new resolution is 704*576 audio 48 hz, chunk size 512-1MB with 15 chunks, about 5 and a half minutes without any drops after that nearly more drops than capt frames. Strange...

sillKotscha
18th August 2002, 20:43
way off topic...

Originally posted by BaronVlad
Hehe...After some testruns with my Girlfriend, I can tell you:
Zero Drops :D

hey Baron, do you mean really zero drops - 0 - !! ZERO?? C'mon she isn't that ugly :D

BaronVlad
18th August 2002, 21:43
[off topic mode on]

@Sill: I didnt mean whether I dropped her or not...
...I meant something like no probs, no system crash, everything alright again -> zero drops...and as you know, she is right the opposite of ugly ;)

[/off topic mode off]

sillKotscha
18th August 2002, 21:53
sorry guys, last time ot here...

Originally posted by BaronVlad
@Sill: I didnt mean whether I dropped her or not...

dropped her?? I meant on her or even in her :D

BaronVlad
22nd August 2002, 21:07
Fixed the problem with the drops, it was driver related. I tried 20 minutes Full Pal with two drops, seems to be ok for my hardware :)

Now a really stupid question:
- If i capture Huffy I get a perfect picture, of course.
- But i can only capture about 1 hour and 30 minutes. after this my 60 Gigabyte Harddisk is at its limit, also of course.
- If I capture MJPEG @19 filesize is much less, but also quality, also of course.

Is there another good codec out there, something like huffy @19 and a half ? Think not, should have read this. But maybe someone knows a solution for my horrible problem.

(No, I dont have the money to buy myself a 120 GB, 8 MB Cache "Video-Capture-HD":scared: )

Thanks

bb
23rd August 2002, 07:20
What's wrong with PicVideo MJPEG @q19? Combined with the noise filtering during capture (i.e. before being encoded through MJPEG) you'll get great results.

Do you capture anime? In that case you may be sick of the ringing artefacts. You could try Donald Graft's msmooth AviSynth filter.

bb

theReal
23rd August 2002, 15:32
I dont have the money to buy myself a 120 GB, 8 MB Cache "Video-Capture-HD"
I guess you mean the Maxtor 8GB drive?
Then how about a 120GB, 2MB Cache IBM Deskstar, 7200 rpm, for about half the price (and basically the same speed)? :D

sillKotscha
23rd August 2002, 15:35
nope, I assume this one...

120 GB WD 1200JB - 8MB Cache

it rocks!!...

theReal
23rd August 2002, 15:57
You're right - wasn't Maxtor, it was WD's "Special Edition".

However, two IBM GXP120 as RAID 0 also rock, but the price is much better than two of the WD's (I just hope they won't break as quickly as the 60 and 80GB models...)

BaronVlad
23rd August 2002, 16:42
@theReal: in not more than two years I crashed two maxtor Harddisks, but only one WD, maybe IBM is better ;)

Maybe I should think about a raid controller solution, but it would be better to find a solution without spending money for hardware...

This moment I try some testruns with noise reduction resizing to 512 * 384 with diffrent settings (060, 075, 1 and diffrent codec settings like pre processing...) Thanks bb

Looks ok but not as good as huffy :mad:

theReal
23rd August 2002, 17:58
maybe IBM is betterThe IBM Deskstar GXP's 60GB and 80GB were extremely bad (I didn't experience it myself, but heard a lot about it). I guess that's why some IBM drives became much cheaper than their competitor's drives...

Personally, I've only had one Maxtor and one WD fail, so...

Ookami
24th August 2002, 10:57
@IBM HDs

Don't buy them unless you want to heat your PC tower a bit (extremly hot!)... I have three of them in my tower (from the 5400 generation -> last year generation ;) ). Because of them I had to open one side of my tower and leave it open, they're so hot, that you can't even touch it without burning your fingers :scared: .

I've heard that the Fujitsu-Siemens HDs are reliable.

@Huffy and a half

Grin. You could try the other MJPEG codecs (leadtools etc.), AFAIK, Leadtools has the best quality, but the CPU usage is much higher than the other MJPEG codecs (read on the Ultimateboard).

IMO, Huffyuv is only needed when you aim for perfect quality (filtering etc.). If you don't use filters and use a very good end format then it is, IMO, overkill. I've read somewhere that MJPEG is not so good when using MPEG1 as the end format, but I never noticed anything that is abnormal for the VCD etc. format...

So, Picvideo MJPEG @ 19 should be enough for the most things. If you want to convert you favorite movie/series that will never have a good DVD tranfer, then it's another story.

As, bb, wrote, pre-filtering can be very good (but higher CPU usage).

Cheers,

Mijo.

theReal
24th August 2002, 15:48
Don't buy them unless you want to heat your PC tower a bit (extremly hot!)I have mine (two of the 7200rpm Deskstars) right behind a 45cfm intake fan --> they don't even get hand-warm :)
Also, the case temp hasn't risen since I put them in the tower, but that's probably because there are tornado-like conditions inside ;)

Owen
25th August 2002, 12:18
Greetings to all.
I’ve just read through this topic and thought that I would contribute some of my experience.
I’ve been capturing video with TV cards for some years now with every codec there is.
I live in Australia and therefore capture in PAL.
My main priority is quality of capture at 720-576 as I use my PC as a VCR for playback to my 43” Toshiba TV using SVIDEO TV out. Hard disk space is not a problem, as I have 3 80Gig drives and will upgrade as required.
I have found that Brooktree / Conexant chip TV cards work best at 720-576
768-576 only increases noise pickup, not quality.
Make shore that the Contrast adjustment is not set to high as loss of detail in bright / near white areas of the picture will result . (a limitation of the 8 bit ADC on the cards)
The picture will be slightly dimmer/ less contrast than the original.

The PIC Video codec. Is now obsolete, and only good for slow computers.
At quality setting of 19 results are ordinary and files large.
At quality setting of 20 results are good, but files are getting out of control.

The Morgan Mjpeg Codec Version 3 (Version 2 was crap)
It uses much more CPU than PIC Video but at a data rate of around 2.5 to 3 Meg per second, the quality is as good as HUFYUV but at less than half the data rate.
So HUFYUV is only for the die hards, or those with slower computers.

Lastly we come to what I am using now and that is Xvid Codec.
You will need a FAST machine around 2Gig P4 or Athlon.
Set codec to 1 pass Quant mode. (Quantiser set to 2).
Set motion search to as high as you can without dropping to many frames.
If you need to edit accurately, set Max Keyframe interval to 25 (e.g. 1 keyframe per second).
This will give you as good a quality as HUFYUV or Morgan but at a data rate of only around 800kb per second or 1 third of the Morgan codec and about 1 ninth the data rate of HUFYUV. This makes your hard disk go a long long way.
You could also use the Divx 5 codec for this but quality is not as good and and CPU requirements are higher.

So, give Xvid a go for video that dose not need to be frame accurately edited.
For frame accurate editing use Morgan 3

I hope that this info is helpful.

Have fun.

:)

BaronVlad
25th August 2002, 14:38
Hi Owen, welcome to this board and thanks for your great answer !

I tried the Morgan Codec, cause frame accurate cutting is very important for me (commercials). With my machine I can cap with about 90 % Quality without too much drops (noise reduction enabled because of the bad antenna source :angry: ) looks quite good I think. Which other settings did you use for the codec ? Which deinterlacer afterwards ? I am running map deinterlacer, dont think it is THE ONE for this operation.

Thanks in advance

BTW: I fixed MJPEG@19 with noise reduction during capture and afterwards bicubic resize (0,60), pre processing source normal, psychovisual enhancements light and map deinterlacer @ a bitrate of 950 to fit about 90 minutes on one CD. Here is a picture, please tell me what you think (background is the same on TV!)


http://mitglied.lycos.de/BaronVlad/zeugs/pilawa.jpg

No Flame please ;)

Owen
28th August 2002, 12:25
BaronVlad,

When using Morgan 3 try and use Float. (Floating Point) Mode for
Encoding and decoding for best quality. Needs a fast CPU.
Don’t know what Fancy Up sampling does.
Set quality % as required for your source.

The link to your sample is down.

As for deinterlacing, I now have no need to do it.
I used to deinterlace when I was using a Geforce MX card with Conexant CH700x TV out chip because the TV chip could not reconstruct the original interlace on playback to TV and I would get interlacing artifacts on some programs.
I purchased a Geforce 3 Ti500 with the new Conexant CX25871 series TV out chip, and have not looked back.
I can now playback interlaced source in its original form to TV with outstanding DVD quality. The new chip also has 10bit DAC (Digital to Analog Converter) in place of the old 8bit DAC.
This gives much better color graduations with no banding, and looks
as good, or better than a stand alone DVD player.
I NEVER play games, but a Geforce 3 is the cheapest way to get the new CX TV out chip.

I use a PC permanently connected to my HiFi and Big TV as a high (DVD) quality VCR.
VHS tape looks bad on a big screen.
For capture I use FlyDS
http://asvzzz.narod.ru/

or Virtual VCR
http://www.digtv.ws/

Both give good audio sync for many hours of continuous capture on a Pentium 4 2.1Gig using Windows XP.
Playback is with Zoom Player and TVTool set to PAL 768-576
I record mainly from digital satellite (a very clean source).
using Xvid codec (THE BEST BY FAR) and can edit out ads etc because Xvid and DIVX both auto insert Key frames at scene changes, (I force one ever second to make playback more flexible) so there is almost always no problem editing in VirtualDub.
I do not normally resize, filter or re-enecode as I want original video and sound quality.
I don’t and will never make VCDs or copy my video to CDs –DVDs. Hard disks are much to cheap to bother.
I have evaluated re-encoding and find that video data rates can be reduced to about 700kb per second average without noticeable quality loss. Add audio to that and you get about 2.6Gig per hour. No CDs here.
For me, if I were to resize to half PAL res. and / or over compress, down to 1hour per CD I may as well use VHS tape and save a lot of trouble.
Or better yet. Super VHS, 400 lines res. with HiFi stereo sound.

Anyway have fun and give Xvid a try.
If you have the CPU power, you may be pleasantly surprised.
Could be a problem if you want to filter during capture.

P.S. I always thought that deinterlacing on playback would be best.
So fare I have not found a way to do that.
If you find a way let me know.

Thanks.


I think I may have wandered of topic a bit. Sorry moderators.
If you want to move this post to a more appropriate place feel free.

:D

BaronVlad
30th August 2002, 00:14
Thanks Owen for your great input again ;)

The one that started wandering off topic was me, i think :eek: May the mods forgive me.

i made some more testruns with Morgan, seems to be good, but I have to do some fine tuning.

And i promise, i give XVid a try, avih told about that in another forum already.

But I will be on holiday at least the next two weeks (:D ), so i dont have the time to capture now :scared:

But i will do, when I am back, and tell you about my results.

EDIT:
The link to my sample maybe was only temporarily down, or your browser blocked that crappy lycos account, i will upload it to another place and put the new link here.

Ookami
30th August 2002, 00:16
Also, would like to thank Owen for his great posting.

If you have any recommandation, critism for the new capture FAQ let us now (PM me or BaronVlad).

BTW,

Will try Morgan v3, didn't tried it since about a year and your praise is a motivation for me ;) .

Thanks,

Mijo.