digitalFAQ.com Forum

digitalFAQ.com Forum (https://www.digitalfaq.com/forum/)
-   General Discussion (https://www.digitalfaq.com/forum/news/)
-   -   Converting non-anamorphic to anamorphic? (https://www.digitalfaq.com/forum/news/6694-converting-anamorphic-anamorphic.html)

merchantord 08-22-2015 09:17 AM

Converting non-anamorphic to anamorphic?
 
I know this has been asked a number of times before in the forum but all of those threads appear to be fairly dated. So as of right now (22 Aug. 2015), what is the best way to convert a non-anamorphic source to anamorphic?

I'm looking to maintain as much of the original quality as possible although I understand some will be sacrificed on the re-encode. The reason I wish to do this is to eliminate windowboxing on 16:9 televisions. I understand the zoom function on my Oppo will do essentially the same thing but since I put these discs in a lending library and they are used by people who may not be all that savvy on their player's operation or who may not have a zoom function to use, I want to eliminate as many variables as possible and have it display like it should.

Many thanks.

sanlyn 08-22-2015 05:13 PM

Not sure what you mean, but I think you refer to letterboxed 16:9 videos on 4:3 aspect ratio originals? Or maybe not, as you gave no format information.

Non-anamorphic standard format video is usually encoded as square pixel 1:1 video. That is, a square-pixel 640x480 video displays as 640x480 (4:3). A 1280x720 square-pixel video displays as 1280x720 16:9. Standard anamorphic formats are DVD or SD BluRay encoded as 720x480 frames to display at either 16:9 or 4:3 on output.

If the original videos you refer to are not exactly 16:9 images, they will not completely fill a 16:9 display. If they're wider than 16:9, they'll be letterboxed on a 16:9 display. If they're more narrow than 16:9 (4:3), they'll be pillared, and some will be both letterboxed (slightly) and pillared (such as 1.6:1 VistaVision).

So I guess the question is, what's the aspect ratio of those non-anamorphic videos, what's the encoded frame size, and how are they encoded?

jmac698 08-27-2015 01:32 AM

None of those questions need to be answered; it's clearly from DVD to DVD, and all it needs is a crop and resize and you'll be in the same situation as any anamorphic DVD.

This will work with captured yuy2 avi's from vhs or laserdisc, or extracted vobs from dvds. The resulting quality will be the same as most zoom functions on tv's or dvd players. You can get slightly better quality by using a better resizer like qtgmc.

One practical note though, it isn't always the case that a title is in one vobset, for example episodes can be merged into one set of files. Use vob2mpg for such cases.

I didn't think through if interlaced resizing properly works, but I hope avisynth does it right. There's no check that the source is actually letterboxed, but you wouldn't be encoding it if it wasn't. Also there's easier to ways to do what I'm doing, for example just use the crop/resize settings in any editor or encoder program, but with my approach, I leave open the possibility to use qtgmc as you asked for the best quality.

Code:

#script to convert letterboxed video to anamorphic
#requirements:
#Avisynth 2.60 http://sourceforge.net/projects/avisynth2/
#FFMS2 https://github.com/FFMS/ffms2/releases

#define working directory for convenience
dir="C:\Users\me\Videos\Emergency\"

#open the file with your desired source filter. Using ffms2 means you don't need directshow filters installed
openvid(dir+"VTS_01_1.VOB")+openvid(dir+"VTS_01_2.VOB")

#read the dimensions of the opened video
w=width()
h=Height()
 
#crop it to 16:9 letterbox
croph=h*(16-9)/16#what's leftover from a 9/16 height
 
#remember the original chroma format (only yuy2 and yv12 supported)
yuy2=isyuy2()
yv12=isyv12()

#convert to a full chroma format so there's no mod2 restrictions on height
converttoyv24()
 
#crop to letterbox
crop(0,croph/2,0,-croph/2)
 
#make anamorphic with your preferred resizer here
BilinearResize(w,h)
 
#return to original colourspace
yuy2?converttoyuy2():nop
yv12?converttoyv12():nop
 
#ready to encode

#function to open a video, for convience of merging a vob set
function openvid(string fn){
    a=FFAudioSource(fn)
    v=FFVideoSource(fn)
    audiodub(v,a)
}

As for the simplest way to do this, just crop 105 pixels off the top and bottom of the video, then resize to 480 height, in whatever program you use, such as virtualdub with the mpeg source plugin.

lordsmurf 08-27-2015 10:20 PM

merchantord appears to have an invalid email. :(

He can Contact Us to fix that, and get his account unlocked. (Note: He's not banned or a spammer.)

Anyway, the way I'm reading it, it's a 4x3 video that shows "postage stamped" on a 16x9 screen. It has black bars on both sides. That needs to be cropped at top/bottom, and the picture resized to 720x480 (720x576 PAL) and encoded to 16x9 DVD. I'd just have to see a sample.

jmac698 08-28-2015 10:12 PM

Windowboxing would mean pillar boxing and letterboxing. The concern is that zooming such a small video will look pretty blurry on a widescreen TV. To be useful, the solution should utilize a good upscaler. I haven't written that part yet.

lordsmurf 08-28-2015 10:32 PM

Upscale depends on source quality.
In some cases, upscaling won't matter, as quality will remain relatively unchanged. In some cases, it can even look worse.

It's the typical "post a sample" issue. Not all videos are the same.


All times are GMT -5. The time now is 11:32 PM

Site design, images and content © 2002-2026 The Digital FAQ, www.digitalFAQ.com
Forum Software by vBulletin · Copyright © 2026 Jelsoft Enterprises Ltd.