Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
|
|
#1 | Link |
|
Carlos Martinez
Join Date: Aug 2005
Posts: 288
|
Learning to use LSFmod
I am trying to learn to better use the LSFmod filter capabilities.
Until now I had been mostly using its smode parameter. But on some restoration cases it has proven too much using just that parameter. I believe it might be useful to use the other parameters. But for that I need to know what they are or do. The filter is is here: http://avisynth.org/mediawiki/LSFmod Even if maybe my questions may sound rather basic for many, here they go. 1) When there's no parameter listed to fill in, like on "strength [int]", what do I put inside? 2) Smethod (sharpen method): what does Kernel mean or what the parameter Min/Max controls? 3) Skernel: what does this parameter modify? 4) Lmode: how does limit affect sharpening in over or undershoot? It softens the borders? 5) The parameters "overshoot" or "undershoot" should go before or after Lmode? 6) Soothe: what is temporal stabilization? I have other questions, but let's start with those so I can begin testing with reasonable parameters and not all over the place. Last edited by carlmart; 15th September 2009 at 15:41. |
|
|
|
|
|
#2 | Link |
|
LaTo INV.
Join Date: Jun 2007
Location: France
Posts: 701
|
1. Just put nothing
2. Kernel and Min/Max are 2 way to sharpen 3. Don't touch this unless you know what you are doing 4. It avoid some artifact to appear when sharpening (example: halo) 5. Like you want, it is the same 6. It help to have a more stable picture Last edited by LaTo; 16th September 2009 at 11:29. |
|
|
|
|
|
#3 | Link |
|
Carlos Martinez
Join Date: Aug 2005
Posts: 288
|
First of all thanks for the filter. It seems to work quite well, and I hope to learn to manage it.
I have just used it to correct things on a DVD that I have that was originally released in letterbox 4:3. The film is "The bride wore black", by François Truffaut, and apparently there's no other release but this. When I view it on my 42" plasma, there are black bars on all sides. If I zoom it with the TV, I lose the subtitles. If I zoom it with the DVD player, I lose screen information. BTW: this is the case with almost every letterboxed 4:3 film I have, so I am willing to process them all as long as I can preserve the quality. In this sense, LSFmod came very handy. The script I ended up using was: TFM() TDecimate(Mode=1) lsfmod(smode=5, Smethod=3, kernel=19, soothe=true) Lanczos4Resize(720,480,0,66,0,-66) After some trim tests, I processed the whole film with that. Compared to the original the results were spectacular. The only problem is it took quite long to process it. Usually I take 3-4 hours with a regular DVD to resize it. This one took 13. Last edited by carlmart; 16th September 2009 at 12:08. |
|
|
|
|
|
#5 | Link |
|
Registered User
Join Date: Apr 2002
Location: Germany
Posts: 5,406
|
And also, crop the major part of black borders beforehand:
Code:
crop(0,64,-0,-64) TFM() TDecimate(Mode=1) lsfmod(smode=5, Smethod=3, kernel=19, soothe=true) Lanczos4Resize(720,480,0,2,0,-2)
__________________
- We´re at the beginning of the end of mankind´s childhood - My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!) |
|
|
|
|
|
#6 | Link |
|
Carlos Martinez
Join Date: Aug 2005
Posts: 288
|
Thanks LaTo. I have added "fast".
Thanks Didée. Which is the reasoning to get to that figure combination? When AR is larger than 16:9 I've learnt to compute the results quite well, using resize and addborder. But it's been hard to get to a way to compute other sizes like 1.33 or 1.66. In any case, after that long conversion I burned a DVD-RW with the results. And I think it needs further work using the filter combo I tried. To start with halos have popped up where didn't seem to be any. So I now think I have to be careful on what to use. Using dehalo is not quite an option, as I know it even less and the last time I tried it it had softened things too much, like a fog filter. Perhaps I should show here a jpg of the same image with and without LFSmod for you to see what I mean. |
|
|
|
|
|
#7 | Link | |
|
Registered User
Join Date: Sep 2007
Posts: 5,669
|
Quote:
|
|
|
|
|
|
|
#8 | Link |
|
Carlos Martinez
Join Date: Aug 2005
Posts: 288
|
Tried that. Things improved and looks less flat than without it on the resize.
Another thing I tried was DegrainMedian, as the film or copy is rather grainy. Things seem to improve a bit, but it gets slightly artificial, like plastic. Is there a way to increase the screen size in AvsP? You can see the changes, but they are difficult to see sometimes, and they are there. Textures is what I am talking about, skin texture particularly. But there's a halo or chromashift, don't know how to call it really, on the left, on black things. It's on the original and pops up a little with LSFMod. Curing that might help improve resolution. It's certainly a telecine problem. Last edited by carlmart; 17th September 2009 at 23:57. |
|
|
|
|
|
#9 | Link |
|
Carlos Martinez
Join Date: Aug 2005
Posts: 288
|
After I completed my first run with this project, I realized I was cropping the image on all sides, not just the black bars. My fault.
Before I go further with the image filters, I really have to learn to resize things from letterbox 4:3 properly. Perhaps you can help me understand how. The problem is with images whose ratio is less than 1.77 (16:9). How can I compute things properly on such cases? Just to be specific with my example: the ratio of my letterbox image is 1.66. How do I set the crop, resize and addborder variables to get me a non-cropped, pilar sized 16:9 720:480 image? Last edited by carlmart; 21st September 2009 at 18:40. |
|
|
|
|
|
#10 | Link | |
|
Moderator
![]() Join Date: Oct 2001
Location: Hawaii
Posts: 7,406
|
Quote:
http://forum.videohelp.com/topic372789-30.html#2005813 Or, put another way, find the original crop values (I use GKnot for this) and plug into FitCD the new cropped resolution and set it as DVD 720. In this example I cropped 48 from both the top and bottom: |
|
|
|
|
|
|
#11 | Link |
|
Carlos Martinez
Join Date: Aug 2005
Posts: 288
|
In fact today I went look for help on another thread of mine you helped me with, in Videohelp.
On it you suggested using this combo: Crop(0,60,0,-60) Lanczos4Resize(720,480) Changing the crop values you can adjust to several ratios. Using it in AvsP until I cropped nothing, I got to this combo: Crop(0,46,0,-44) spline36resize(720,480) FitCD is still a tough nut to crack to me. Let's hope I get to manage it sometime. |
|
|
|
|
|
#12 | Link | |
|
Moderator
![]() Join Date: Oct 2001
Location: Hawaii
Posts: 7,406
|
Quote:
Crop(0,46,0,-44) LanczosResize(656,480) AddBorders(32,0,32,0) Last edited by manono; 22nd September 2009 at 13:30. |
|
|
|
|
|
|
#13 | Link |
|
Avisynth language lover
Join Date: Dec 2007
Location: Spain
Posts: 3,442
|
That's clearly wrong as it does not produce a pillar-boxed result. So the resize needs to be to a width less than 720 and the last step needs to be adding borders to the sides to bring the width up to 720.
However, I don't understand how FitCD arrives at the numbers shown in Manono's post, where it resizes 720x386 to 656x480. Working it out manually, I get this: Changing height from 386 to 480 means width becomes 720 * 480/386 (at original PAR) Allowing for change in DAR from 4:3 to 16:9 means compress horizontally to 3/4 width, hence final width = 720 * 480/386 * 3/4 = 672 (instead of 656) |
|
|
|
|
|
#14 | Link |
|
Carlos Martinez
Join Date: Aug 2005
Posts: 288
|
Manono & Gavino:
You're both right. I do not want to crop things. Manono, when I loaded your FitCD numbers on AvsP I get an image that has borders all over. In fact I should get an image with pillars on the sides only. But I would love to understand how to load values in FitCD. Gavino, I must be a real blockhead (you don't have to agree!) but I couldn't understand your reasoning. Maybe this time I can learn to do things right in less than 1.77 frames. |
|
|
|
|
|
#15 | Link | ||
|
Moderator
![]() Join Date: Oct 2001
Location: Hawaii
Posts: 7,406
|
Quote:
Quote:
I use it almost always myself, although I don't think the eye will be able to tell one way or the other, and carlmart's having enough trouble understanding the basics of how FitCD works without adding another level of complexity with ITU resizing: |
||
|
|
|
|
|
#18 | Link | |
|
Guest
Posts: n/a
|
Quote:
a) squish the height b) over-crop the top and bottom c) add black borders to the sides If one of these options is of interest to you, then please state which way you want to go. You're basically trying to fit a square peg in a rectangular hole. So you've either gotta use a smaller square, or shave off the sides of the square to make it more rectangular. BTW, I'll answer the question you posed to Didée, "Which is the reasoning to get to that figure combination?" He took your original script, which had this at the end: Lanczos4Resize(720,480,0,66,0,-66) which is the same as cropping 66 off the top and bottom and resizing the result to 720x480. So, he was thinking, why not just crop by a nice (divisible by 16) number like 64 from the top and bottom first, do all the "slow" stuff, and then do another crop by 2 (top and bottom) at the end to get to the 66 of of your original script. Now I assume that you have since realized that this crops your video too much, as you have recently stated that 46 off the top and 44 off the bottom is the maximum without over-cropping. BUT he was working under the assumption that your original script had the correct values. -G |
|
|
|
|
#19 | Link | |
|
Avisynth language lover
Join Date: Dec 2007
Location: Spain
Posts: 3,442
|
Quote:
- in your 4:3 DVD, actual picture occupies area 720x390 (based on your info that you need to crop off 90 pixels to remove black bars); - for some reason, FitCD only uses 386 of these, so I took that as my starting point; - you want to scale that up to occupy the full height available of 480, so to maintain AR, you need to scale the width by the same factor, ie 480/386; - but our final target has 16:9 DAR while the original is 4:3, so we need to squeeze it anamorphically by a further factor of 3/4 (ie (4/3)/(16/9)) to allow for the different PARs; - therefore, actual width required = 720 * 480/386 * 3/4 = 672 @Manono - this reasoning is independent of whether ITU resizing is used or not, it just requires it to be used consistently - for both input and output, or for neither - and then its effect cancels out. From the results shown, it seems that FitCD always uses it for output calculations, but for input only uses it when selected. |
|
|
|
|
|
|
#20 | Link | ||
|
Carlos Martinez
Join Date: Aug 2005
Posts: 288
|
Quote:
What I think I am doing is eliminating as much black space as possible, and for that I would have to zoom the image and anamorphize it. That is convert the 4:3 "spheric" image I have now into a 4:3 anamorphic one, containing a 16:9 image with pillar bars on the sides. Quote:
|
||
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|