Much thanks in advance
Best way to convert form Widescreen to Television Format?
- OtakuForLife
- Joined: Wed Sep 25, 2002 3:37 pm
- Status: In relationship
- Location: Endsvill (North Providence, RI , USA)
Best way to convert form Widescreen to Television Format?
I was thinking of using avisynth for this, anyone know a good script for this purpose?
Much thanks in advance
Much thanks in advance
- Qyot27
- Surreptitious fluffy bunny
- Joined: Fri Aug 30, 2002 12:08 pm
- Status: Creepin' between the bullfrogs
- Location: St. Pete, FL
- Contact:
Re: Best way to convert form Widescreen to Television Format?
To do it right, there isn't a one-size-fits-all solution. You have to judge by eye the section you want to retain.
Theoretically, it's just (assuming that you're talking about 848x480 here, not 720x480 with 16:9 flags, or non-16:9 ratios that have been letterboxed, like 2.39:1*¹):
Crop(104,0,-104,0)
But like I said, the best way is to make sure you adjust for the action in the frame, which means the above values for cropping the left and right sides are probably not the 'correct' ones to use. The way to determine what are the right values is to open the video in VirtualDub*² and crop a total of 208 pixels on the horizontal (x) values, so you end up with a video that's 640x480 (new versions of VDub actually tell you what size the resulting video will be inside the Crop dialog, so you can make sure everything's ok). Then just plug the crop values you got in VDub into the Crop() command in the script.
*¹ If you need to convert 2.39:1 to 4:3, then you first have to crop out the borders and resize (or just resize, if the source is already cropped) proportionally to a height of 480. Then crop however much is needed - such as 256 pixels on either side (2.39:1 is roughly 1152x480, given mod16) - to get a result of 640x480.
If you don't want to lose any action at all, meaning you want to letterbox, then the solution is (assuming regular 16:9 content, not 2.39:1 or other wide aspect ratios):
*method*Resize(640,352)
AddBorders(0,64,0,64)
where *method* is the preferred resizer: Bilinear, Bicubic, Lanczos, Spline, etc.
*² Go to Filters and add Null Transform, then click the Cropping button. Pure cropping is pretty much the entire reason for Null Transform anyway. If you need to open something other than AVI, make sure you're using VirtualDub 1.9.9 and have the MPEG2, WMV, and DirectShow vdplugins in the plugins32 folder in VDub's directory. If plugins32 doesn't exist, create it yourself and then place the .vdplugin files in it.
Theoretically, it's just (assuming that you're talking about 848x480 here, not 720x480 with 16:9 flags, or non-16:9 ratios that have been letterboxed, like 2.39:1*¹):
Crop(104,0,-104,0)
But like I said, the best way is to make sure you adjust for the action in the frame, which means the above values for cropping the left and right sides are probably not the 'correct' ones to use. The way to determine what are the right values is to open the video in VirtualDub*² and crop a total of 208 pixels on the horizontal (x) values, so you end up with a video that's 640x480 (new versions of VDub actually tell you what size the resulting video will be inside the Crop dialog, so you can make sure everything's ok). Then just plug the crop values you got in VDub into the Crop() command in the script.
*¹ If you need to convert 2.39:1 to 4:3, then you first have to crop out the borders and resize (or just resize, if the source is already cropped) proportionally to a height of 480. Then crop however much is needed - such as 256 pixels on either side (2.39:1 is roughly 1152x480, given mod16) - to get a result of 640x480.
If you don't want to lose any action at all, meaning you want to letterbox, then the solution is (assuming regular 16:9 content, not 2.39:1 or other wide aspect ratios):
*method*Resize(640,352)
AddBorders(0,64,0,64)
where *method* is the preferred resizer: Bilinear, Bicubic, Lanczos, Spline, etc.
*² Go to Filters and add Null Transform, then click the Cropping button. Pure cropping is pretty much the entire reason for Null Transform anyway. If you need to open something other than AVI, make sure you're using VirtualDub 1.9.9 and have the MPEG2, WMV, and DirectShow vdplugins in the plugins32 folder in VDub's directory. If plugins32 doesn't exist, create it yourself and then place the .vdplugin files in it.
My profile on MyAnimeList | Quasistatic Regret: yeah, yeah, I finally got a blog
- Phantasmagoriat
- Joined: Mon Feb 06, 2006 11:26 pm
- Status: ☁SteamPunked≈☂
- Contact:
Re: Best way to convert form Widescreen to Television Format?
There just might be ...soon...Qyot27 wrote:there isn't a one-size-fits-all solution
Though you'll still have to decide if you want to "resize," "crop," or "addborders."
PLAY FREEDOOM!! | Phan Picks! | THE424SHOW | YouTube | "Painkiller" | Vanilla MIDI's
"Effort to Understand; Effort to be Understood; to See through Different Eyes."
"Effort to Understand; Effort to be Understood; to See through Different Eyes."
-
Mister Hatt
- Joined: Tue Dec 25, 2007 8:26 am
- Status: better than you
- Contact:
Re: Best way to convert form Widescreen to Television Format?
>implying x264 will take over the encoding world
- OtakuForLife
- Joined: Wed Sep 25, 2002 3:37 pm
- Status: In relationship
- Location: Endsvill (North Providence, RI , USA)
Re: Best way to convert form Widescreen to Television Format?
Thanks for the info, all I have to do now is add that code to the Dv2 files and it all works out 
- mirkosp
- The Absolute Mudman
- Joined: Mon Apr 24, 2006 6:24 am
- Status: (」・ワ・)」(⊃・ワ・)⊃
- Location: Gallarate (VA), Italy
- Contact:
Re: Best way to convert form Widescreen to Television Format?
You add those in the avs not in the d2v. Normally you don't really touch the code of the d2v (unless it's something small and you know what you're doing).OtakuForLife wrote:Thanks for the info, all I have to do now is add that code to the Dv2 files and it all works out
-
Mister Hatt
- Joined: Tue Dec 25, 2007 8:26 am
- Status: better than you
- Contact:
Re: Best way to convert form Widescreen to Television Format?
To clarify: no, you do not know what you are doing, so don't even try; that goes to pretty much everyone here. I don't think there are more than a handful of people globally who actually know the ins and outs of a d2v file properly, even I barely understand it.mirkosp wrote:Normally you don't really touch the code of the d2v (unless it's something small and you know what you're doing).
- mirkosp
- The Absolute Mudman
- Joined: Mon Apr 24, 2006 6:24 am
- Status: (」・ワ・)」(⊃・ワ・)⊃
- Location: Gallarate (VA), Italy
- Contact:
Re: Best way to convert form Widescreen to Television Format?
I was more referring to the beginning bit which holds framerate/aspect ratio/field operation/etc info. Sometimes I touch a couple of those when I want to change a d2v from honor pulldown to forced film without having to reindex the whole thing.Mister Hatt wrote:To clarify: no, you do not know what you are doing, so don't even try; that goes to pretty much everyone here. I don't think there are more than a handful of people globally who actually know the ins and outs of a d2v file properly, even I barely understand it.mirkosp wrote:Normally you don't really touch the code of the d2v (unless it's something small and you know what you're doing).
- Scintilla
- (for EXTREME)
- Joined: Mon Mar 31, 2003 8:47 pm
- Status: Quo
- Location: New Jersey
- Contact:
Re: Best way to convert form Widescreen to Television Format?
To give an even simpler example, I edit D2V files all the time when the VOBs they refer to have been moved from one partition on my computer to another. It's just changing one letter and they work fine afterwards.mirkosp wrote:I was more referring to the beginning bit which holds framerate/aspect ratio/field operation/etc info. Sometimes I touch a couple of those when I want to change a d2v from honor pulldown to forced film without having to reindex the whole thing.Mister Hatt wrote:To clarify: no, you do not know what you are doing, so don't even try; that goes to pretty much everyone here. I don't think there are more than a handful of people globally who actually know the ins and outs of a d2v file properly, even I barely understand it.mirkosp wrote:Normally you don't really touch the code of the d2v (unless it's something small and you know what you're doing).
-
Mister Hatt
- Joined: Tue Dec 25, 2007 8:26 am
- Status: better than you
- Contact:
Re: Best way to convert form Widescreen to Television Format?
I thought as much, although I use relative paths so it's not as much a problem here. For some reason I thought you guys meant the main part of the d2v >.>



