Hello,
I have captured an analogue VHS cassette to my PC. The capture was done with a 720*576 aspect ratio using VirtualDub. The resulted video file aspect ratio have been distorted and is now 720*568. I read in the Doom9 guide that this effect is normal and that I should resize. So I used the command BilinearResize(720, 576) and now the picture is correct. My destination is a DVD so I don't deinterlace the video - I let the DVD player do it. The question is if the resizing does not mess the fields? I resized it height-wise so the fields got thicker. Will the DVD be able to accept the altered fields and produce a deinterlaced picture?
Please help.
+ Reply to Thread
Results 1 to 27 of 27
-
-
If your target is PAL DVD, then 720x576 (that you already have) is the right size for sending to encoder. Resizing any interlaced video vertically is not safe without deinterlacing or bobbing (and this is not desirable in most cases). You better hide bottom lines using Letterbox command instead of cropping or add a bottom border if already cropped it.
-
So if it is not recommended to resize vertically - what should I do?Originally Posted by Alex_ander
My video after capture is 720*568 instead of 720*576. That means I don't have excessive area - I have shortage in area. I don't need to hide or crop. I need to extend it vertically in 8 pixels.Originally Posted by Alex_ander
What is the solution? -
You need to add 8 blank lines (if I remember right, you use AviSynth) complementing video size to 576. If you haven't resized+saved it yet, this will keep line structure and prevent from getting artifacts from resizing.
AddBorders(0,0,0,8)
If you feel you really need to correct AR by resizing, the right way to do it is using smart bob function (e.g. in LeakKernelDeint filter for AviSynth). It builds a frame for each field with doubling framerate. This provides missing pixel data needed for proper resizing (or other filtering) each separated field; after resizing you build new frames from fields taken from each of those temporary frames. Do you want the details of such a script or decide to add border? -
That's my preferred method, although I use Lanczos4Resize() instead of BilinearResize().Originally Posted by Pinstripes23"Shut up Wesley!" -- Captain Jean-Luc Picard
Buy My Books -
I would too, but 1gnition initially used bilinear in his 1st post, so thought I'd throw that in the script instead.Originally Posted by gadgetguy
-
Adding 8 lines will work better than resizing. Since you're already using VirtualDub you can use it's resize filter. In the top half resize to the same size as the source 720x568. Then enable the Exand Frame And Letterbox Image option set the size to 720x576. That will add 4 lines to the top and 4 lines to the bottom.
AVISynth's AddBorders() would work better if your video is not in RGB format.
Your best solution is to simply capture at the right size to start with, 720x576.
This:
will work better thanCode:LeakKernelBob(Order=1)#if TFF LanczosResize(720,576) SeparateFields() SelectEvery(4,0,3)#if TFF Weave()
If you're going resize in AVISynth.Code:SeparateFields() LanczosResize(720,576) Weave()
-
576 resize after separating fields? It will produce a vert resolution of 1152 after weaving.Originally Posted by jagabo
-
Sorry, typo. Obviously it should be 720,288.Originally Posted by Pinstripes23
-
Thank you all for the replies

I would prefer the Smartbob way. BTW - isn't that the method "jagabo" suggested?Originally Posted by Alex_ander
Is that true that this:Originally Posted by Pinstripes23
Is better?Code:LeakKernelBob(Order=1)#if TFF LanczosResize(720,576) SeparateFields() SelectEvery(4,0,3)#if TFF Weave()
-
1.yes (be sure to get and load LeakKernelDeint filter)
2.yes -
Personally I didn't notice a difference from a quick test just now on a 2 min dvd clip. The LeakKernelBob way converts slower obviously but test both out and see what you think.Originally Posted by 1gnition
-
Try a resolution test pattern. Or a video with sharp horizontal edges.Originally Posted by Pinstripes23
Here are some sample crops, the top was done with SeparateFields(), the bottom with LeakKernelDeint():

