Avisynth: help with Lanczos Resize in FitCD ?
@Anyone
I am trying to convert my Alien movies to KDVD and I wanted to get the resize parameters from FitCD. I am not 100% sure how to use FitCD, My DVD source is PAL 720 x 576 and I wanted to resize to 704 x 576 using Lanczos resize. In the Mpeg Resizing I selected 16 for both round to settings, see the pic below: http://www.digitalfaq.com/archives/error.gif Are these settings correct? I would appreciate any help and further info on how to get correct settings from FitCD to get my resize params. Thanks in advance. :) |
1/ In the present case this won't change anhything but in a general way, you can set the crop rounding to 2 or 4 and not 16. 16 must be kept for resize.
2/ I really doubt your source is fullscreen. So you must determine the top and bottom border that is in the source (using DGIndex, null transform filter in virtualdub or autocrop plugin in avisynth). Then put these two values (or 4 values, you can have also a little border on the right/left) into FitCD to have a correct crop/resize done on the real film area of your source, and not all the frame dimension. This will also let you apply the filters only on that area and gain a lot of time. All depend on how your script is done. The case : Code:
Mpeg2Source() But if you do as a process myself : Code:
Mpeg2Source() In the past, on the same encoding, CCE goes from 0.74x to 0.82x with that. |
Thanks for your help Phil, I really appreciate it.
Would be so kind to explain the params of Lanczos please. Code:
LanczosResize(672,544,8,0,704,576) Out of interest on the back on my DVD box I have the following: AR: 2.35:1 and 16:9 Widescreen. It is a PAL Region 2 DVD. I don't know if that info offers any more help. Thanks again Phil for your help in this matter. :) |
Hi Phil here are two settings from DGIndex, I selected clipping in DGIndex.
Here is the first one: http://www.digitalfaq.com/archives/error.gif And the second: http://www.digitalfaq.com/archives/error.gif Thanks to ImageShack for Free Image Hosting With the bottom clipping. I click the move over the slider and then repeatedly hit the right arrow key. Every 4 taps of the righ arrow cursor key results in the value of the clip to increase by 8. So my question is am I better off going with the first picture values possible cutting some of the bottom of the movie slightly or go with the second picture and leave the small black bar at the bottom? |
Quote:
Quote:
|
Quote:
Quote:
(note: be carefull, Autocrop always gives a left border of 2 pixels even if there is not. But this can be seen easily if you look closer at your sceen). Else, with DGIndex what I do generally is to take the situation that is the "less worse". I mean if I have to choose between cutting 3 pixels or letting a 5 pixels border, I choose to cut. But if the choice is between cutting 7 pixels or having a 1 pixel border, than I keep the border. EDIT: I thought you won't do Alien3 :lol: |
Quote:
Thanks for the further info Phil, is I have just downloaded the Autocrop.dll from AviSynth site and I shall give that a try. Again thanks again Phil for taking the time to explain to me the art of clipping and cropping. :D I very much appreciate it. :) |
Thank you Phil for bringing to light for me this tool Autocrop it is very neat.
Below is a test script that I did with it using a very simple script as you suggested: Code:
# -= AviSynth v2.5.5.0 script by FitCD v1.2.4 =- Thanks to ImageShack for Free Image Hosting You say that Autocrop will give always give a left border of 2 pixels. In my case it is 10, should I subtract 2 from that to make it 8? EDIT: The four crop settings values you get at the end, do you enter these for Lanczor Resize? EDIT2: I can see on the right hand side cropping that Ripley's glove is overlapping the cropline and slightly can been seen on the other side of the line, is this just me? Can it be ignored? Thanks Phil. :) |
Or use my little tool I wrote for displaying and cropping d2v contend out of DgIndex (not DVD2AVI!). Its part of a new Video Appl. Im writing. I quickly added for your purpose a little result TextFrame to show the crop results and compiled it again.
It Autocrops using Mod2. A copy of DgDecode.dll has to be in the same Folder as this appl. http://home.arcor.de/packshot/dgdecodeplayback.exe The movie automatically starts, press stop and hit Autocrop. http://www.digitalfaq.com/archives/i...2005/08/26.jpg |
Quote:
-kwag |
@incredible
Andrej you are a lifesaveer! Thank you. :D Was this written using PureBasic? Looks really cool, thanks buddy I shall download it and run some tests now. :) |
Quote:
Quote:
;) |
Quote:
[/quote]EDIT2: I can see on the right hand side cropping that Ripley's glove is overlapping the cropline and slightly can been seen on the other side of the line, is this just me? Can it be ignored?[/quote] As you can see, autocrop seems to have the bad habit to do a 2 pixel error on right - left (it does not suffer abotu that for top/bottom). Quote:
@Inc I will try your app. It is nice. |
Quote:
Quote:
|
@Incredible
Unfortunately when I try to enter a .d2v file made with DGIndex 1.4.0 Final, your tool crashes and I then quits. :( I am at a loss what could cause this, My OS is XP Pro SP1. @Dialhot Phil sorry to carry on, just a liitle more advice needed. What values exactly from Autocrop do I need to input into FitCD? Also what should I round to? Mod 2,4,8 or 16? I like to use overscan=2 also. In my destination, the round to is set to32 for the width but the hight is set to 16 in the slider bar as seen in the first picture. I am really confused with the round to and which mod to use. Sorry for the dumb questions but I am still such a noob when it comes to using FitCD. |
Quote:
I just realised after reading your post again, I forgot to put the DGDecode.dll into the same directory as your tool. My so dumb!! :oops: :oops: Now it works perfectly, now please excuse me while I go find my brain. :lol: |
Here are the crop results from your tool Andrej.
http://www.digitalfaq.com/archives/error.gif Thanks to ImageShack for Free Image Hosting Mind you if you look at the bottom crop line it overlaps the credits slightly. A very good tool btw though, I hope for future releases there may be a slider bar so you can see how the crop lines look at mid point of the movie. Great work Andrej. :D Now with the settings from your tool, I have put these into FitCD: http://www.digitalfaq.com/archives/i...2005/08/27.jpg Thanks to ImageShack for Free Image Hosting I still don't get the round to options though and would appreciate a tip in the right direction. Thanks in advance. :) |
Okay, so I resume all the informations you gave :
- Autocrop gives left = 10, top = 72, width = 704, height = 430 - Autocrop is giving a two pixel too big border on the right side. So correct width should be 706. - you want a oversan about two and a dest res to 704*576. This is how I set my Fitcd : http://www.digitalfaq.com/archives/i.../2005/08/7.png As you can see, this will crop too much the source (694 x 430). In this situation I will go for an oversan of 1 (or 3) to have a lesser cropping (706 x 426) : http://www.digitalfaq.com/archives/i.../2005/08/8.png |
@Dialhot
Thank you Phil, I get the same results by changing to overscan=1. Is the round to 2 & 2 ok for the Source? Also have you tried unticking the Anamorphic, you get huge black borders I take it this will mess up the AR? Thanks as always Phil for your very insightful informationa and help it is greatly appreciated. :) |
Quote:
Quote:
|
Yes according to DGIndex it is Interlaced, I hope this doesn't mean I need to check the Interlaced box in the destination?
If my source was Progressive then could you round up to a higher number then? |
Quote:
Quote:
Quote:
|
Quote:
Quote:
Quote:
If you lived next to me mate, I would treat you to a few beers for all the headaches I have given you today answering my questions :drunkard: Same goes to the rest of you guys. Thank you all very much. |
You're welcome. And I'd rather a fresh Pepsi :)
|
Quote:
|
Quote:
Progressive crop round 2 Interlaced crop round 4 @ Zyphon Yup, seems the pixeldetection is still not perfect. Although cropping at mod2 would sometimes cause maybe 1 pixel border active Movienformation to be dropped, your source seems to be cropped 2 pixels too much. I think I should overthink my Loop, as the pixeldata detection starts on the upperleft (at Topdetction for example) at ZERO, so my for/Next Loop is like the following: For y = 0 to (SourceHeight-1) For x = 0 to (SourceWidth-1) .... parsing pixels at (x,y) Next x next y But thats wrong as the Pixeldata should begin at ONE: For y = 1 to SourceHeight For x = 1 to SourceWidth .... parsing pixels at (x,y) Next x next y Also a check routine implementation where the code checks for a DgDecode.dll presence in the same folder should be integratet. |
@incredible
HI Andrej, I think you new tool is awesom! Also seeing as it the first release I think it is pretty good, excellent in fact. I think a check for DGDecode.dll would be a good thing also at startup as it crashes if it is not in there. Yes maybe the pixeldata For/Next loop probably needs a little more work. What I will do is use DGIndex on a small section mid film and see how it goes just to double check. Keep up the great work this tool rocks. :) Also thank you for pointing out the round off points for both Progressive and Interlaced sources. :D |
@Incredible
Hi Andrej, I just did another quick test with Alien 4. I just selected a small section from within DGIndex and for my eyes it seemed to crop o.k. I will re-rip Alien 3 and cut a section out and see if it crops that o.k I am wondering if it was because it was the end credits that made it bleed over as the screenshot below looks fine to my eyes, maybe you can see different? http://www.digitalfaq.com/archives/i...2005/08/28.jpg Thanks to ImageShack for Free Image Hosting |
@Zyphon
Quote:
Ill add the support of mpeg2dec3.dll if wanted, so u dont have to build 2 diff. project files. You last Alien Screen does look perfect, means the little overhead of maybe 1 pixel down right is due the mod2 cropping. BUT anyway your Image some postings more above does crop too much of the credits. Anyhow, credits in white letters do clearly mean RGB values above 200 for example, so that should have been recognised by my routine as the limiter is about 20-30 in RGB Values. @Generally Another Problem of not properly catching the borders in pixel-exact croppings could be that the parse Command Pixel(x,y) in purebasic (same as GetPixelV(x,y) in WIN API) results in a full RGB Value of 7Letters like 276489. That Value is used to match the "limit" of beeing active pixels. So better would be parsing EACH rgb channel out of the 7Letters Dezimal order. Result = Pixel(x,y) AverageRGB = (Red(result)+Green(result)+Blue(result)) / 3 This results in a 0-256 Value (more common for rgb parsing I think ;) ) But as you already recognised the Border Checking NEEDS Time as the Win API GetPixelV(x,y) is slow. And if adding on each Pixel parser the 3 R/G/B descrambler .... ough :? this will take even more time. |
Quote:
I used DGIndex and to be honest I think your tool is better kept to keeping with DGIndex. I made my d2v projects with DGIndex. Quote:
For me I will stick with DGIndex. :D Quote:
Quote:
I love this tool and I wish you luck with the upgrades to it. :D |
Hmmmm ....
I still have the Mencalc Sources on my Disk. Maybe its a nice Idea to implement the resizer Core into the d2v Application at the left lower side. Means an autocropping would be performed where you manually can modify the box in its size posizion using a spin gadget so it fits to your perfect needs. After that these values will be send into the resizer core and an XXXresize(xx,yy,a,b,xxx,yyyy) Avisynth Script will result as the final gift. :) http://www.digitalfaq.com/archives/i.../2004/05/7.gif |
Quote:
I still do use DVD2AVIdg as it is more compatible with Calcumatic and MovieStacker. Maybe there are more people like me. I think it would be better to add support for those versions. I think also there are people that uses 1.76. |
Quote:
If I would do an app that read d2v, I have to confess that I will hesitate to choose DGIndex as reference :cry: |
imho there are 2 diff d2v syntaxes incompatible by each other on air now.
the old dvd2avi one and the dgindex one. Can someone confirm that? In that Appl. a simple openfile().readstring() parser does its work where the first string in the d2v is parsed and compared to a determined string in the app which includes the correct DgIndex's d2v first string. So There is NO problem supporting diff. d2v syntax versions except there's one rule: The allocated dll for that specific d2v format has to be in the same folder as the appl. and the API of the dll HAS TO BE THE SAME. Both mpeg2dec3.dll and DgDecode.dll for example do use as API: openMPEG2Source() getFrame() getRGBFrame() closeVideo() ... where getFrame() in my case not needed as I load the Frames out of the d2v frameserver into a previewing appl. where the Pic will be displayed on a PCscreen directly using RGB. According to Calcumatic ... maybe Karl will update his d2v Parser sometime so d2v files out of DgIndex will be supported. Quote:
I was able to update the c++ core within GripFit_YV12 to proper 528/544 values but I have to figure out how to compile it using DevC++. The Proof on GripFits Source: Code:
double GripCrop::DeterminePAR(GripCrop::STANDARD standard, const Dimensions& dim) |
Well first this Code was purposed to be part of a new appl. but as it seems that its also useful as standalone, so I made it to version 0.12b.
Now dgdecode.dll AND MPEG2Dec3.dll are supported as d2v decoding libs, means DgIndex and DVD2AVI d2v files are supported. If the specific dll is not found by the appl. even if you've copied it into the applications folder then check its name and the type of typing case as maybe the parser could be case sensitive. If for DVD2AVI decoding a different dll name is common, please let me know. If there are d2v files which use a different identifier in their first text line also here: Let me know. Actually the appl. recognises as following when parsing the first textline out of an ingoing d2v: "DGIndexProjectFile..." (only first 18 Letters will be parsed) means : dgdecode.dll will be used "DVD2AVIProjectFile" means MPEG2Dec3.dll will be used |
Quote:
Quote:
Just off to test the new version. :D |
Another test with Alien3 and New DG Decode Playback
@Incredible
Hi Andrej, I just ripped (Again :D) Alien 3 to my HDD to test out the new version of your tool. To keep it consistent with the test for Alien 4 I used DGIndex. I used DGIndex to use a small section of the filma and made a d2v project. The screenshot below clearly shows that the cropping at the bottom is still slightly incorrect. If you look under the green crop line at the bottom you can still see Ripley's body beneath it. So maybe this is cropping one or two pixels to many in this case. I am going to rip Red Planet and try and see how this crops, as I like Karl usually use this movie for my benmarking and I have done so many tests using this movie. :lol: I shall post my results here. :D http://www.digitalfaq.com/archives/i...2005/08/29.jpg Thanks to ImageShack for Free Image Hosting |
Red Planet tests
@Incredible
Hi Andrej, Below is a screenshot of Red Planet and the cropping looks perfect! Maybe there is something strange going on in Alien 3 that makes the crop area incorrect. Would you like me to upload a small sample of a VOB from Alien 3 to test on your machine? EDIT: I have just now noticed that the crop on the top line looks a bit off by a pixel if you take a good look. Maybe we could start a new topic regarding this tool and put all my findings in a bug list report post? http://www.digitalfaq.com/archives/error.gif Thanks to ImageShack for Free Image Hosting |
Thanks for the Info Michael.
I do think the WIN API command GetPixel() for getting Pixel Values isn't that confiable! The For/Next Loop in my code ist correct, also that the counter starts from 1 to the picture's width or height value and not starting from zero. I got the returned rgb data from dgdecode.dll at a given memory adress, so it would be much more effective and FASTER using a peek() routine directly on that memory adress where the origin rgb data is stored instead of scanning rgb values in a created image generated out of that same origin rgb data. EDIT: Just saw your RedPlanet crop scan! I do assume that inside the Movie there is a scene where the right sided Imagearea gots more overhead then the screen where the autodetection ends! I had that same issue on KillBill Vol1. And if also the Mod2 factor will be applied then this clearly results in the state on your pic above. Means the engine keeps watching the Movie and "keeps" the maximum Active Area of the each parsed frame in mind, finally it chooses the maximal value of the image area within the movie that occurs and uses the mod2 on it. Ill add also an "Crop actual frame" Button where you can determine the auto cropping on that actual frame which is choosen via a slider tracking bar. I already have that routine on my hd. EDIT2: I did examine your 720x576 pic using Photoshop and the cropping on top and bottom is 2px too much, means if the orig value would have been used (without round to mod2) it ALSO would even been in mod2 state! Thats why I'll enter the routine again. Thanks for your pics!! Keep on testing Michael. http://www.digitalfaq.com/archives/i...2005/08/30.jpg Thanks to ImageShack for Free Image Hosting BTW. I do recognise a "blending" on Ripleys arm! I dont hope they treated the source like SITC ones where also dynamic phase shifts have been added. |
Quote:
To be honest I don't think these couple of pixels is a problem considering it is cropped in Mod2, as long as it is as we say over here "as near as dammit" then I think it should be fine. The slider bar idea seems like a very good idea for fine tuning the crop boundaries. I wonder if karl could do a quick test with the NTSC version of Red Planet and see how hes cropping comes out. Maybe the same? Who knows. :D I like the picture you posted showing the crop marks and the overclipped pixels. If there is any else I can do for you just ask. :D I think this tool is excellent and it make cropping such an easy task and takes the headache out of it, so a big thank you for this. :) Btw if you did want a section of that VOB please let me know. :) |
Site design, images and content © 2002-2024 The Digital FAQ, www.digitalFAQ.com
Forum Software by vBulletin · Copyright © 2024 Jelsoft Enterprises Ltd.