VideoHelp Forum




+ Reply to Thread
Results 1 to 21 of 21
  1. Member
    Join Date
    Jun 2006
    Location
    Canada
    Search Comp PM
    Hi,

    I am trying to creat a script to resize a movie prior to converting it to NTSC but the format is completely new to me and it looks like I am lost.

    The image is PAL DVD 720 x 576 (PAL 620x50) (4:3) (not specifeid perm. display).

    With VDM I've found the top black is 80; the bottom - 88. The left black is 18; the right - 12.

    Based on that, I've created the following:

    LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\DGDecode.dll")
    LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\Decomb521.dll")
    LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\MaskTools.dll")
    LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\MT_MaskTools.dll")
    LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\RemoveGrain.dll")
    MPEG2Source("E:\Movies\The Year of Dragon\Dragon-Test.d2v")
    RemoveGrain(mode=1)
    AssumeTFF()
    Telecide(order=1)
    LanczosResize(720,480)
    Crop(18,80,-12,-88)
    AddBorders(8,84,8,84)
    dull=last
    Sharp=LimitedSharpenFaster(ss_x=1.25,ss_y=1.25,Smo de=4,strength=150,soft=30)
    Soothe(sharp,dull,25)

    Once I try to check it in VDM, I get an error message and cannot open the file. It looks like something is wrong in the script. Please help.

    Thank you!
    Quote Quote  
  2. You left out something. What's the error message? Maybe you're using the latest Decomb and you no longer need to set the order in Telecide?

    And I don't think I'd RemoveGrain while it's still interlaced.
    Quote Quote  
  3. Member
    Join Date
    Jun 2006
    Location
    Canada
    Search Comp PM
    It's bizarre.

    I tried at least 4 times and could not open it in VDM. After that I tried to open it Procoder preview and it played OK.

    Now I tried it again in VDM to make a screenshopt of the error message and I opened it.

    The strange thing: the image at the beginning consists of small cubes or squares and impossible to see the picture. Once I move the slider it returns to normal.

    Do you mean I should remove RemoveGrain? But I was advised that those were shifted fields not interlacing?

    Thank you, manono.
    Quote Quote  
  4. Is this a cut video? You often get those green blocks at the beginning or end of videos if they've been cut from something larger. In any event, you can remove them by using AviSynth's FreezeFrame command to replace them with the next good frame, or with some black from elsewhere in the video:

    http://www.avisynth.org.ru/docs/english/

    I was suggesting that if you want to use RemoveGrain, that you use it farther down in the script, after the video has been made progressive again. The source for the DVD is progressive, but your video is interlaced. You can see the interlacing, can't you? I could after I downloaded it. Telecide is making it progressive again by lining up the fields properly.

    Oh, when you open scripts in VDubMod, and change them and reopen them again, and so on and so forth, after awhile VDubMod is just liable to throw up its hands and give up with some message like "AviSynth Open Failure", or just crash. In such cases, close out VDubMod and reopen it and try again.
    Quote Quote  
  5. Member
    Join Date
    Jun 2006
    Location
    Canada
    Search Comp PM
    Thank you, manono. Since you did not say anything about the script (I mean the resizing part) I assume it is correct.

    Wow, a month ago I would say that I could never create something like this -)
    Quote Quote  
  6. Member
    Join Date
    Jun 2006
    Location
    Canada
    Search Comp PM
    Hi,

    I again cannot opent the same file with the script. This time I cannot open it in Pocoder preview too.

    I closed and opened again both VDM abd Procoder and finally rebooted my PC. Nothing helps.

    The error message I get every time is:



    I tried the script without the lines:
    Crop(18,80,-12,-88)
    AddBorders(8,84,8,84)

    and it works? What's wrong here? I was able to open it 10 minutes earlier.

    Thank you!
    Quote Quote  
  7. Always Watching guns1inger's Avatar
    Join Date
    Apr 2004
    Location
    Miskatonic U
    Search Comp PM
    I suspect it is with your cropping and borders. The error message tells you exactly what is wrong - after your manipulation, you do not have multiples of 4 for your resolution. Look at the crop and addborder statements. Subtract the border from the crop in order, and every number should also be a multiple of 4. Yours are not. In order you get 10, 4, 4, 4. What's wrong with this picture ?
    Read my blog here.
    Quote Quote  
  8. Since you did not say anything about the script (I mean the resizing part) I assume it is correct.

    I never even checked the Crop/Resize/AddBorders. Sorry for letting you down. :)

    guns1inger spotted it, where I hadn't checked before. So, you resized to 720x480 first? Then you're cropping and adding borders to bring it back to 720x480? I don't understand exactly why you're doing this, but if you have your final resolution (720x480) and then you crop away the black, intending to apply fresh black, as FulciLives advises, what you add back has to total the same as what you cropped away. You cropped away 30 pixels of width (18 +12), and added back only 16 pixels (8 + 8). You did the height correctly, so maybe you just made a typo with the width.
    Quote Quote  
  9. Member
    Join Date
    Jun 2006
    Location
    Canada
    Search Comp PM
    Guys,

    Thank you! Sorry that I could not wait for your reply. By midnight, I was already half dead....

    After reading your advice, I've made the following changes in the resizing part of the script:

    Crop(20,80,-12,-88) It was 18 in the previous version.
    AddBorders(8,84,8,84)

    After that everything worked just fine.

    I would appreciate your advice though. For me, the question is more of educational value.

    I've made the hight of the "new" black (84/84) based on what the "old" black was. Is it a must so that the "new" black should be the same size as the "old" black? If positive, why?

    I tried the height of 64/64 and it worked but it looks like the picture shows some flaws that are not seen when the height is the same as the original and it is not that sharp. Is it just my impression or it is correct?

    Thank you!
    Quote Quote  
  10. Always Watching guns1inger's Avatar
    Join Date
    Apr 2004
    Location
    Miskatonic U
    Search Comp PM
    I don't actually understand what you are doing. There is no reason to crop and change the bars if you are resizing for NTSC, as the bars and image will both resize relatively if the image is left whole. You seem to go to great lengths to make a relatively simple task several times more difficult than it needs to be.
    Read my blog here.
    Quote Quote  
  11. I'd check the resolution if I were you (File->File Information, in VDub(Mod)), to make sure it's whatever it's supposed to be. I'm lost, too.
    Quote Quote  
  12. Member
    Join Date
    Jun 2006
    Location
    Canada
    Search Comp PM
    Hi,

    guns1inger, do I understand right that you mean that I only have to do resizing without cropping and adding borders?

    I am confused about the cropping and the borders. When do we need to do cropping and adding borders?

    manono, I tried to check the resolution of the test-file after conversion (PAL > 720x480 25 fps > pulldown) but VDM crashes every time I click File Information. I used GSpot and it shows 720x480. I also tried AVICodec and it shows 720x480 (4:3).

    Thanks!
    Quote Quote  
  13. Always Watching guns1inger's Avatar
    Join Date
    Apr 2004
    Location
    Miskatonic U
    Search Comp PM
    Borders need to be added when you are encoding an avi that has already had them removed, to a DVD that is less that 1.78:1 in Aspect Ratio. FitCD (or Fit2Disc) will take care of the numbers for you in that instance, as it will here. You are simply converting a 720 x 576 PAL image to a 720 x 480 NTSC image.
    Read my blog here.
    Quote Quote  
  14. Member
    Join Date
    Jun 2006
    Location
    Canada
    Search Comp PM
    So, the line:

    LanczosResize(720,480,0,0,720,576) and that's it?

    I understood John (FulcilIves) that I am supposed to replace the old black with the new one and add borders when resizing DVD as he was explaining me about PAL DVD to NTSC DVD.

    I am completely lost.... So, what would be the right way to resize before converting PAL DVD to NTSC DVD: with or without?

    Thank you!
    Quote Quote  
  15. Always Watching guns1inger's Avatar
    Join Date
    Apr 2004
    Location
    Miskatonic U
    Search Comp PM
    If you must remove the black bars (and I am not yet convinced it is necessary, but perhaps John will drop by and give a reason), crop 72 from the top and 72 from the bottom of the PAL frame, resize what's left to 360 lines, and add back 60 lines of black to the top and 60 to the bottom.
    Read my blog here.
    Quote Quote  
  16. Member
    Join Date
    Jun 2006
    Location
    Canada
    Search Comp PM
    guns1inger, thanks.

    I am still lost. I do remember John also advised that for 4:3 I must remove 72 from top/bottom. But if the black top/bottom is 80/88, why should I remove only 72 but not all of it?

    Why should I add only 60 instead of 72?

    Sorry if I am annoying. I can sure just "do it" but I am trying to understand it, which will let me not to ask the same questions again and again.

    Thank you!
    Quote Quote  
  17. Always Watching guns1inger's Avatar
    Join Date
    Apr 2004
    Location
    Miskatonic U
    Search Comp PM
    Although not directly addressing your issue, this is good reading to understand the numbers being discussed -> https://forum.videohelp.com/viewtopic.php?t=300597

    The reason we take 72 and add back only 60 is because you are going from PAL to NTSC. You take 72 +72 from the PAL frame, and add back 60 + 60 to get an NTSC frame size.

    However, generally you only need to crop if you are going from 4:3 letterboxed to 16:9 anamorphic. As you are doing straight frame conversion, I still do not understand why you would want to do any cropping at all.
    Read my blog here.
    Quote Quote  
  18. Member FulciLives's Avatar
    Join Date
    May 2003
    Location
    Pittsburgh, PA in the USA
    Search Comp PM
    I advised Vertical as I do with most people to crop any old black and replace with fresh black when re-encoding.

    It is an obsession of mine

    The problem is I don't think he ever fully understood it especially since his samples (as is the case here) are never centered and when I have provided scripts for him I not only cut the existing black (he has provided pictures in the past) but I add black back in such a way as to center the image.

    But if you pay attention to the numbers I always add back the same amount of black as what I cut so as to keep the aspect ratio.

    Well unless you need to go from 4:3 Letterboxed PAL to 16x9 WS NTSC or something like that.

    - John "FulciLives" Coleman

    P.S.
    Provide a picture of the original PAL video image via VirtualDubMod (no cropping/resizing) and I'll give you a crop/resize/addborder commands that work.
    "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  
  19. Member
    Join Date
    Jun 2006
    Location
    Canada
    Search Comp PM
    guns1inger and John, thank you!

    Unfortunately I cannot post a picture of the roiginal PAL. I have already converted it to NTSC DVD and deleted the backup.

    "unless you need to go from 4:3 Letterboxed PAL to 16x9 WS NTSC" - I believe that was the point of confusion.

    While converting from PAL DVD 4:3 I tried to keep the same amount of black instead of resizing to NTSC.

    John, I am sure there is also a practical reason besides the obsession, right?

    Thank you!
    Quote Quote  
  20. Member FulciLives's Avatar
    Join Date
    May 2003
    Location
    Pittsburgh, PA in the USA
    Search Comp PM
    "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
    Jun 2006
    Location
    Canada
    Search Comp PM
    Thanks. Understood.

    I read that one but I read and posted here before reading it.
    Quote Quote  



Similar Threads

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