These samples were enlarged from 720x480 to 720x576. The larger resize makes the problem more obvious. -
K thanks for the visual confirmation jagabo. I don't resize interlaced video too much but next time I come across one where I need to, I'll keep this script in mind.
Now would this script be useful if you need to apply a denoiser without resizing? I assume it would be applied right after the BOB since that's where progressive frames are created. -
Guys, I encoded and burned and there is a problem - the video seems to be on a low FPS or something. The movement is not smooth! The problem does not exists while running the .mpv file on the computer but only when playing in the DVD player with a TV.
I downloaded the plugin and used this script:
at the the end of my AVS script. My full AVS script is as follows:Code:LeakKernelBob(Order=1)#if TFF LanczosResize(720,576) SeparateFields() SelectEvery(4,0,3)#if TFF Weave()
Before that there is the whole chapters division and transition which was generated using AVSCutter and doesn't seem relevant. I can post that too if you want.Code:ConvertToYV12(interlaced=true) DeSpot(interlaced=true, pwidth=730, pheight=4, p1=76, mthres=35, p2=12) ConvertToYUY2(interlaced=true) Cnr2("xxx",4,5,255) ChromaShift(C=-6) GuavaComb(Mode = "PAL", Recall = 75, MaxVariation = 25, Activation = 40) BilinearResize(720, 576) # Only Spatial: SeparateFields() VagueDenoiser(threshold=4, method=1, nsteps=6, chromat=0) Weave() FadeIO2(80) # Resizing: LeakKernelBob(Order=1)#if TFF LanczosResize(720,576) SeparateFields() SelectEvery(4,0,3)#if TFF Weave() # Color Adjusting: tweak(+3, 1.2, +20, 1.2)
Please tell me if you detect any error in my script which may cause the problem I mentioned. You were really helpful until now, don't leave me on the final step!
Thanks!!
Edit: OMG! I noticed that I left the bilinear command. I should have erased that. Any chance that this is what caused the problem? -
Any chance that this is what caused the problem?
Well, it's a major screwup, that's for sure, and completely ruined the video. The idea of that whole resizing-while-progressive thing is that you also do all of your filtering while it's progressive (except for any filtering you do that's interlace aware, as Despot evidently is). That didn't do your video any good, either. Your script is a complete mess. -
Note that LeakKernelBob(Order=1) is for top field first video. Bottom field first should use LeakKernelBob(Order=0). You may also have to change SelectEvery(4,0,3) to SelectEvery(4,1,2). I don't remember for sure and I don't feel like thinking too hard right now! Maybe manono remembers.
The wrong field order would cause jerky playback where the jerks are very fast, almost a strobing effect. It doesn't sound like that is what you're seeing. -
Besides the Bilinear? If it is, then I would like to know what is out of order.Originally Posted by manono
Thank you. -
1.A good rule is to add necessary filters between LeakKernelBob() and SeparateFields() at which point the video is progressive (double framerate). Use the field order value (0 or 1) matching your source (as Jagabo mentioned). If in doubt, test both versions after LeakKernelBob() line (disable the lines below) in VDub: the motion should progress with each frame. Most likely, the video from capture is BFF. Before SeparateFields you can either add AssumeTFF() to get TFF in the end or change (4,0,3) to (4,1,2) otherwise by Avs's default you'll get BFF. You should know exactly which one you have (TFF or BFF) for encoding any interlaced video in CCE. In advanced CCE settings you adjust it for field order of your video. E.g. if your video is BFF and you want to encode it to TFF, you check 'TFF' and use 'offset line' 1 instead of 0 (0 is used if you set output field order matching your source). It's the only way to prevent from jerkyness.Originally Posted by 1gnition
2.Begin with a simple script (disable less important filters) and put everything in proper order. After adding a filter always test the script in VDub to be sure you move in the right direction.
3.Colour space conversion for CCE should be in the very end. Conversions inside the script are only done in case your video is different from what a particular filter needs, e.g. if a VDub plugin is used, you should convert to RGB. Most filters for AviSynth support (YV12+YUY2). -
All right. I followed your guidelines and corrected things.
1. I used VagueDenoiser between LeakKernelBob() and SeparateFields().
2. I checked what kind of scan I have and it is TFF.
3. I added AssumeTFF() before SeparateFields().
4. All the color conversions are necessary for filters. YV12 for Despot, then YUY2 for Guavacomb, then again YUY2 because this is the color type I based the Tweak on and I don't want to start again Tweak with YV12.
Well, I hope this is better.Code:SegmentedAVISource("d:\vhs\capture.avi") ConvertToRGB(interlaced=true) # For AVSCutter script # Removal of scratches: ConvertToYV12(interlaced=true) DeSpot(interlaced=true, pwidth=730, pheight=4, p1=76, mthres=35, p2=12, show=2) # Removal of chroma artefacts: Cnr2("xxx",4,5,255) ChromaShift(C=-6) ConvertToYUY2(interlaced=true) GuavaComb(Mode = "PAL", Recall = 75, MaxVariation = 25, Activation = 40) LeakKernelBob(Order=1) VagueDenoiser(threshold=4, method=1, nsteps=6, chromat=0) # Spatial Denoiser LanczosResize(720,576) # Resize AssumeTFF() SeparateFields() SelectEvery(4,0,3) Weave() # Color Adjusting: ConvertToYUY2(interlaced=true) Tweak(+3, 1.2, +20, 1.2) FadeIO2(80) -
Looks better but you still use ConvertToYV12() twice for filters working one after the other. What does VDub read for colour space of the input video in properties (load a script with just open video line), maybe it's already YV12? Where is RGB used?
You use some filters with interlace-aimed option, but maybe they would still better work in progressive mode (by putting after LeakKernelBob). Many of such filters internally just separate fields, process, then weave back and you already have a better alternative to this (smart bob) in the script that is applied just once. It takes more time to process at double framerate but can be better. I'd group colour/level adjustment operations in one place and test if all filters are necessary for this, before or after denoiser they work better, etc.
When you feel ready to encode, look at the default CCE settings for field order+offset line and correct if necessary. Do a short encoding test first. -
I agree, why all the colorspace conversions? Particularly, why the RGB conversion right off the bat?
Add Info() right after the AviSource line at the top to find the colorspace of the source video. As Alex_ander says, it's perhaps (probably?) already YV12. I don't see why you need to convert to RGB at all, especially since you convert to YV12 in the very next line. Can GuavaComb be used while the video is interlaced? I'm just asking as I've never used it. I didn't understand your Tweak reasoning, either. The idea is to do as few colorspace conversions as possible. The idea is also not to overfilter. I don't know the shape your VHS source is in, but there's an awful lot of filtering going on in that script. -
Been taken care of.Originally Posted by Alex_ander
As I wrote in the comment - the RGB colorspace is meant for the AVSCutter script which I didn't post because it is not relevant.Originally Posted by manono
According to Doom9 guide it can.Originally Posted by manono
I just followed Doom9 guide step by step and this is what I came up with. Apparently your approach is different. I really don't know which is better because I obviously know less then you. Moreover, I felt "guilty" because I thought I didn't use enough filters because Doom9 guide recommends to use spatial denoiser and temporal denoiser and I use only one of them. Nevertheless, it seems that every filter there is essential:Originally Posted by manono
Despot - for horizontal scratches in the source video.
CNR2 - for chroma noise.
Chromashift - for color bleeding.
Guavacomb - for rainbow effect and dots crawl.
Vaguedenoiser - for noise.
Tweak - to improve colors in the video.
Besides that I have another question. Now, I feel a bit bothersome, so if you fed up with me - just say. As you know, I resized the video back to 720*576. I burned a DVD, played it on my TV and noticed that the picture is a bit wide and that the sides are a bit cut. Is it possible or my mind is just playing tricks on me? -
Is it possible or my mind is just playing tricks on me?
Maybe. I would guess it's the effect of the Overscan:
https://www.videohelp.com/glossary?O#Overscan
You usually get less on a TV than you do on a computer as a computer monitor doesn't have any overscan.
Similar Threads
-
Cropping and resizing interlaced video
By loekverhees in forum Newbie / General discussionsReplies: 9Last Post: 1st Sep 2009, 05:34 -
Resizing video file size using handbreak question.
By demonhunter in forum Video ConversionReplies: 2Last Post: 19th May 2009, 07:23 -
Resizing question
By tb582 in forum Video ConversionReplies: 1Last Post: 16th Feb 2009, 15:56 -
Resizing interlaced video - slightly confused at the process
By PTRACER in forum EditingReplies: 2Last Post: 7th May 2008, 08:14 -
question about virtualdub resizing filters
By gutsmanx in forum Capturing and VCRReplies: 2Last Post: 30th Aug 2007, 13:55



Quote