VideoHelp Forum
+ Reply to Thread
Page 7 of 7
FirstFirst ... 5 6 7
Results 181 to 206 of 206
Thread
  1. Member
    Join Date
    Jan 2008
    Location
    United States
    Search Comp PM
    Fulci,

    Thanks for the help. You've (indirectly) helped me in the past with your PAL->NTSC guide as well, thanks for that.
    I've attached a screenshot from the film, it is "Belle Du Jour" 720x480 (NTSC) / 4:3.
    Searching google reports a 1.66:1 aspect ratio. No standards conversion, I'm going NTSC->NTSC here.

    Like I said earlier, there are 42 pixels of black bar on top and 50 on the bottom, if that helps.

    I take it that once this is converted to 16:9 WS anamorphic, if played back on a 4:3 TV it will have the black bars on the sides that we are adding, and may be totally skewed. In that case, the original would be best to view on a 4:3 TV. This is different than a 16:9 WS Anamorphic DVD with AR 1.78 to 2.35, which displays properly on both TVs.

    Quote Quote  
  2. You could just add 120 line borders to the left and right, resize to 720x480, and encode 16:9. But that will give you both letterboxing and pillarboxing when watched on a 16:9 TV. I suppose what you really want to do though is remove the letterboxing, resize and add pillarboxing. I'll have to think about the math a bit...
    Quote Quote  
  3. Member FulciLives's Avatar
    Join Date
    May 2003
    Location
    Pittsburgh, PA in the USA
    Search Comp PM
    Originally Posted by zardano
    Fulci,

    Thanks for the help. You've (indirectly) helped me in the past with your PAL->NTSC guide as well, thanks for that.
    I've attached a screenshot from the film, it is "Belle Du Jour" 720x480 (NTSC) / 4:3.
    Searching google reports a 1.66:1 aspect ratio. No standards conversion, I'm going NTSC->NTSC here.

    Like I said earlier, there are 42 pixels of black bar on top and 50 on the bottom, if that helps.

    I take it that once this is converted to 16:9 WS anamorphic, if played back on a 4:3 TV it will have the black bars on the sides that we are adding, and may be totally skewed. In that case, the original would be best to view on a 4:3 TV. This is different than a 16:9 WS Anamorphic DVD with AR 1.78 to 2.35, which displays properly on both TVs.

    OK then ... I guess I didn't "pick up" on the fact that you already figured out that there are 42 pixels of black on top and 50 pixels of black on the bottom. I did double check with VirtualDubMod and I got the same thing so ... after you crop that out you end up with a 720x388 resolution.

    Using ITU spec resizing gives an aspect ratio of 1.69:1
    Using "regular" or "non-ITU" spec resizing gives an aspect ratio of 1.65:1

    I figured that much out using FitCD.

    So we know that we need to resize the height from 388 to a height of 480 but how to do the width ... FitCD does not help here unfortunately.

    Like jagabo I need to think about this some more ...

    - John "FulciLives" Coleman

    P.S.
    Here is a version of the image that has been cropped to a 720x388 resolution:

    "The eyes are the first thing that you have to destroy ... because they have seen too many bad things" - Lucio Fulci
    EXPLORE THE FILMS OF LUCIO FULCI - THE MAESTRO OF GORE
    Quote Quote  
  4. Member FulciLives's Avatar
    Join Date
    May 2003
    Location
    Pittsburgh, PA in the USA
    Search Comp PM
    Well I played around a bit more with FitCD and I think I got it.

    After you crop the original from 720x480 to 720x388 you would then resize to 656x480 and add 32 pixels of black on either side to make it a width of 720 pixels.

    So in terms of AviSynth you would do it like this:

    Code:
    Crop(42,0,-50,-0)
    LanczosResize(656,480)
    AddBorders(32,0,32,0)
    So we would end up with something like this:


    This is 720x480 but now 16x9 WS anamorphic



    This is the above image at 852x480 resolution for a proper aspect ratio

    The second image is how it would look on a 16x9 WS TV.

    I'd like jagabo to chime in with his thoughts though before you take what I said as "gospel"

    - John "FulciLives" Coleman

    P.S.
    Here is how I got to the above conclusion.

    Using FitCD I did the following:



    Now we know that 720x480 DVD is the same aspect ratio as 640x480 square pixel 1:1 ratio so that is why this works. You just have to remember that you are resizing from 720x388 instead of 640x388 ... it's the same as if you do the following:



    In this second FitCD image I went from 640x480 square pixel 1:1 to 16x9 WS anamorphic. Again the resulting numbers given here (528x480) are correct as long as you remember that you are resizing from 720x480 instead of 640x480 and again this works because 720x480 DVD is the same as 640x480 square pixel 1:1 aspect ratio.

    I hope that makes sense

    *** EDIT ***
    One more thing I need to mention. My AviSynth example is how you would resize IF you have a progressive source OR IF you have done an IVTC first in the script. If you have an interlaced source and you are leaving it that way then you need to do interlace safe resizing. Perhaps not the best way but one way of doing that is as follows:

    Code:
    Crop(42,0,-50,-0)
    SeparateFields()
    LanczosResize(656,240)
    Weave()
    AddBorders(32,0,32,0)
    "The eyes are the first thing that you have to destroy ... because they have seen too many bad things" - Lucio Fulci
    EXPLORE THE FILMS OF LUCIO FULCI - THE MAESTRO OF GORE
    Quote Quote  
  5. Member FulciLives's Avatar
    Join Date
    May 2003
    Location
    Pittsburgh, PA in the USA
    Search Comp PM
    It just dawned on me that a more proper image comparison would be the following:

    1.) This is the original 720x480 4:3 aspect ratio frame but resized to a 640x480 square pixel 1:1 aspect ratio
    Basically I just resized straight from 720x480 to 640x480




    2.) Below is my final image (as seen in the above post). This is the 720x480 16x9 WS anamorphic image but converted to a resolution of 852x480 for a proper square pixel 1:1 aspect ratio.




    Although these images are differently sized (one is 4:3 Full Screen and one is 16x9 WS anamorphic) they should both have the same dimensions or rather they should be "mirror" copies of each other. Just one is smaller than the other. In other words if you remove the black from each of the images and compare just the image part of each (sans the black) then they should both be a 100% match aspect ratio wise.

    In fact this can be proved by the math.

    If you take the first image and cut out the black you have 640x388 which is an aspect ratio of 1.65:1 aka 640/388 = 1.65

    If you take the second image and cut out the black you have 774x480 which is an aspect ratio of 1.60:1 aka 774/480 = 1.60

    Oops ... looks like the aspect ratio is off by 0.05 but that is a very small aspect ratio error ... not enough for the human eye to pick up at all and such small errors are to be expected when doing such conversions.

    - John "FulciLives" Coleman
    "The eyes are the first thing that you have to destroy ... because they have seen too many bad things" - Lucio Fulci
    EXPLORE THE FILMS OF LUCIO FULCI - THE MAESTRO OF GORE
    Quote Quote  
  6. Originally Posted by FulciLives
    Oops ... looks like the aspect ratio is off by 0.05 but that is a very small aspect ratio error ... not enough for the human eye to pick up at all and such small errors are to be expected when doing such conversions.
    I think the small difference is due to the fact the the 4:3 or 16:9 image in DVD frames are contained in 704x480 sub portion of the frame. In any case, I agree it isn't worth worrying about.

    Another way to look at the scaling is to look at the ratio of the 1.66 source to the 1.778 DVD. If a 1.778 image should fill the full 704 pixel width then a 1.66 movie should only fill a 1.66/1.778 portion of the width. 704 * 1.66 / 1.778 = ~656. Then add 32 pixels at each edge to make a the full 720.
    Quote Quote  
  7. Originally Posted by FulciLives
    Originally Posted by holeepassion
    thanks Fulcilives ... now NTSC DVDs be played on PAL system ?D
    or do I need to create both ? what is the common practice ?
    For example: people making DVDs cater for PAL countries versus NTSC countries ... do they produce two separate DVDs ? How about for computer playing ? Is that different again ???

    Thanks

    Happy New Year by the way !!!

    PS: been checking out VirtualDubMod, is it worth it compared to just VirtualDub ??? since the release on VirtualDub is more current ?
    NTSC countries do not favor PAL at all ... in short you can expect a NTSC country to only be able to play back NTSC and not PAL ... that is how most equipment is in a NTSC country.

    PAL countries are a bit more favorable to NTSC and from what I have read most PAL DVD players and televisions will have no issues playing back a NTSC DVD.

    A computer can just as easily play back NTSC and PAL so no such issues exist on a computer as to which format the DVD is in.

    If you want to make a DVD that you intend to sell to both PAL and NTSC countries then it makes the most sense to make two releases ... one in NTSC and one in PAL.

    Originally Posted by holeepassion
    OH .... I am a bit confused with the resizing bit still I think .. if I add the 8 pixels on either side ... would it be displayed on TV set ? It looks kinda ugly isn't it as compared to the top and bottom style ???? If I let the software system resize, would they degrade the resolution much ???

    The frame per second is 30, so I guess NTSC is the more correct system then ???

    Thanks again ...
    Most televisions have TV OVERSCAN which means the image is slightly "blown up" so that the extreme edges (top, bottom, left, right) are masked i.e., outside the visible range of the TV. So in short very few televisions will show those 8 pixels of black. You can just go ahead and go straight from 640 to 720 but technically this will produce an aspect ratio error ... however the error is so little that it is not noticeable by the naked eye.

    If that AVI is 30 fps (I'm assuming it is 29.970fps) then you are better off making a NTSC DVD from it.

    - John "FulciLives" Coleman
    Thanks very much for your responses. I have further questions. Now, is it better to use 704 versus 720 ? That means that I have to add the pillars of 12 versus 20 is that correct ? (I think I have been confused with using of figures, hence 8 pixels error). I think it is wiser to use the smaller pillar pixels ... however how about the resolution of the DVD ????

    Not sure if you are familiar with combining pictures at all, the following are my other issues:


    I have the same issue in relation to including still pictures in DVD production.

    Here are what I want to to do. I want to mix my avi video in 640 x 480 aspect ratio with pictures quality in 2816 x 2112 (aspect ratio of 1.333:1). Do I need to reduce the pixel dimensions to 640 x 480 ? Doesn't it change the resolution of the picture ? I really want the highest quality picture in the DVD ? If there is a way to change without losing the resolution, how in Photoshop 7 ?


    I have done some processing in Wax, when I set up the output as 720 x 480, the picture has less black pixels on the right and left sides of the images than the avi images. Would changing the resolution of still images to 640 x 480 to make it looking consistent ???

    I want to make a DVD in NTSC format, with wide angle 16:9 aspect ratio. I heard something about 16:9 aspect enhanced ? How do I go about this ? I also wonder in another forum thread, there is no wide angle resizing aspect for the wide angle format, and need to use the 4:3 format, why is that ??? Is it still possible to make the wide angle though with the source aspect being 640 x 480.

    Now, according to what I have read, I have to resize the aspect to 720 x 480 (or ideally 704 width), which means that I have to add 20 pixels either side, versus 12. With the emergence of wide angle TVs, I think it is the best format. I know however that most 4:3 format has the wide angle facility also nowadays. If I create in wide angle format, and someone with TV of 4:3 format views it, I would expect them to see bars on the bottom and top of the screen. Is that correct ? What would happen I wonder if they change it to wide angle ? Are they the same as the wide angle TVs ???

    Thanks in advance !!!
    Quote Quote  
  8. Member FulciLives's Avatar
    Join Date
    May 2003
    Location
    Pittsburgh, PA in the USA
    Search Comp PM
    @holeepassion

    You got a lot of issues going on here ... more than just simple resizing issues.

    I suggest you create your own thread about this. Feel free to come back here and post a link to it when you do so.

    I think to answer all of your questions would be to get totally off track from the intentions of this thread.

    - John "FulciLives" Coleman
    "The eyes are the first thing that you have to destroy ... because they have seen too many bad things" - Lucio Fulci
    EXPLORE THE FILMS OF LUCIO FULCI - THE MAESTRO OF GORE
    Quote Quote  
  9. Member DJRumpy's Avatar
    Join Date
    Sep 2002
    Location
    Dallas, Texas
    Search Comp PM
    This is odd. I didn't receive any notices that responses had been posted in this thread. Thanks for handling these Fulci.
    Impossible to see the future is. The Dark Side clouds everything...
    Quote Quote  
  10. Member
    Join Date
    Jan 2008
    Location
    United States
    Search Comp PM
    FulciLives and Jagabo,

    Thanks for the help with the math, all of that makes sense. I agree that the slight aspect ratio error introduced from the resizing is inconsequential and expected. I'm used to seeing that much error or more when converting to XviD.

    Fulci - Just wanted to note that you had your values flipped in the Crop() command, the syntax is Crop(X1,Y1,-X2,-Y2)
    So my script was:
    Code:
    Crop(0,42,0,-50)
    LanczosResize(656,480)
    AddBorders(32,0,32,0)
    ...Because we are cropping the letterboxing (y-values) and adding pillarboxing (x-values). You might want to edit your post to reflect that change to avoid confusing future readers.

    I had played around with FitCD in the past, but I never really understood what it was telling me, or what values to enter. Now I see that you enter the square pixel 1:1 aspect ratio of your source material, and the destination as a 720x480 DVD (for NTSC of course). I should be able to tackle any 4:3-LBX->16:9 WS Anamorphic conversion now.

    Much obliged,
    -Z

    EDIT: I just played back the conversion, both on a 16:9 TV and an old 4:3. The picture filled the 16:9 TV from top to bottom, which was the goal. What surprised me, though, was that there was no pillarboxing on the 4:3 TV. The DVD player must remove it and scale the image up to fill the horizontal space. I tested on two different players and they both did this.
    Quote Quote  
  11. Originally Posted by zardano
    What surprised me, though, was that there was no pillarboxing on the 4:3 TV. The DVD player must remove it and scale the image up to fill the horizontal space. I tested on two different players and they both did this.
    No, I think the small pillarboxes were hidden by overscan.
    Quote Quote  
  12. Member DJRumpy's Avatar
    Join Date
    Sep 2002
    Location
    Dallas, Texas
    Search Comp PM
    It could be either actually. Usually a TV's overscan is in the 4% to 6% range. 32 pixels is rather a large amount for overscan on each side although possible I suppose.

    You can also set some DVD players to 'Pan & Scan' letterboxed material. It may be zooming the image to remove the pillarboxing.
    Impossible to see the future is. The Dark Side clouds everything...
    Quote Quote  
  13. Originally Posted by zardano
    Now I see that you enter the square pixel 1:1 aspect ratio of your source material, and the destination as a 720x480 DVD (for NTSC of course). I should be able to tackle any 4:3-LBX->16:9 WS Anamorphic conversion now.
    That's sure not how I'd do it. I'd get a resolution with the black removed, but still use DVD 4:3 with a 720 width. The net effect is pretty much the same, though:



    But you only have to do it weird like that because you have the unusual 1.66:1 AR (black on top and bottom with the 4:3 DVD and on the left and right on the 16:9 DVD). Ordinarily you'd just use 720x480 4:3 DVD 720 on the left and DVD 720 on the right with the anamorphic box checked. It just cuts 60 rows of pixels from both the top and bottom.
    Quote Quote  
  14. Member FulciLives's Avatar
    Join Date
    May 2003
    Location
    Pittsburgh, PA in the USA
    Search Comp PM
    Originally Posted by manono
    Originally Posted by zardano
    Now I see that you enter the square pixel 1:1 aspect ratio of your source material, and the destination as a 720x480 DVD (for NTSC of course). I should be able to tackle any 4:3-LBX->16:9 WS Anamorphic conversion now.
    That's sure not how I'd do it. I'd get a resolution with the black removed, but still use DVD 4:3 with a 720 width. The net effect is pretty much the same, though:



    But you only have to do it weird like that because you have the unusual 1.66:1 AR (black on top and bottom with the 4:3 DVD and on the left and right on the 16:9 DVD). Ordinarily you'd just use 720x480 4:3 DVD 720 on the left and DVD 720 on the right with the anamorphic box checked. It just cuts 60 rows of pixels from both the top and bottom.
    I tried to do it like that but recall that I couldn't get it to do what you just showed in the image ... I was multitasking that day perhaps that was the issue LOL

    Anyway the way I did it got the same result really ... and I only did it that way because of the "odd" 1.66:1 aspect ratio ... hmmm maybe it didn't work for me because I had cropping set to NONE ... *shrugs*

    You just had to put your two cents in didn't you manono :P

    - John "FulciLives" Coleman
    "The eyes are the first thing that you have to destroy ... because they have seen too many bad things" - Lucio Fulci
    EXPLORE THE FILMS OF LUCIO FULCI - THE MAESTRO OF GORE
    Quote Quote  
  15. As I said, the result was the same and what you did was fine for the rare 1.66:1 ratio movie. But zardano says he's going to use that method for all 4:3 to 16:9 DVD conversions. That's going to entail a whole lot of extra work, with the very real chance of getting it wrong as he's going to try and get a proper 1:1 resolution (640x352, 640x272, etc.) before then converting to 16:9. Why bother with the extra step?
    Quote Quote  
  16. Member FulciLives's Avatar
    Join Date
    May 2003
    Location
    Pittsburgh, PA in the USA
    Search Comp PM
    Originally Posted by manono
    As I said, the result was the same and what you did was fine for the rare 1.66:1 ratio movie. But zardano says he's going to use that method for all 4:3 to 16:9 DVD conversions. That's going to entail a whole lot of extra work, with the very real chance of getting it wrong as he's going to try and get a proper 1:1 resolution (640x352, 640x272, etc.) before then converting to 16:9. Why bother with the extra step?
    Right.

    - John "FulciLives" Coleman
    "The eyes are the first thing that you have to destroy ... because they have seen too many bad things" - Lucio Fulci
    EXPLORE THE FILMS OF LUCIO FULCI - THE MAESTRO OF GORE
    Quote Quote  
  17. Member
    Join Date
    Jan 2008
    Location
    United States
    Search Comp PM
    Didn't mean to start an argument here...
    I actually tried manono's values with FitCD and it worked fine, so that is definitely easier and less confusing. I guess I incorrectly inferred the 1:1 method from Fulci's examples.
    I've never even had to bother with FitCD in the past; every conversion I have encountered up until this was in the range of 1.78 to 2.35 and was covered by DJRumpy's original post and tables.
    Anyway, thank you all for responding, I've learned a lot from this one little 1.66:1 conversion project.
    Quote Quote  
  18. Member
    Join Date
    Jun 2008
    Location
    United States
    Search Comp PM
    hI! sure culd use a lil help. 10 KB avatars? ur kidding right? n e way im just trying to prevent overscan, its not so bad on my smaller tv, but on my friends larger big screen(though not hd) tv, its a bigger problem.

    let me explain. i download anime from Narutofan.com in AVI format. i use Prism Video Converter to put them in MPEG. then i use windows movie maker and dvd maker to burn them. now there are a couple of shows that have recently switced to widescreen, which makes things even more difficult for me.

    the only problem is this "overscan" i read your very extensive guide to aspect ratios and i must say it really confuses me.

    call me a dunce, whatever, im just starting to get into this, I consider myself very technologically literate but when it comes to dvd making im still at a loss as a beginner. please help and thanks for reading.
    Quote Quote  
  19. Member DJRumpy's Avatar
    Join Date
    Sep 2002
    Location
    Dallas, Texas
    Search Comp PM
    Perhaps it would help if you actually listed a question? If you don't like overscan, you can shrink the image by 3-4 % on the vertical and horizontal. That said, it's highly unlikely that your problem is overscan. You lose a very small part of the image to it. If your friends TV is that noticeable, then it's probably in need of adjustment.
    Impossible to see the future is. The Dark Side clouds everything...
    Quote Quote  
  20. Member FulciLives's Avatar
    Join Date
    May 2003
    Location
    Pittsburgh, PA in the USA
    Search Comp PM
    Use FitCD and set the BLOCKS OVERSCAN to either 2 or 3 with 3 being the highest amount of overscan compensation.

    My opinion ... in most cases 2 may not completely eliminate overscan but it does very much minimize it. If you use 3 then there is a very large chance of seeing the entire image with black all around it. I find that annoying. If you use the 2 setting then chances are the extreme edge of the image may still not be seen but trust me it will be extremely minimal and make a big difference compared to no overscan compensation at all.

    - John "FulciLives" Coleman
    "The eyes are the first thing that you have to destroy ... because they have seen too many bad things" - Lucio Fulci
    EXPLORE THE FILMS OF LUCIO FULCI - THE MAESTRO OF GORE
    Quote Quote  
  21. Member
    Join Date
    Dec 2009
    Location
    Australia
    Search Comp PM
    can anyone explain to me in plain english what to do to get a correct aspect ratio for avi file, Ive got a Avi file that i wanna hard encode subs to, the avi has letterbox ontop and below, the file info is below

    Format : AVI
    Format/Info : Audio Video Interleave
    File size : 700 MiB
    Duration : 2h 3mn
    Overall bit rate : 795 Kbps

    Video
    ID : 0
    Format : MPEG-4 Visual
    Format profile : Advanced Simple@L5
    Format settings, BVOP : Yes
    Format settings, QPel : No
    Format settings, GMC : No warppoints
    Format settings, Matrix : Custom
    Muxing mode : Packed bitstream
    Codec ID : XVID
    Codec ID/Hint : XviD
    Duration : 2h 3mn
    Bit rate : 689 Kbps
    Width : 704 pixels
    Height : 288 pixels
    Display aspect ratio : 2.40:1
    Frame rate : 23.976 fps
    Resolution : 8 bits
    Colorimetry : 4:2:0
    Scan type : Progressive
    Bits/(Pixel*Frame) : 0.142
    Stream size : 607 MiB (87%)
    Writing library : XviD 1.0.0 RC4 (Hola) (UTC 2004-04-05)

    I used auto gordian knot to add the subs, however the file comes out slight vertically streched, I dont know what to do to get it right, the log from auto gk is

    [27/12/2009 5:47:17 PM] AutoGK 2.55
    [27/12/2009 5:47:17 PM] OS: WinXP (5.1.2600).2
    [27/12/2009 5:47:17 PM] Job started.
    [27/12/2009 5:47:17 PM] Input file: C:\Documents and Settings\Administrator\Desktop\Windstruck\Windstru ck.2004.DVDRip.XviD.AC3.2CH.avi
    [27/12/2009 5:47:17 PM] Input codec: XviD
    [27/12/2009 5:47:17 PM] Source duration: 2h 3mn 10s 891ms
    [27/12/2009 5:47:17 PM] Output file: C:\Documents and Settings\Administrator\Desktop\Windstruck.2004.DVD Rip.XviD.AC3.2CH_agk2.avi
    [27/12/2009 5:47:17 PM] Output codec: XviD
    [27/12/2009 5:47:17 PM] Audio 1: 96 Kbps AC3 2ch
    [27/12/2009 5:47:17 PM] Subtitles: from external file: C:\Documents and Settings\Administrator\Desktop\Windstruck\Windstru ck.2004.DVDRip.XviD.AC3.2CH.srt
    [27/12/2009 5:47:17 PM] Format: AVI
    [27/12/2009 5:47:17 PM] Target quality: 100%
    [27/12/2009 5:47:17 PM] Audio 1 settings: Auto
    [27/12/2009 5:47:17 PM] Started encoding.
    [27/12/2009 5:47:17 PM] Source resolution: 704x288
    [27/12/2009 5:47:17 PM] Source fps: 23.976
    [27/12/2009 5:47:17 PM] Output will contain 177204 frames
    [27/12/2009 5:47:17 PM] Demuxing audio.
    [27/12/2009 5:48:22 PM] Preparing subtitles.
    [27/12/2009 5:48:22 PM] Using VAQ in XviD
    [27/12/2009 5:48:22 PM] Running single pass encoding.
    [27/12/2009 5:48:22 PM] Writing the following script to C:\Documents and Settings\Administrator\Desktop\agk_tmp\Windstruck. 2004.DVDRip.XviD.AC3.2CH_agk2_movie.avs
    ================================================== =========
    LoadPlugin("C:\PROGRA~1\AutoGK\DGMPGDec\DGDecode.dll")
    LoadPlugin("C:\PROGRA~1\AutoGK\filters\autocrop.dll")
    LoadPlugin("C:\PROGRA~1\AutoGK\filters\vsfilter.dll")
    LoadPlugin("C:\PROGRA~1\AutoGK\filters\RemoveGrainSSE2.dll")

    movie = DirectShowSource("C:\Documents and Settings\Administrator\Desktop\Windstruck\Windstru ck.2004.DVDRip.XviD.AC3.2CH.avi",23.976).KillAudio()
    movie = isRGB(movie) ? ConvertToYV12(movie) : movie
    movie = isYUY2(movie) ? ConvertToYV12(movie) : movie
    cropclip = autocrop(movie,mode=0,wmultof=4,hmultof=4,samples= 10,aspect=0,threshold=0,samplestartframe=0,leftadd =0,rightadd=0,topadd=0,bottomadd=0)
    fixed_aspect = 1
    c_width = width(cropclip)
    c_height = round(height(cropclip) / fixed_aspect)
    input_par = float(c_width)/float(c_height)
    out_width = 704
    out_height = round(float(out_width) / input_par)
    hmod = out_height - (floor(out_height / 16 ) * 16)
    out_height = (hmod > 4) ? (out_height + (16 - hmod)) : (out_height - hmod)
    new_aspect = (float(out_width) / float(out_height)) / fixed_aspect
    autocrop(movie,mode=0,wmultof=4,hmultof=4,samples= 10,aspect=new_aspect,threshold=0,samplestartframe= 0,leftadd=0,rightadd=0,topadd=0,bottomadd=0)
    LanczosResize(out_width,out_height)
    TextSub("C:\Documents and Settings\Administrator\Desktop\Windstruck\Windstru ck.2004.DVDRip.XviD.AC3.2CH.srt")
    ================================================== =========
    [27/12/2009 8:15:55 PM] Duration was: 2 hours 27 minutes 32 seconds
    [27/12/2009 8:15:55 PM] Speed was: 20.02 fps.
    [27/12/2009 8:15:55 PM] Job finished. Total time: 2 hours 28 minutes 37 seconds

    new file info is

    Format : AVI
    Format/Info : Audio Video Interleave
    File size : 1.03 GiB
    Duration : 2h 3mn
    Overall bit rate : 1 194 Kbps
    Writing application : VirtualDubMod 1.5.4.1 (build 2178/release)
    Writing library : VirtualDubMod build 2178/release

    Video
    ID : 0
    Format : MPEG-4 Visual
    Format profile : Advanced Simple@L5
    Format settings, BVOP : Yes
    Format settings, QPel : No
    Format settings, GMC : No warppoints
    Format settings, Matrix : Custom
    Codec ID : XVID
    Codec ID/Hint : XviD
    Duration : 2h 3mn
    Bit rate : 1 091 Kbps
    Width : 704 pixels
    Height : 288 pixels
    Display aspect ratio : 2.40:1
    Frame rate : 23.976 fps
    Resolution : 8 bits
    Colorimetry : 4:2:0
    Scan type : Progressive
    Bits/(Pixel*Frame) : 0.224
    Stream size : 961 MiB (91%)
    Writing library : XviD 1.2.1 (UTC 2008-12-04)

    the avi starts as 704/288 and ends up the same, but the letterboxing is gone and the video is slightly vertically streched, pls pls pls help me if anyone knows what to do
    Quote Quote  
  22. Member
    Join Date
    Feb 2005
    Location
    Bollywood
    Search Comp PM
    Since you are hardcoding the subs that means you will be re-encodiong the video so you should just use your eyes to adjust the height. Leave the video width to 704 and lessen the height by 16 and have a look if it doesn't look stretched anymore. If it still looks stretched then take away another 16 pixels from the height.

    It's best to stick to widths and heights divisible by 16 for compressibility.

    If adjusting by 16 makes the picture look too squashed or too stretched either way then you may have to do a lil bit of cropping before resizing to mod16 until the picture looks correct.
    Quote Quote  
  23. Member
    Join Date
    Dec 2008
    Location
    Europe, Far, Far Away
    Search Comp PM
    Hi everybody and a Happy New Year!

    I hope this is not thread hijacking, I'm simply to shy too open a new thread
    I have some simple (I assume) questions regarding resizing. I've read every information source I found, but still I would need some opinions on this.
    In short, some time ago I thought that if I crop my PAL dvd picture (SAR 5:4, DAR 4:3, PAR ~16:15) to mod16 dimensions I can encode to these dimensions (SAR) without needing to resize. But then, after completely understanding the SAR, PAR and DAR meanings, I realized this is wrong if the result has a 1:1 PAR (and it seems you can only encode to 1:1 PAR?). So, if the source has nonsquare pixels and you are encoding to square pixels, resizing is compulsory - RIGHT? (could you please confirm?)
    Previously, I was cropping 720x576 to 688x560 (mod16, see? ) then encoding to exactly this SAR (it's 1,229, ~11:9). Resulting PAR was 1:1 and DAR was also 1,229. That was wrong because was distorted - RIGHT? (see below)
    If I would have used FitCD I would have known that the "real aspect ratio" of my crop is 1,229 x 16:15 = ~ 1,31, so encoding to a DAR of 1,229 slightly distors the image - RIGHT?

    So, the correct way is to crop to mod4 for width and to mod2 for height, trying to keep a ~1,25 SAR then resize (because anyway you have to resize, in order to have PAR 1:1 - right?)

    Now I have two ways of doing this:
    1. crop L,R,T,B 20, 12, 12, 10 to 688 x 554 (SAR~1,24. "real aspect" = SAR x PAR = 1,24 x 1,067 =~1,325) and resize to 720x544 (PAR 1:1. SAR=DAR=1,3235).

    2. crop L,R,T,B 18,10,12,10 to 692 x 554 "real aspect" 1,3324 (the term belongs to FitCD) and resize to 704 x 528 wich is exactly 1,3333.
    In order to keep mod16 i cant resize to 720 x 540 because 540 is not a multiple of 16.

    If i leave 704 x 528, the standalone player will do the resize. Wouldn't be better to perform the resize to 720x540 during encoding? (even if this leads to a less compression, the height being only mod4) According to FitCD, mod4 is only "MXX-optimized" insead of macroblock- or at least block-optimized.

    The strange thing is that even if you do all the math correctly, undertand SAR, PAR and DAR and/or use FitCD, you still cant get perfect ratio of 4:3 (ok this is also because of not being able to crop to the correct ratio in the first place without cutting too much out).
    If i want an almost-perfect ratio I noticed I can cut to 688x550 whith "real aspect ratio" 1,3343 and then resize to 720x540, ignoring the mod16 thing. -would this be better?

    Ok one last (really) question. What if I ignore the bars and keep all the origninal pixels? I have about 4px top and bottom, about 10 on left and 8 on right. I could keep the borders or replace them with solid black (maybe also using -lumimasking / AQ to increase compression of black areas) and resize 720x576 to one of these:
    720x540 (only mod4 but perfect 1,33)
    720x536 (1,343, xvid4psp insists on proposing this but it's only mod8)
    704x528 (closest mod16 height available, DAR is also 1,3333)
    Woud keeping the black bars be better, and which of the above resolution would you recommend in case I would decide to keep the borders - or maybe I don't have borders at all, then I would want to keep as much as possible from my video - which resolution from the three above would you recommend?

    Sorry for the long post and thanks in advance for any reply.


    Later edit: thats a bummer! Xvid4psp don't even offer 720x540 (but only the slightly distorted 720x536)! is this 540 that bad?
    then 704x528 would be better ? (for perfect 4:3, but then a possibly lower-quality resize to 720p takes place during play?) or 720x536?
    plase don't tell me 640x480 - no way i am cutting so much!

    later and last edit: i noticed 536 is not mod 16 so maybe 720x544 would be better if we accept a slight distortioon? (I mean when no cropping thakes place)?
    Quote Quote  
  24. Originally Posted by rebl
    if I crop my PAL dvd picture (SAR 5:4, DAR 4:3, PAR ~16:15) to mod16 dimensions I can encode to these dimensions (SAR) without needing to resize. But then, after completely understanding the SAR, PAR and DAR meanings, I realized this is wrong if the result has a 1:1 PAR
    You are correct, if you encode that as square pixel the image will be distorted when displayed.

    Originally Posted by rebl
    (and it seems you can only encode to 1:1 PAR?).
    If you're talking about Xvid or Divx, no, you can specify the PAR or DAR. The problem is that not all player will respect those settings.

    Originally Posted by rebl
    So, if the source has nonsquare pixels and you are encoding to square pixels, resizing is compulsory - RIGHT? (could you please confirm?)
    Yes.

    I would avoid mod2 frame sizes. Some decoders will choke on that. Don't go less than mod4. If you want to maximize encoding efficiency use mod8 or mod16. Xvid/Divx/MPEG2 codecs chop the frame into 16x16 pixel blocks then perform motion vector analysis and DCT compression on 8x8 blocks. Hence the better efficiency with mod8 and mod16.

    Perfect (noiseless) black (or any color) borders compress very well, especially if they are mod8 or mod16 in size. Efficiency is reduced a bit if they are not mod8 or mod16. So a 64 pixel high black border at the top of the frame will compress very well. A 60 pixel border at the top of the frame won't compress quite as well. Another problem with black borders comes with filtering. Some filters will generate artifacts at the borders. For example, sharpening filters will create halos at the border. And keep in mind, many resizing filters include sharpening (Bicubic, Lanczos3, etc). DCT ringing will also be visible if the black border falls within an 8x8 block.
    Quote Quote  
  25. Member
    Join Date
    Dec 2008
    Location
    Europe, Far, Far Away
    Search Comp PM
    mod2 and mod4 are the dimensions for cropping, recommended by FitCD, but before resizing. then the video should be resized to mod16 and encoded (according to FitCD)

    my borders are all under 16pixels : 18 to the left, 4 top and bottom and 10 to the right

    i think the cropping should be ideally done in two stages - first removing the black borders (there is no sense in applying the prprocessing filters to the whole frame include black borders, right?) then, after aplying the filters the second cropping cold take place - in order to optain the desired aspect ratio, then the resizing (if any) to mod16, then the encoding - does this make sense?

    anyway, now i am also having troubles because I don't know if my dvd's DAR is 4:3 or "ITU 4:3"
    in the first case the PAR wolud be 1,067
    in the second case the PAR would be 1,094 - that is more than 2,5% different
    all the calculations are different dependeng on the source PAR.
    that a real bummer because I don't have any ideea how can I tell whici is the correct PAR of the DVD (whether it complies or not with ITU-R BT.601-4)

    i already have a big headake and i think i was feeling better before wanting to obtain the perfect DAR in my xvid
    *Blessed are the poor in spirit*
    Quote Quote  
  26. Member
    Join Date
    Feb 2005
    Location
    United States
    Search PM
    Is there a decent tool out there that will show the actual video frame size once the letter/pillar boxing is removed? IE VirtualDub on PC but what to use on OSX?
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!