This is a script generated by DVD Rebuilder to convert a 4:3 movie to 16:9.
Can someone explain each of the steps in the last two lines - especially whats happening in the Resize step.
#------------------
# AVS File Created by DVD Rebuilder
# VOBID:02, CELLID:02
#------------------
LoadPlugin("C:\Program Files (x86)\DVD-RB\DGDecode.dll")
mpeg2source("C:\DVD Rebuilder Work\D2VAVS\V01.D2V")
trim(1117,12597)
SeparateFields().LanczosResize(720,240,0,30,720,18 0).Weave()
ConvertToYV12(interlaced=true)
+ Reply to Thread
Results 1 to 24 of 24
-
-
SeparateFields splits the 720x480 frames into 2 720x240 fields. Then the LanczosResize resizes it back to 720x240 after performing the necessary crop (30 from both top and bottom) to enable the 16:9 encoding. The Weave weaves the 720x240 fields back into 720x480 frames. It should be 180 and not 18 0.
Another way of writing it is:
SeparateFields().LanczosResize(720,240,0,30,0,-30).Weave()
ConvertToYV12(interlaced=true)
Yet another way is:
SeparateFields()
Crop(0,30,0,-30)
LanczosResize(720,240)
Weave()
ConvertToYV12(interlaced=true) -
An interlaced frame of video contains two half pictures, called fields, one in all the even scanlines, one in all the odd scanlines. The two fields are intended to be viewed separately, not at the same time. To resize an interlaced frame you need to separate the fields, resize them, then weave them back together. Otherwise the two fields will co-mingle.
SeperateFields().LanczosResize().Weave() is not the best way to do this but it's fast and easy. -
@manono
Thank you;your explanation makes sense - I couldn't follow the logic of the original LanczosResize(720,240,0,30,720,18 0)
@jagaboThank you.I had tried cropping and resizing the VOB file in VirtualDub to try and approximate the script and noticed the odd results from the interlacing.
The reason I asked was that I saw there is a post open for the Titanic movie - I too have a 4:3 letterbox edition of the disk and have intermittently tried to get it into 16:9.
One response to the OP was use DVD Recode - so I used it and it worked, but I couldn't fathom the script being used. -
Although the 4:3 Titanic is one of the better quality widescreen 4:3 DVDs ever released, if you really like the film that much you should buy the 16:9 DVD version.
http://www.amazon.com/Titanic-10th-Anniversary-Leonardo-DiCaprio/dp/B000VS6R26/ref=sr_...5076177&sr=1-2
For better quality and better encoder efficiency yours should be IVTC'd, something DVD-Rebuilder is incapable of doing. Of course, movies aren't interlaced and it's a simple matter to return it to its original progressive state.Last edited by manono; 11th May 2011 at 07:38.
-
The equivalent in VirtualDub is to use Deinterlace (unfold fields side by side), Resize, Deinterlace (fold side by side fields together).
-
-
It's not supposed to look right. VirtualDub shows you the result as square pixels (unless you override the display aspect ratio of the output window). A 16:9 DAR 720x480 frame should look horizontally squished when viewed as square pixels. If you want to see it as 16:9 DAR right click on the output pane and select 16:9 Frame.
Since you're working with film based material you should inverse telecine back to the original film frames. That will give you better resizing and compression. For example (these are 360x480 crops of the 720x480 frames, just to make the files smaller):
interlaced source frame:
deinterlace/crop/resize/reinterlace:
ivtc/crop/resize:
The problems are especially obvious with animation because of the sharp high contrast edges. It's less noticeable with real world video because it tends not to have such sharp edges.Last edited by jagabo; 11th May 2011 at 08:01.
-
Ok, I see the correct AR after changing the view in VirtualDub.
The original script from DVD Rebuilder crops 30 top and bottom from the source.
Is this an arbitrary number, because it looks like in VirtualDub that 50 would be the value to remove all of the border - but then I can't figure out the resize values.
How does 'ivtc/crop/resize' resolve to a 16:9 image.
When I crop 50 from top and bottom (to completely remove the border) and resize using absolute values (720 X 480) it just stretches it vertically. -
The DVD-RB script crops 30 from the top and bottom of the fields (not the source). If working with the full frames (after an IVTC, for example) you'd crop 60 from both the top and bottom of the frames.
You can also get 4:3 to 16:9 crop/resize values from FitCD. I wouldn't try and eyeball it, if I were you. -
No, it's not an arbitrary number. The ratio of (16:9) / (4:3) = 1.333.... So to convert a 480 line tall frame from 4:3 to 16:9 you need to divide 480 by 1.333... giving you 360 lines. That means you have to remove a total o 120 lines from the frame. That's usually done by taking 60 lines off the top and 60 lines off the bottom (or any combination that totals to 120). SeparateFields() split the 720x480 frame into two 720x240 frames -- ie, half high frames. So you only crop half as much, 30 lines top and bottom.
After IVTC you have 720x480 progressive frames at 24 fps. You then crop 60 lines off the top and bottom (leaving 360 lines) and resize back to 480 lines. You now have a 720x480, 16:9 anamorphic frame, ready for MPEG 2 encoding for DVD.
If you're encoding for DVD you have only two choices of aspect ratio: 4:3 or 16:9. The movie you have is wider than 16:9 so it still has to be letterboxed when using a 16:9 frame. -
Comparing their appearance on the output pane of Virtualdub, the deinterlace and IVCT methods, my eye doesn't see any difference.
Assuming I use 'ivtc/crop/resize', I would now serve the output from VirtualDub to an encoder?
This is an NTSC video and if I am using the QuEnc encoder, do I leave the video as progressive or apply the pulldown setting.
[Attachment 6787 - Click to enlarge] -
If you're doing all your filtering in the AviSynth script (and you should), both the input and output panes of VDub are identical.
Assuming I use 'ivtc/crop/resize', I would now serve the output from VirtualDub to an encoder?
This is an NTSC video and if I am using the QuEnc encoder, do I leave the video as progressive or apply the pulldown setting. -
All in VirtualDub? Be sure to set Video -> Color Depth -> 4:2:2 YCbCr (YUY2) or the chroma channels will get messed up. And, as noted earlier, the difference between IVTC/resize and deinterlace/resize/reinterlace isn't as obvious in real world video which doesn't have sharp horiztonal edges. But encoding 24 fps progressive with pulldown flags always gives better results than encoding 30 fps interlaced.
-
What would be the values in an IVTC/resize script to replace the following deinterlace/resize/reinterlace script.
-
It depends on which IVTC you want to use. One example:
http://avisynth.org/mediawiki/TIVTC -
Is there a reason you used 'ConvertToYV12(interlaced=true)' after making it progressive with the IVTC? In addition, as it's a DVD source it's in YV12 already. Also, he's converting from 4:3 to 16:9. Also, I suspect at least part of it, if not most of it, is soft telecined, so I'd do it this way:
TFM(D2V="Titanic.d2v").TDecimate()
Crop(0,60,0,-60)
LanczosResize(720,480) -
Ah, yes. There's no reason to ConvertToYV12(interlaced=true). The frames are already YV12 coming out of Mpeg2Source(), TFM() has made them progressive, and you will be encoding progressive.
-
Much obliged for any comments.
Demuxed Titanic using DGIndex and used the final revised script with HCEnc.
The demuxed video in GSpot is shown as interlaced, however I expected the output from HCEnc to list as progressive, but it was also shown as interlaced - is this normal?
The log from HCEnc lists no interlacing.
Loaded the .m2v from HCEnc into MuxMan, but it was rejected - was that because it was 23.976 fps?
Authored the DVD using DVD Flick and burned to disk using ImgBurn.
Next I applied pulldown to the HCEnc output using DGPulldown, authored and burned disk.
Both disks play ok on a standalone player - does the standalone player apply pulldown to the output that is 23.976 fps? -
If you've set it up properly in hcenc, mediainfo will say progressive 2:3 pulldown
Playing it in DGIndex will show video type "film", frame type "progressive"
I can't remember what gspot says, I think it says I/L and 23.976 pics/s for soft pulldown , but 29.97 pics/s for hard telecine
You need to hit make "DVD compliant" button in order for HCenc to insert soft pulldown flags (it will auto checkmark 3:2 pulldown box)Last edited by poisondeathray; 15th May 2011 at 11:16.
-
-
I should have mentioned DGPulldown can do this a lot quicker instead of re-encoding (assuming you set everything else in HCEnc correctly)
In HCEnc, the "make dvd compliant" button fixes other things too , like GOP proper length
I should warn you that previewing in DGIndex would be the best tool to determine the videotype encoding, because mediainfo doesn't scan the file, just reads header info - and can be inaccurate
And does a standalone player compensate by adding pulldown.Last edited by poisondeathray; 15th May 2011 at 12:28.
-
FWIW, I used the 3:2 output from HCEnc with the demuxed audio and authored the DVD with DVD Flick.
Selected one chapter using DVD Shrink and burned a DVD-RW using ImgBurn.
I found that one standalone player had multiple freezeups on playback.
I sacrificed a TY DVD-R and got the same result - but only on one standalone.
Next I muxed the DVD using MuxMan and selected the same chapter using DVD Shrink and Imgburn.
Burning to the same DVD-RW showed no problems.
Seems DVD Flick was doing something that one player didn't care for.
Similar Threads
-
AVS to psudo-AVI via VFAPI (1.05), in a BATCH FILE?
By RogerTango in forum Video ConversionReplies: 1Last Post: 6th May 2012, 00:49 -
how do i take avs logo off avs video
By tnwolf35 in forum Newbie / General discussionsReplies: 3Last Post: 3rd Sep 2010, 21:08 -
Limiting File Size in AVS Video Converter
By TJF in forum DVD RippingReplies: 6Last Post: 27th Nov 2009, 13:20 -
AVS Video Converter Freezes Up Whenever I Load Up An MKV File
By shuya_nanahara in forum Newbie / General discussionsReplies: 5Last Post: 23rd Mar 2009, 10:33 -
Problem opening (.avs) file in virtualdub...
By dominator007 in forum DVD RippingReplies: 16Last Post: 19th Nov 2008, 10:53