Letterboxing in VirtualDubMod

This forum is for video and audio help and discussion.

Letterboxing in VirtualDubMod

Postby n3ko-chan » Wed Dec 19, 2007 1:42 pm

I'm working on an AMV at the current moment and one anime that I'm using is cropped in wide screen format [640x360]

However the majority of the other footage in the AMV is full screen [640x480]

So can anyone tell me how to put letterboxes on the wide screen footage to make it full screen?
User avatar
n3ko-chan
 
Joined: 30 Sep 2005

Postby Kariudo » Wed Dec 19, 2007 2:08 pm

video-filters-resize
one of the options should say "expand frame and letterbox image"
enable it, and set the resolution for 640x480

another option is to manually add borders via avisynth
Code: Select all
addborders(int left, int top, int right, int bottom)
addborders(0,60,0,60) <- in your case


I might have messed something up in there...resizing isn't my strong suit
ImageImage
Image
User avatar
Kariudo
Twilight prince
 
Joined: 15 Jul 2005
Location: Los taquitos unidos
Status: 1924 bots banned and counting!

Postby n3ko-chan » Wed Dec 19, 2007 2:48 pm

Thanks, but when I go to filters it doesn't give me an option to click it.
User avatar
n3ko-chan
 
Joined: 30 Sep 2005

Postby Kariudo » Wed Dec 19, 2007 2:57 pm

gotta click "add" and search for the resize filter
ImageImage
Image
User avatar
Kariudo
Twilight prince
 
Joined: 15 Jul 2005
Location: Los taquitos unidos
Status: 1924 bots banned and counting!

Postby n3ko-chan » Wed Dec 19, 2007 3:04 pm

Whoops, I'm sorry I didn't notice that ^^ Thanks though when I do what you said to do, all four sides become black instead of just the top and bottom.
User avatar
n3ko-chan
 
Joined: 30 Sep 2005

Postby FinalResolve » Wed Dec 19, 2007 3:10 pm

n3ko-chan wrote:Whoops, I'm sorry I didn't notice that ^^ Thanks though when I do what you said to do, all four sides become black instead of just the top and bottom.


Avisynth is the way to go, just add this to the end of your script and hit f5 to refresh it.
Code: Select all
addborders(0,60,0,60)

Check File> File Information to see if it's the correct resolution then render away if you're happy with it.
Image
User avatar
FinalResolve
 
Joined: 15 Apr 2007

Postby Phantasmagoriat » Wed Dec 19, 2007 3:17 pm

FinalResolve wrote:Avisynth is the way to go
X2

It has many uses besides cropping; you can do virtually anything by running an avisynth script through vdub [avisynth+vdub come with the amvapp] that looks like this:
Code: Select all
avisource("insert-video-filename-between-these-quotes.avi")
converttoyv12()
addborders(0,60,0,60)
temporalcleaner()
DeRainbow(10)
blur(0,1)
sharpen(1)
etc()
etc...
...

-put your video into a new folder
-make a new .txt file in that folder
-copy any script you want into your .txt file, and save
-change the file extension from .txt to .avs
-open .avs with vdub

if your source is not an .avi, try directshowsource("/path.xxx")
...although, what I'd really like to see is mpeg2source("/path.d2v") for DVD footage
Image
Org Profile | AMVGuide | Phan Picks! | THE424SHOW | YouTube | "Galactic Escape"

"Effort to Understand; Effort to be Understood; to See through Different Eyes."
User avatar
Phantasmagoriat
 
Joined: 06 Feb 2006
Status: ☁SteamPunked≈☂

Postby n3ko-chan » Wed Dec 19, 2007 3:17 pm

How exactly would I do this? I try to stay away from AviSynth since every time I've tried using it it has never worked ^^;
User avatar
n3ko-chan
 
Joined: 30 Sep 2005

Postby LantisEscudo » Thu Dec 20, 2007 12:16 am

In VirtualDub, after you've selected the resize filter, you want it to look like this (you can pick whatever resizing mode you prefer, my personal preference is Bicubic or Lanczos3):
Image
User avatar
LantisEscudo
 
Joined: 08 Mar 2001
Location: Vermont

Postby Qyot27 » Thu Dec 20, 2007 2:39 am

Just a note: you might also want to resize or crop the original vid to 640x352 to maintain mod16 proportions. It would only differ by inputting 352 in the height value in the box in the example above (if resizing), or (if cropping), doing this:

Add the 'Null Transform' filter. Then in the main window, with that filter highlighted, click the Cropping... button and take 4 pixels from the top and bottom of the image (i.e. set both the Y1 and Y2 counters to '4'). Then, follow the example outlined above, adding the Resize filter and making sure that the width/height are 640x352 and the letterboxing is set to 640x480.

