View Full Version : DVD2SVCD ini file for NTSC DV source
FredThompson
21st November 2003, 02:00
This is my current AVISYNTH.ini file for use with AVI2SVCD when using NTSC DV source. There is NO scratch/dropout removal. I'm quite happy with the results on general video. FWIW, the last part is to facilitate fixing files which were encoded with the field dominance set improperly. I noticed a bunch of my DV had been encoded as TFF. Choosing the last option and BFF on the encoder tab allows recompression so the motion is proper. Can't just flip the flag, I've tried, that stinks.
GuavaComb and PeachSmoother can be found here: http://www.avisynth.org/users/warpenterprises/
Reinterpolate411 can be found here: http://mywebpages.comcast.net/trbarry/
ReverseFieldDominance can be found here: http://www.geocities.com/siwalters_uk/fnews.html
There is no need for the FixBrokenChromaUpsampling function because Reinterpolate411 fixes the problem.
These will probably work with PAL although the Reinterpolate411 line should be removed and the vertical resolution adjusted from 480 to 576.
It is important to verify the camcorder and codec are both using the same luminance range, 16-235 or 0-255. My camcorder does 16-235 and the MainConcept codec has been set for that range, although it does both. There is no easy way for the scripts to test for proper configuration. This is the user's responsibility.
Testing has resumed on dropout/scratch removal.
Future plans include use of BorderControl with variables to overwrite tape head switching noise, closed caption data, etc.
This is intended for natural subjects and general TV grabs. Field dominance is changed to TFF. DV is BFF and some players don't like that. The difference is probably very, very minimal as one scan line is chopped off the top and the bottom is doubled. That's probably in the overscan area anyhow.
2003-11-24: Positions in the file stabilized, interleaved PeachSmoother added.
2004-01-06: modified to use Peach after resizing at Ivo's suggestion. Added NO_Resizing for use with some frameserved source. Cleaned up the thread somewhat.
These go in the AVISYNTH.ini file after the default options:
[AVISYNTH_DV_to_CVD]
0=AviSynth_plugin_directory="C:\Program Files\AviSynth 2.5\plugins\"
1=LoadPlugin(AviSynth_plugin_directory+"GuavaComb.dll")
2=LoadPlugin(AviSynth_plugin_directory+"PeachSmoother.dll")
3=LoadPlugin(AviSynth_plugin_directory+"Reinterpolate411.dll")
4=LoadPlugin(AviSynth_plugin_directory+"ReverseFieldDominance.dll")
5=ReverseFieldDominance()
6=ConvertToYUY2(interlaced=true)
7=Reinterpolate411()
8=GuavaComb(Mode = "NTSC", Recall = 75, MaxVariation = 25, Activation = 90)
9=Crop(8,0,-8,0)
10=BicubicResize(352,480,0.0,0.6)
11=SeparateFields().PeachSmoother().Weave()
12=ConvertToYUY2()
[AVISYNTH_DV_to_DVD]
0=AviSynth_plugin_directory="C:\Program Files\AviSynth 2.5\plugins\"
1=LoadPlugin(AviSynth_plugin_directory+"GuavaComb.dll")
2=LoadPlugin(AviSynth_plugin_directory+"PeachSmoother.dll")
3=LoadPlugin(AviSynth_plugin_directory+"Reinterpolate411.dll")
4=LoadPlugin(AviSynth_plugin_directory+"ReverseFieldDominance.dll")
5=ReverseFieldDominance()
6=ConvertToYUY2(interlaced=true)
7=Reinterpolate411()
8=GuavaComb(Mode = "NTSC", Recall = 75, MaxVariation = 25, Activation = 90)
9=SeparateFields().PeachSmoother().Weave()
10=ConvertToYUY2()
[AVISYNTH_DV_to_SVCD]
0=AviSynth_plugin_directory="C:\Program Files\AviSynth 2.5\plugins\"
1=LoadPlugin(AviSynth_plugin_directory+"GuavaComb.dll")
2=LoadPlugin(AviSynth_plugin_directory+"PeachSmoother.dll")
3=LoadPlugin(AviSynth_plugin_directory+"Reinterpolate411.dll")
4=LoadPlugin(AviSynth_plugin_directory+"ReverseFieldDominance.dll")
5=ReverseFieldDominance()
6=ConvertToYUY2(interlaced=true)
7=Reinterpolate411()
8=GuavaComb(Mode = "NTSC", Recall = 75, MaxVariation = 25, Activation = 90)
9=BicubicResize(480,480,0.0,0.6)
10=SeparateFields().PeachSmoother().Weave()
11=COnvertToYUY2()
[AVISYNTH_Reverse_Field_Dominance]
0=AviSynth_plugin_directory="C:\Program Files\AviSynth 2.5\plugins\"
1=LoadPlugin(AviSynth_plugin_directory+"ReverseFieldDominance.dll")
2=ReverseFieldDominance()
3=ConvertToYUY2()
[AVISYNTH_N0_Resizing]
0=ConvertToYUY2()
Dibek
2nd December 2003, 12:13
[AVISYNTH_DV_to_SVCD_PAL]
0=AviSynth_plugin_directory="C:\Program Files\AviSynth 2.5\plugins\"
1=LoadPlugin(AviSynth_plugin_directory+"GuavaComb.dll")
2=LoadPlugin(AviSynth_plugin_directory+"PeachSmoother.dll")
3=LoadPlugin(AviSynth_plugin_directory+"Reinterpolate411.dll")
4=LoadPlugin(AviSynth_plugin_directory+"ReverseFieldDominance.dll")
5=ReverseFieldDominance()
6=ConvertToYUY2(interlaced=true)
7=FixBrokenCromaUpsampling()
8=GuavaComb(Mode = "PAL", Recall = 75, MaxVariation = 25, Activation = 90)
9=SeparateFields().PeachSmoother().Weave()
10=BicubicResize(480,576,0.0,0.6)
11=COnvertToYUY2()
Would this be OK for the PAL world?
I've tried many different ways for DV to SVCD conversion using TMPG and CCE, deinterlacing or not but results are not satisfactory for me. Can I increase the bitrate over 2520 kbps and sdtill bve able to play the SVCD on standalone player?
FredThompson
2nd December 2003, 12:39
There's no need for Reinterpolate411 if your source is PAL. Both PAL and MPEG2 are 4:2:0 color model (one color sample for a 2x2 grid of pixels.) NTSC is 4:1:1 (one color sample for 4 horizontal pixels) and we need a way to get the horizontal color resolution more inline with MPEG2. Look at your line 3...
FixBrokenChromaUpsampling() probably won't do much of anything to help because your source and destination are 4:2:0. It can't hurt, just don't expect it to help.
The only time I've seen 2500 SVCD look good was with ProCoder. With CCE, I have to bump it up to about 5000 average. I like the speed of CCE but rarely use it anymore, personally.
You'll have to make some tests to see if your particular player can handle higher bitrates. My Apex 2600 is fine with them. SVCD and DVD are both MPEG2. DVD has higher bitrates so it will probably work for you.
Dibek
2nd December 2003, 14:11
Thx Fred.
echooff
2nd December 2003, 18:25
Sorry for the simple question but I have been reading threads for days and they are starting to run together. I just aquired a canopus advc 100 and I'm attempting to learn how to frame serve to dvd. My source is last years video of the kids opening their xmas gift. The lighting causes a yellow tint in the video. My fist attempt at encoding this with procoder and its filters without frameserving corrected the lighting but left a lot of macroblocks and a buzzing in the video. From reading the threads this seems to be common with this encoder.
So my question is will the script for dv to dvd correct most of that? If you think not, can you point me toward something more specific. Please don't point me to a tutorial on doom9. I know they are excellent but I can't access these pages due to filtering set on the network.
FredThompson
2nd December 2003, 19:04
Macro blocks will come from low bitrate. I have no idea why you have this buzzing. DVD2SVCD uses BeSweet to do the audio processing, not the encoder. I'm also not sure if you can set the internal filters for an encoder as you mention. Frankly, you might be better off doing color correction with AviSynth. Try a short segment with these settings and see how it performs.
echooff
2nd December 2003, 20:05
Thanks Fred
jikchung
24th December 2003, 03:13
Fred,
Thanks for posting this. I have been using the DV to DVD script for my home movies passed through my Sony cam and am very happy with the results.
Couple of questions: as my source is NTSC DV and I am using the free canopus codec, should I be using the 'fixbrokenchroma' plugin? And where should it fall in the script?
Once again thanks for sharing this with us, I know it was a lot of time spent on your part.
FredThompson
24th December 2003, 05:22
NTSC DV uses the 4:1:1 color model which means 1 chroma value for a group of 4 horizontal pixels, 1 pixel high. MPEG-2 for SVCD and DVD uses the 4:2:0 color model which means 1 chroma value for a 2x2 block of pixels. Neither is a perfect representation of the actual pixels, they're 2 different methods of "best fit" while saving data space.
NTSC DV has a greater vertical chroma resolution than MPEG-2 for SVCD or DV. It has twice as many chroma values in the vertical direction. However, horizontally it has only half as many values. Reinterpolate411 is a method of converting NTSC DV's 4:1:1 to 4:2:2 to better match MPEG-2's 4:2:0. There's no way to recreate missing data. This is just a way to lessen the "damage."
I'm not really sure what FixBrokenChromaUpsampling does as the AviSynth page doesn't give any details.
http://www.avisynth.org/index.php?page=FixBrokenChromaUpsampling
Reinterpolate411 and 411Helper (http://www.geocities.com/xesdeeni2001) came about after some extensive testing/discussion about weaknesses with NTSC DV.
http://forum.doom9.org/showthread.php?s=&threadid=57013
http://forum.doom9.org/showthread.php?s=&threadid=58294
I can't imagine FixBrokenChromaUpsampling would offer any more benefit than Reinterpolte411 when going from NTSC DV to MPEG-2.
Thanks for your kind words. I'm glad you find it helpful.
Amit
24th December 2003, 15:03
You will only need FixBrokenChromaUpsampling when the DV AVI is a Canopus DV AVI created by the Canopus DV Codec. Canopus DV Codec has a Chroma Upsampling bug which is fixed by FixBrokenChromaUpsampling plugin. If you are not using Canoups DV Codec you don't need to use this plugin.
For more information search the forums here. What I wrote above is what I read in the forums here sometime back.
-Amit
jikchung
24th December 2003, 21:00
Thanks for both your replies and Happy Holidays.
ADLANCAS
13th January 2004, 19:14
Hi!
I have some doubts about your scripts.
Normally I use Guavacomb and PeachSmoother to convert VHS to SVCD/DVD like this:
SeparateFields()
Guavacomb(...)
PeachSmoother()
*Resize filter* #when necessary
Weave()
Could you explain why did you put Guavacomb before SeparateFields and PeachSmoother after resize ?
Thanks in advance,
Alexandre
FredThompson
13th January 2004, 22:50
AFAIK, Guava is interlace-aware. Lindsey's notes say to use it before deinterlacing or decombing.
Peach works better with interlaced frames than fields: http://forum.doom9.org/showthread.php?s=&postid=365047#post365047
Peach keeps a little more detail and helps reduce artifacts from resizing if it is used after resizing.
ADLANCAS
14th January 2004, 03:09
I´ve just made a little comparation between putting Guavacomb before or after SeparateFields using SSIM.
Before -> Filesize encoded=81.711KB -> SSIM=0,532505
After --> Filesize encoded=81.450KB -> SSIM=0,590466
Results of SSIM nomally seems good to me and in this case the difference is big. What do you think about it ?
Regards,
Alexandre
PS.Thanks for this trick about using Peach after resize!
FredThompson
14th January 2004, 06:04
The SSIM filter measures the difference between a set of original frames and processed frames, essentially, right? That's how I understand the original thread http://forum.doom9.org/showthread.php?s=&threadid=61128&perpage=20&highlight=ssim&pagenumber=1
"The Structural SIMilarity (SSIM) index is a novel method for measuring the similarity between two images. The SSIM index can be viewed as a quality measure of one of the images being compared, provided the other image is regarded as of perfect quality." http://www.cns.nyu.edu/~zwang/files/research/ssim/index.html
We already assume the source image isn't perfect and has things we want to remove or we wouldn't be using the filter, right? In that regard, a higher SSIM filter measurement may indicate the filtering is less successful because the images are more similar.
Additionally, the Guava documentation says, "This comb filter only works temporally, not spatially. As a result, it only helps with dot crawl, rainbows, and shimmering in stationary portions of a video."
As there is no spatial component of the filter, I don't see why it would matter if it is run on a field or a frame. Maybe it does. There is a post by somewhere here that asks about guava and progressive vs. interlaced usage. IIRC, a definitive answer didn't show up so I assumed it was best to use on interlaced because the documentation also says, "Comb filtering should definitely be run before any inverse telecine steps."
My response is: They are interesting numbers but do they really indicate what we hope they will? They may be showing guava on fields is less effective than guava on frames.
My hope was that Guava would help clean up "stragglers" after the Reinterpolate411 filter. It did seem to help a little bit.
wrt Peach after resize, you're welcome. It's not my discovery. Ivo told me about it and I was surprised at the difference. AFAIK, all the credit for that belongs to him.
ADLANCAS
14th January 2004, 13:54
ok!
but smaller file size with better "similarity" says nothing to you?
Regards,
Alexandre
FredThompson
14th January 2004, 14:18
1/3 of 1 percent is not a significant difference. What caused the difference? Would it always be like this regardless of the type of images?
"Better" at what? Retaining the distortions in the original DV? A SSIM rating can only indicate how similar the images are. It can't tell you when your filtering has changed from removing noise to distorting the portion you want to keep. It doesn't know how to separate the "good" data from the "bad" data and only rate how well the result kept the desired portions.
f@chance
11th February 2004, 11:53
@Fred
After researching for the past days on capturing from a VCR to a PC I wonder if you could give me a hand with my project.
I have a fast machine and disks with an ATI AIW 9800SE card that allows capture through S-Video.
I have a JVC HR-7722EK deck with Digital TBC/NR and Digital 3R picture adjustments and S-Video out.
I started to capture using either Virtual VCR, Virtual Dub+Sync or Vegas Video 4.0. With the tape deck's digital imaging ON the picture looks excellent and little has to be done when using CCE for MPEG2 encoding. However Because of the digital adjustments on a pre-recorded tape frames are being dropped and at times a lot. When turning OFF the TBC no frames are being dropped but the capture looks awful. Is it normal that the digital pre-processing contributes to frame dropping?
So I tried another approach. I installed an ADVC 1394 card for capturing to DV using WinDV, Vegas Video 4.0 and iuVCR for test clips. No frames are being dropped but on a PC TFT screen the picture looks too sharp, edge noise and generally not as good. Is this because I am viewing it on a PC? On searching I came across this thread and basically want to do the same as you do using AVI2SVCD to convert some of my VHS collection to SVCDs.
My tapes are PAL recordings and are either store bought or have the UK version of DVB-T as source. I like to use the JVC deck using your [AVISYNTH_DV_to_SVCD] settings minus the Reinterpolate411() function. Since this is a Canopus card do I have use the Chroma UpSampling error correction? Also considering the VHS source (No Cartoons or Sport events) what advice may you have with the Guava or Peachsmoother settings?
Thanks for your help
F@Chance
FredThompson
13th February 2004, 21:54
The digital filters and TBC should not cause dropped frames. I have seen skewing at the top of the frame on worn tapes but never dropped frames. I suppose it's possible the reformatted signal and the AiW don't play well teogether...
Chroma upsampling is not a major concern because your destination format is 4:2:0. PAL DV and DVD MPEG2 are both 4:2:0 so there's very little to gain by attempting to interpolate data which would just be thrown away anyhow.
You didn't say what format your AiW captures used. Comparing lossless to 4:2:0 will be very evident on a computer screen and still frames. DV capture typically has a harsher appearance than lossless analog capture. That does not mean it is inaccurate. It's possible your AiW is softening the original. Remember, TV screen phosphor has a persistence so what you see is really a blending of multiple images. The ADVC devices use enhancement circuitry but only in the box, not in the data.
wrt peach and guava, I use the settings which you see in the script because tweaking per title takes too much time and I've got a lot of stuff to process. "Real world" source will all vary anyhow. There is no one-size-fits-all for optimal performance.
You may want to watch DotCrawl as it develops. I'm hoping it will handle motion filtering. Guava only works on static images. http://home.earthlink.net/~tacosalad/video/dotcrawl.html
f@chance
14th February 2004, 00:15
Thanks for the quick reply, because your advice is excellent and people must be constantly at you for info.
The TBC and digital filter causes at the top scewing of lines and everytime that happens frames are dropped. The tape is a prerecorded Columbia tape that I bought a few years ago but haven't played it much at all.
I am capturing the Analogue from the AIW card with HuffYuv CCE patch format using either VDub plus Sync or VirtualVCR resolution 720x576. Could it be that the AIW card doesn'y like this resolution?
My main concern was the harsh edges which look like it was over sharpened. I made sure that the default settings on the ADVC card were used with no enhancement on the sharpen slider of the controller. I did a quick burn to DVD-RW and watched it on the TV and you are correct it is not as bad as on the Monitor screen. However the analogue capture is bit more pleasing especially on edges were a white shirt meets either dark skin or black jacket like Will Smith in MIB the white edge looks jittery. Any additional suggestion on how to smooth the edges?
Thanks again for your help.
F@Chance
FredThompson
14th February 2004, 02:24
The AiW should work at that resolution. ATi has released new drivers in the past week or so and you might want to try updating first.
I have noticed the digital filters produce output which looks fine on a TV but the top skews as you have seen. I have NOT compared to see if the skewing is only in the overscan area. It may be safe to capture with the skewing then overlay that area with black. However, that will not solve your dropped frames problem.
Capturing with HuffYUV requires a higher data transfer rate than a lossy codec. It gives you one chroma value for each pixel, PAL DV and DVD MPEG2 give you one chroma value for a 2x2 square of pixels. Perhaps the dropped frames are from your system not keeping up. Make sure your destination drive is NOT the C: drive and defragment before your capture. If you still get dropped frames, try a fast lossy codec like an MJPEG and see if you get dropped frames. If that works, you probably should investigate drive speeds.
This is a quote from the links page I keep at Donald Graft's site. Try these digital settings and see if they help:
turn OFF TBC on front of VCR
turn ON video calibration in menu of VCR
turn OFF Superimpose
turn ON video stabalizer
turn OFF blue back ( my choice ;) )
The result will not be as nice but might help.
Take a look at this page and tell me if it shows the sharpness problems you are seeing: http://www.geocities.com/mrtibsvideo/fixvhsoversharp.html
f@chance
14th February 2004, 23:05
Capturing with HuffYUV requires a higher data transfer rate than a lossy codec. It gives you one chroma value for each pixel, PAL DV and DVD MPEG2 give you one chroma value for a 2x2 square of pixels. Perhaps the dropped frames are from your system not keeping up. Make sure your destination drive is NOT the C: drive and defragment before your capture. If you still get dropped frames, try a fast lossy codec like an MJPEG and see if you get dropped frames. If that works, you probably should investigate drive speeds.
I am using a just completed new PC that I put together. CPU is 3.2GHz Pentium 4 with 1 Gig of dual ported Memory. The C Drive are two 160Gig Barracudas running in SATA 0 half of that volumn has never been written to yet. I do have a 160 gig ATA 133 PATA drive that I use for storage and could capture to that one but thoght the fasted drives are the ones in the SATA raid. I started to capture using HuffYUV when an uncompressed 55 minute capture grew to 56 Gig. I do have as an alternative capturing using Pic MJPEG decoder but thought that HuffYUV would be the better choice.
Take a look at this page and tell me if it shows the sharpness problems you are seeing: http://www.geocities.com/mrtibsvide...soversharp.html
Thanks for that link and yes that is what the edges look like. To use the filter it looks like I have to capture in 352x480 resolution am I reading this correctly?
Thanks for all your help, I am leaving on Monday for two weeks to chill out in Florida and will pick up my VHS capture and conversion to DVD when I return and I hope I can call on your expertise than again.
F@Chance
FredThompson
15th February 2004, 03:57
I haven't used HuffYUV or my AiW for capture in about 2 years. To my eyes, the AiW did not give accurate capture and had problems with chroma and luma ranges. Your results may be different. I was using the AiW Radeon.
Given you plan to go to MPEG2, my preference would be to capture as 4:2:0 and stay that way throughout the entire process. I use the ADS USB Instant DVD 2 device. There are people who will argue until they die that the most accurate capture will be lossless. Yes, but how does that help? DVD MPEG2 is 4:2:0 which has 1/4 the color resolution of lossless HuffYUV. At some point in the processing sequence, 3/4 of the chroma information will be thrown away. Therefore, it is my opinion that HuffYUV capture is a waste because of the system demands.
From your description, it seems your drives should be more than adequate. If it were me with your hardware, I'd capture to MJPEG. If I understand your earlier post, you shouldn't have the dropped frames problem.
Yes, that VHSOverSharp filter is intended to 352x480. Your source is PAL VHS. 352 width is fine for VHS. I always capture at full D1 resolution then resize as needed. My suggestion is you do the same. Modify the CVD portion of the script to put the OverSharp filter after the resizing (which should also be modified for PAL height.) I've only played with the filter for a few minutes and don't know how it will affect Peach.
PM me and let's try to arrange for you to send me some samples on CDR so I can play with them.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.