View Full Version : Interlaced fields in SVCD-NTSC usage
ADLANCAS
5th May 2003, 03:48
Hi, Iīm a newbie in AVIsynth!
Itīs not yet so easy to me understand somethings.
This is my first message in this forum, so, if I make same mistake, please tell me.
Letīs go...
Iīm trying to make a SVCD-NTSC using Adobe Premiere6.5-> export-> Premiere plugin v0.93-> AVisynth 2.51-> TMPGEnc 2.510.
I use a AVI captured from VHS in 640x480 with MJPEG and color format YUY2. My capture board is Pinnacle PCTV PCI.
This script was made according (what I understood) a new capture guide from this forum (BaronVlad):
Doom9's Forum > Capturing and Editing Video > Capturing Video > Capture Guide Suggestions
My script is:
AviSource("d:\Teste\AVS\test.avi")
#Info # if enabled, it shows 640x480 -OK
SeparateFields()
#Info # if enabled, it shows 640x240 !?!
#filters
BicubicResize(480,480)
#Info # if enabled, it shows 480x480 -OK
Weave()
#Info # if enabled, it shows 480x960 !?!
ConvertToRGB24()
Problems:
1) Whatīs wrong in my script ? After Weave() command, my file has a resolution 480x960 ?!?
I understood that this commands (SeparateFields...Weave)I need to put there for better use of filters.
2) Is there a way to increase the speed in my script or process ? Premiere output has RGB32 format. Do I need to convert to YUY2 after my video is openned ?
Sorry for my bad english.
Thanks,
Alexandre
PS.: Maybe this I need put in another Forum area, but...
I also tried to export from Premiere using the same script (just openned a signpost.avi instead) and another frameserver plugin Pluginpac v1.5.1(this frameserver is much faster than Aviwrapper) and I had the strange effect:
- after the file avi is openned, the resolution (written by AVisynth Info command)is 352x240 ???!!!???
Whatīs wrong ? My file is 640x480 !!
bewley
6th May 2003, 02:03
Your resize is incorrect, it should be BicubicResize(480,240). Change the line and your script should work.
You should not have to do a ConvertToYUY2 first! :)
Good luck!
Although I do not know what your source is, this may be an alternative for you using interlacedresize from the simpleresize.dll. BTW, I was using Satish's export FS plugin and had no problems like those you describe. My source was standard ntsc DV 720x480.
loadplugin("d:\path\simpleresize.dll") #not needed if already in plugin dir
avisource("Premiere_Out.avi",true)
ConvertToYUY2(interlaced=true)
interlacedresize(480,480)
If you have Huffy installed, this should load into TMPG without the converttorgb24 statement although you may need to change the registry setting in the Drivers32 section to set vidv.yuy2 to use huffy.dll
------------------------
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Drivers32]
"vidc.yuy2"="huffyuv.dll"
-------------------------
ADLANCAS
6th May 2003, 04:05
@bewley
Thanks for your reply!
I understand what you mean...should work (I will do it !), but ... is this the best way to get better quality to handle filters with interlaced movies ?
In this situation, (resize to 480x240) will it lose some quality ?
It sounds strange for me. Could you explain me better ?
(sorry, I didnīt this things in documentation/FAQ/etc)
What do it happen if I convert to YUY2 after the movie is openned ?
If I add a noise filter that work with YUY2/RGB32, should be better to include a convertion?
Oh... a lot of questions!!! I hope that my question helps to understand me (of course, what I DONīT understand).
Thanks in advance...
Alexandre:D
ADLANCAS
6th May 2003, 04:39
@DDogg
"Although I do not know what your source is..."
-> my source is PALM (nearly NTSC, color are diferent), but I intend to make a SVCD NTSC for standalone DVD.
"I was using Satish's export FS plugin and had no problems like those you describe. My source was standard ntsc DV 720x480."
-> Iīve just talked to Satish in debugmode forum and he couldnīt find a solution. He think that there is a "setting" somewhere in Premiere that causes that effect. I also made a test oppening the signpost.avi directly in TMPG and unfortunatly had the same problem. Do you have an idea?
http://www.debugmode.com/forums/viewthread.php?tid=390
"...this may be an alternative for you using interlacedresize from the simpleresize.dll"
-> do you think that script that you describe get better results ?
-> I donīt have Huffy. I use only PicVideo MJPEG.
Thanks a lot.
Alexandre
(and any suggestion is always welcome !)
IMO, everybody should have Huffy installed. Even if you do not use it to capture, it can act as the yuy2 handler and remove the need for converting to RGB.
From Avisynth.org
Huffyuv will act as the system YUY2 codec if there's no other codec installed, so if you install Huffyuv and uninstall all other YUY2 codecs, then you'll never need ConvertToRGB.
You can also edit the registry to force your system to use Huffyuv as the system YUY2 codec. Look under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Drivers32 (the location will be different for Win9x). You should find a string named VIDC.YUY2; its value will vary according to your software and hardware configuration (for example, installation of an ATI All-In-Wonder Radeon set this to ATIVYUY.DLL). Change this to huffyuv.dll and Huffyuv will be called upon for YUY2 conversions. Encoding quality from an Avisynth script with TMPGEnc is much better with Huffyuv as the YUY2 decoder than with some other codecs; with ATIVYUY.DLL, for instance, subtle color variations became posterized. Acceptable results were possible with the ConvertToRGB filter, but this increased encoding time substantially as TMPGEnc needed to convert back to YUV as it encoded. Changing the system YUY2 codec to Huffyuv eliminates the expensive (and lossy) YUV->RGB->YUV conversion while maintaining the quality of the encoded output.
ADLANCAS
6th May 2003, 13:18
@DDogg
-> I'll do asap! Thanks.
@bewley
-> It's worked. Thanks. But I continue to have doubts. I know that I need to test filters myself. I'll do it. I'd like only to have suggestions or comments about using filters correctly (place in the script, use SeparateFields()...Weave() or not, etc).
Doesn't make sense what I asked about my script ?
Should be better to know different ways to do my SVCD-NTSC.
Please post your scripts here...
Thanks
Alexandre
bewley
6th May 2003, 23:06
Of course it worked! :cool:
The thing to remember is that each interlaced frame is made up of two fields. Each field retains the horizontal resolution of the video, but only makes up 1/2 of the vertical resolution. So each field in your original capture is 640 x 240 in size.
I don't have any of my scripts handy, but this is how I would apply a little cleaning for my SVCD (CVD) encodes:
AviSource(<filename>)
# open the AVI
a = SeparateFields()
# seperate the frame into two fields
b = a.SelectOdd().Convolution3D(preset="movieHQ")
# clean the odd field
c = a.SelectEven().Convolution3D(preset="movieHQ")
# clean the even field
Interleave(b,c)
# put the fields back into one frame
BicubicResize(480,480) # although I prefer CVD: BicubicResize(352,480)
# resize
Weave()
# recreate an interlaced frame
Of course, you may apply any filter you would like to each field -- as long as the filter allows for more than a single interation per script (Dust, for example, does not).
Don't forget, http://www.avisynth.org/ has a great manual and a FAQ available if you have any questions on the commands used in the above script.
Good Luck!
ADLANCAS
7th May 2003, 04:20
@DDogg
I installed Huffy and changed Windows Registry.
Now I can open this file(YUY2) directly in TMPG.:D
I need only to convertTo24 when itīs used frameserver from Premiere.
If I donīt convert it shows in TMPG:
"File "D:\signpost.avs" can not open, or unsupported.":confused:
Is this normal or I can make something ?
@bewley
Great!!:p
Your explanation is very usefull and clear. Iīll test it.
Thanks a lot.
Thanksssssss
Alexandre
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.