It would be much simpler in AviSynth, though, since it would only consist of
Code: Select all
[source loader]
Lanczos4Resize(640,352)
AddBorders(0,64,0,64)

or
Code: Select all
[source loader]
Crop(0,4,0,-4)
AddBorders(0,64,0,64)



Phantasmagoriat wrote:-make a new .txt file in that folder
...
-change the file extension from .txt to .avs

This actually isn't required anymore, since new versions of AviSynth install a context menu item that does that. Right click->New->AviSynth script. Then just double-click or right-click->Edit or whatever you usually do to bring up scripts in Notepad (I do the right-click->Edit routine since I have scripts set to play back when double-clicked).
User avatar
Qyot27
Surreptitious fluffy bunny
 
Joined: 30 Aug 2002
Location: St. Pete, FL
Status: Creepin' between the bullfrogs

Postby Athena » Thu Dec 20, 2007 4:49 am

What is better about vdubmod is that you can change the letterboxing color. I am working on a video where the letterboxing is pink. If avs can do that, I haven't learned how.
Image
User avatar
Athena
I ♥ the 80's
 
Joined: 02 Mar 2001
Location: Japan
Status: Sad Girl on Mac

Postby Qyot27 » Thu Dec 20, 2007 5:06 am

Kionon wrote:What is better about vdubmod is that you can change the letterboxing color. I am working on a video where the letterboxing is pink. If avs can do that, I haven't learned how.

AddBorders can do it, by specifying a hex value or by referring to a color preset.

For instance,
Code: Select all
[source loader]
AddBorders(0,64,0,64, color=color_turquoise)

Adds turquoise borders.

http://avisynth.org/mediawiki/AddBorders
http://avisynth.org/mediawiki/Colors
http://avisynth.org/mediawiki/Color_presets
User avatar
Qyot27
Surreptitious fluffy bunny
 
Joined: 30 Aug 2002
Location: St. Pete, FL
Status: Creepin' between the bullfrogs

Postby guy07 » Thu Dec 20, 2007 2:54 pm

I should prob point out that most people prefer videos WITHOUT letterboxes ...so how you resize the video WITHOUT letter boxing with V-dub is what you should be teaching him. And me. :D
User avatar
guy07
 
Joined: 08 Sep 2003
Location: T.O.
Status: Back in beard.

Postby Phantasmagoriat » Thu Dec 20, 2007 3:26 pm

guy07 wrote:I should prob point out that most people prefer videos WITHOUT letterboxes ...so how you resize the video WITHOUT letter boxing with V-dub is what you should be teaching him. And me. :D

Good point, I prefer it that way as well since it totally saves your filesize... and actually fits on my widescreen display. I never tried using vdub, but with avisynth through vdub:

Code: Select all
crop(0,60,0,-60)  #crop(from left, from top, -ve from right, -ve from bottom)
or
lanczosresize(640,352)   #(width, height)  scenes will be squished thought
Image
Org Profile | AMVGuide | Phan Picks! | THE424SHOW | YouTube | "Galactic Escape"

"Effort to Understand; Effort to be Understood; to See through Different Eyes."
User avatar
Phantasmagoriat
 
Joined: 06 Feb 2006
Status: ☁SteamPunked≈☂

Postby Qyot27 » Thu Dec 20, 2007 7:13 pm

guy07 wrote:I should prob point out that most people prefer videos WITHOUT letterboxes ...so how you resize the video WITHOUT letter boxing with V-dub is what you should be teaching him. And me. :D

Yeah, except this concerns mixing 4:3 and 16:9 footage, and unless you want to lose visual information (by cropping the top and bottom off the 4:3 areas or cropping the sides from the 16:9 clips), letterboxing the 16:9 sections is the only way to do it. At least correctly.

In other words, the available solutions are:
  • Crop the top and bottom from the 4:3 to match the 16:9 segments
  • Crop the right and left from the 16:9 to match the 4:3 segments (may involve upscaling or downscaling if the height of the 16:9 clips isn't already the same as the 4:3)
  • Letterbox the 16:9 footage so it matches the 4:3, and neither loses information


All you have to do to resize in VDub without letterboxing is just not check 'Expand frame and letterbox image'. But unless you're cropping using the method I already pointed out above, then it's going to distort the picture.
User avatar
Qyot27
Surreptitious fluffy bunny
 
Joined: 30 Aug 2002
Location: St. Pete, FL
Status: Creepin' between the bullfrogs


Return to Video & Audio Help

Who is online

Users browsing this forum: No registered users and 2 guests