View Full Version : FACAR - As seen on TV!
r6d2
14th September 2003, 04:08
Hi there,
I released a new improved version of Gerti's SemiAutoCropAndResize script for DVD2SVCD. Excerpts from the Readme:
FACAR (Fully Automated Crop And Resize) crops and resizes a DVD source to any of 7 typical (X)SVCD resolutions, mantaining exactly the original visual size and eliminating overscan.
Features
<i>. Overscan based cropping
You specify the vertical and horizontal overscan as a percentage. The script then determines the number of blocks to crop in both dimensions. This results in automatic cropping for any resolution you choose.
<ii>. Supports any of the 7 popular output resolutions (As in FitCD).
<iii>. Additional filtering
You may use the PreResize.avs and PostResize.avs scripts to insert any filters you like. The defaults include the KISS recipe, a simple and powerful compression enhancer, and a CCE encoding visualizer.
<iv>. BlockOptimization auto mode
If you set BlockOptimization to 0, a default of 8 is applied to VCD and 4:3 sources, and 16 in all other cases.
<v>. Support for QMF with resizing functions (Batteries included)
<vi>. Overscan overlay with transparency in debug mode
This WYSIWYG feature will show you how much FACAR is actually cropping and may help you decide better the resolution or block optimization you want, should you decide to play with them.
<vii>. Resizer preview modes
This feature will help you decide which resizer to use by showing them on the same frame.
<viii>. "As seen on TV" mode as default (AsoTV)
Gerti's original script handled 704-based frame sizes with vertical shrinking to keep the aspect ratio. Now, 704-based frame sizes have exactly the same height as the original source, so all resolutions work now in "As seen on TV" mode by default.
<ix>. Corrected picture in preview mode (NTSC & PAL)
You'll see the output of the clip with the correct aspect ratio on the screen so you can choose the frame size which works best for you on each particular movie.
Available at:
http://www.geocities.com/r6d2_stuff/ (primary)
http://www.angelfire.com/droid/r6d2/ (secondary)NOT latest version.
Cheers,
r6d2
14th September 2003, 04:13
# Change log:
#
# v1.06.7
# - Added corrected aspect ratio in preview mode for PAL (now both NTSC and PAL supported).
# - Fixed OverscanH bug of cropping too much top&bottom on "high" anamorphic movies (DetectedHeight > 448 in NTSC).
# - Changed default values for Overscan to 5%.
#
# v1.06.6
# - Added "real" ASOTV mode and set as default.
# - Fixed aspect ratio on 528x480 frame size, mistaken as 704-based in FitCD.
# - Simplified aspect ratio calculation on 544x480 frame size to make it more general.
# - Added corrected aspect ratio in preview mode (for NTSC only in this version).
# - Reorder parameter entry to most used on top for easier setup.
#
# v1.06.5
# - Added automated AutoCrop values fill in (thanks Tylo)
# - Added resizer preview modes
# - Renumbered and included the 7 resolutions in non-DVD2SVCD mode.
# - Fixed anamorphic source flag bug introduced in 1.06.4 when output was VCD.
#
# v1.06.4
# - Added automated install/uninstall (thanks Tylo)
# - Added visual transparency overlay of overscan area in debug mode
# - Perfectly integrated with D2Sroba (thanks Tylo)
# - Repackaging of third parties utilities (AutoCrop11 now bundled with docs fixed)
# - Fixed: weird things happened if you changed heavily the overscan defaults.
# - Fixed: manual override of BlockOptimization was not being applied.
# - General doc improvements
#
# v1.06.3a
# - Added all needed files on the zip.
# - Added support for QMF
# - Rearranged parameter order for most frequently used first.
# - Fixed: wrong output (just in preview mode) when using non standard res and VCD was selected in DVD2SVCD.
#
# v1.06.2
# - Added BlockOptimization = 0 (auto mode)
# - Added more debug info
# - Fixed: BlocksToCropVertical calculation to reflect anamorphic source
#
# v1.06.1
# - Added support for any output resolution (as in FitCD)
# - Replaced BlocksToCrop parameters by Overscan parameters (adjusts itself now)
# - Added Debug level 3, even more data
# - Fixed: old AviSynth syntax bug (thanks sh0dan)
# - Fixed: Original docs had BlocksToCrop reversed (thanks Holomatrix)
jorel
14th September 2003, 20:09
please r6d2, have another link?
:)
<edit>
now is ok,thanks!
:)
r6d2
14th September 2003, 22:53
Originally posted by jorel
i try to open the link 3 times today and got:
"page not found".
please r6d2, have another link?
:)
Added a secondary link. According to Yahoo!, the page has been up all the time, though. Maybe it is a DNS problem with your provider.
Edit: jorel, either your DNS is 5 days old or you browser's cache is playing tricks on you. Both links are up.
jorel
14th September 2003, 22:59
great,the secondary link is perfect here,open faster.
r6d2, thanks!
:)
@ DDogg
thank you too my friend,i got it!
:)
tylo
15th September 2003, 15:35
@r6d2
I've played around with the AutoCrop C++ code, and made a new version of the AutoCrop avisynth plugin. It enables AutoCrop itself to fill in the detected Top and Width for you, making it independent from D2SRoBa. This will make FACAR very much alike RB's AutoFitCD plugin in functionality (only it will not switch to the FACAR template autmatically after preview).
If you're interested, I will make it available to you (incl source code), so you can include it with your FACAR distribution. :)
Six new optional parameters:
- outFile : ini file name to write back cropping information
- outSection : ini section name
- outKeyLeft : ini key name for detected left
- outKeyTop : ini key name for detected top
- outKeyWidth : ini key name for detected width
- outKeyHeight : ini key name for detected height
When the outFile + outSection are specified, AutoCrop will write the output in preview mode(=1) only. I.e. it will no longer be neccesary with the extra call with mode=2. The new AutoCrop version is fully backward compatible with v1.1.
[AVISYNTH_FACAR DetectBorders]
..
2=AutoCrop(mode=1, ..., outFile=!ThisFile.ini, outSection="AVISYNTH_FACAR", outKeyTop="^DetectedTop.", outKeyHeight="^DetectedHeight")
..
!ThisFile.ini=C:\Program Files\DVD2SVCD\AVISYNTH.INI
r6d2
15th September 2003, 16:14
Originally posted by tylo
[B]@r6d2
If you're interested, I will make it available to you (incl source code), so you can include it with your FACAR distribution. :)
@Tylo,
Sounds great! I had been playing with AutoCrop 1.1 calls to detect and use the values directly (like GripFit does), but I found that sometimes AutoCrop just doesn't get it right. Human intervention to say "this is it" is still needed or you may find out later that you lost a lot of time. ;)
If you have time, you might try to modify AutoCrop algo to do something like this: instead of using a predefined threshold, scan the lines and compute the maximum M for all of them. Then stop when (M(n)-M(n-1)) > E, where E is the possible error of a black area (determined experimentally). I think this way human intervention can be left aside.
I'd do it myself, but C++ is quite obscure to me. I'm an old timer. :)
Please e-mail me your code (I PMed you my e-mail address).
r6d2
21st September 2003, 16:43
New features/fixes:
# v1.06.5
# - Added automated AutoCrop values fill in (thanks Tylo)
# - Added resizer preview modes
# - Renumbered and included the 7 resolutions in non-DVD2SVCD mode.
# - Fixed anamorphic source flag bug introduced in 1.06.4 when output was VCD.
I've found that for Q=constant, resizers increase the demand for bitrate in this order:
Resizer BR
Lanczos 115%
Bicubic(0,0.6) 111%
Bicubic(0,0.5) 110%
Simple 109%
Bicubic(1/3,1/3) 103%
Bilinear 100%
The percentage vary from source to source and Q used, but the relation is the same.
Please give DebugMode=10 and related a try. Maybe you can see the difference in using the various resizers. Me, at least, I am resizer blind and stick to Bilinear when it's about shrinking an image.
Cheers,
r6d2
6th October 2003, 03:44
New features/fixes:
# v1.06.6
# - Added "real" ASOTV mode and set as default.
# - Fixed aspect ratio on 528x480 frame size, mistaken as 704-based in FitCD.
# - Simplified aspect ratio calculation on 544x480 frame size to make it more general.
# - Added corrected aspect ratio in preview mode (for NTSC only in this version).
# - Reorder parameter entry to most used on top for easier setup.
Get it at the usual places linked in the first post. See the Readme for more detail on the changes (also excerpted in the first post).
DDogg
6th October 2003, 05:34
r6d2, I don't think it gets said enough. You are an absolute jewel of a forum member. The work you have done on improving Gert's semi-auto work with Facar has just made encoding in d2s even more of a pleasure. Facar is so easy, so well thought out, and works so well. That's nearly becoming a trademark of yours :) So, anyway, a very big and sincere thank you for all this work you do for us!
kru
7th October 2003, 20:07
Thank you for a great tool!!!
I've been using GripFit for a long while to resize.
What's the differents between FACAR and Gripfit? Isn't GripFit exactly exact as FACAR???
And I'm litle bit qurius about the QFM script?
Should I only remove "#" to use it, and should I use it on every encode? (high/low bitrate)
DDogg
7th October 2003, 21:05
The QMF script if more hypothetical than actually useful, but it is good fun to play around with. Perhaps if the motion parameters were lowered it would be more useful.
You certainly should try adding the indicator lines I put in one of these threads to visually show what motion band is being used. It is quite educational.
In practice, the pre and post filters are more practical. I guess what I am saying is if you actually *need* the QMF to achieve a compression target, you would be better off adding another disk for svcd or making more space available on a DVD because that level of compression normally effects video quality adversely. (r6d2 smiles)
r6d2
7th October 2003, 22:06
Originally posted by kru
I've been using GripFit for a long while to resize.
What's the differents between FACAR and Gripfit?
GripFit does a good job too! (See my comments to Gerti67 on the subject on the original SemiAuto thread).
FACAR is not as automatic as GripFit because it still requires human intervention to validate autocrop's results. On the other side, GripFit may fail to find correct borders.
They both support any frame size, any resizer. FACAR is more flexible in a way, as it handles parameters in a more automated "default" way. FACAR uses overscan based cropping in a way it is independant of frame size. It also has some experiental features that are visually useful to choose resizers and frame size.
Regarding the "As seen on TV" feature, I'm not sure if they both behave alike. You might try them both and tell us.
/Add: I forgot the most important part: AFAIK, GripFit does not keep the aspect ratio on 704-based resolutions. You might check that too.
Trahald
10th October 2003, 15:37
tried out qmf last night.. although i changed the lancos line to simpleresize and the medium and high to bilinear. i tried deen("c3d", 1) for the medium and high for reduction but my test files actually came out bigger. so i went with the defaults. saves a few bits on a 1 cd encode. on my encode tonight where i'll have it set disks=auto, i'll put lanczos and bicubic back in (leave bilinear on the high motion).. for this im not looking to save bits.. just to make the bits i use count more (sharper lanczos frames on slow easy to see frames and bilinear/higher cleaning for high speed frames).. fun stuff
DDogg
10th October 2003, 16:01
w00kiee, I would appreciate it if you could let me know if you see any problems caused with the transitions from different resizing filters when you play on a standalone. I think I had a problem with it, but not for sure.
Trahald
11th October 2003, 01:22
i watched the movie on my apex today .. looks fine.. no problems to report
homerjay
21st October 2003, 23:28
@r6d2 and DDogg - i can remember seeing in another thread a post by jsquare re the qmf function and changes he made to alter the thresholds - i tried his modifications and managed to get a 115 minute film down onto 1cd at a very acceptable quality
was just wondering if this will be implemented
cheers for another excellent tool
hj
r6d2
22nd October 2003, 12:35
Originally posted by homerjay
was just wondering if this will be implemented
But it is already... The QMF functions provided are a framework, a template. Feel free to customize them.
(Just remember the FACAR installer will overwrite your Pre/Post/QMF scripts, so have them backed up elsewhere.)
homerjay
22nd October 2003, 18:16
yeah already got that covered - sorry couldnt have explained myself as well as i thought
what i was wondering is if you thought his settings were better in your testing ?
DDogg
22nd October 2003, 18:43
I think homerjay was speaking of modifying the level of motion detection in QMF. The stock settings don't pick up hi-speed until the action is very intense.
homerjay
22nd October 2003, 18:49
thats exactly what i was trying to say :o thanks ddogg :rolleyes:
r6d2
22nd October 2003, 20:03
Originally posted by homerjay
what i was wondering is if you thought his settings were better in your testing ?
Well, I did provide QMF support in FACAR, but as you may be aware of, I'm not much interested in overcompression ;), so I did some testing but not much research.
If the QMF thread (is it alive yet?) agrees on a better function set, I'll be happy to include it as default on the next FACAR version.
DDogg
23rd October 2003, 22:31
Actually the idea behind QMF is to avoid overcompression by lightly applying the relevant filters to the appropriate level of action. Same would be said for KWAG's MAF. QMF or MAF is not the culprit, the overzealous use of filters in them is. But as a matter of personal practice I quit using either because using your Pre and Post setup is soooo nice with a light filter application like:
PreResize -
undot()
ASharp(1,4)#costs "Q", but I really like the contrast increase
Fluxsmooth(5,5)
[bilinear resizing]
PostResize -
#deen() occasionally. It actually seems to be better post resize
TemporalSoften(3,5,5,10,2) #normally use this
Helps compression greatly without it being noticable to me. If that doesn't work I just increase space/disks.
r6d2
24th October 2003, 00:13
Originally posted by DDogg
your Pre and Post setup is soooo nice with a light filter application like [...]:
Kiss 2nd generation :)
I'd like to incorporate "auto IVTC" to FACAR. You know, sometimes DVD2AVI just doesn't get it in spite of the source being force-filmable, because of bad telecining practices.
This forces you to interrupt the D2S process, look at the AVI, find the interlaced frames, change the D2S IVTC setting and resume. Wouldn't it be nice if it was really automatic?
I saw a script once on an italian site which pointed out how it could be implemented but unfortunately I didn't keep the URL.
Does anyone know the whereabouts of something like this?
DDogg
24th October 2003, 00:50
I would PM bilu. If anybody ought to know if/how/where it might be him. It may be moot in a month or so anyway. I have a feeling that DG might add something to dvd2avidg. Not for certain, though.
Trahald
24th October 2003, 02:18
i have to try that out.. the pre post.. i stopped using the qmf because on an ivtc title it was too much of a speed hit. ive been more inclined to just add disks. (i was/am such a bitrate scrooge) how much of a perfomance hit does the pre/post setup you have cost you ddogg?
DDogg
24th October 2003, 02:36
Just depends on the filters. If you use something like I posted above it is not terrible. Seems like it slows me down about 50% over no filters. I haven't been paying attention lately.
Something nice and easy to try is just fluxsmooth(1,1) in Pre and undot() in post (or reverse that). Hardly noticable but helps with compression.
/Later: Yeah, I guessed it just right. The filter setup above dropped me from 2.70 to 1.35 RT
r6d2
24th October 2003, 12:02
Originally posted by DDogg
/Later: Yeah, I guessed it just right. The filter setup above dropped me from 2.70 to 1.35 RT [/B]
At first I thought "50% and he doesn't pay attention"? :confused:. Now I see: when being a millionaire, you can afford to give away big tips. :D
Holomatrix
24th October 2003, 22:52
Originally posted by r6d2
I'd like to incorporate "auto IVTC" to FACAR.
yes, I agree, that would be a good implemantation :)
Is it possible for FACAR to autochange the FACAR DetectBorders to FACAR in the Frameserver TAB once the border detection and auto fill in is done?
@r6d2 - you might want to fix your sig :) "There is no much you..."
r6d2
24th October 2003, 23:19
Originally posted by Holomatrix
Is it possible for FACAR to autochange the FACAR DetectBorders to FACAR in the Frameserver TAB once the border detection and auto fill in is done?
I'd do it if I knew how to. I guess it might be done with Tylo's plugin, but he didn't do it so I think perhaps it's not that easy. You know, moving through a combo box, where the order of items is not defined...
@r6d2 - you might want to fix your sig :) "There is no much you..."
You mean it should say "not"? English is not my native language, so if there's a grammar error please let me know.
pacohaas
25th October 2003, 06:23
Originally posted by r6d2
You mean it should say "not"? English is not my native language, so if there's a grammar error please let me know. yup, should be "not"
Holomatrix
25th October 2003, 14:11
Yep, maybe in a future release of D2Sroba, no problem.
And yes, should read NOT :)
bilu
29th October 2003, 18:35
Guys,
Take a look here:
http://neuron2.net/ipw-web/bulletin/bb/viewtopic.php?t=216
It works better than Decomb IVTC on video parts of hybrid encodings.
But guess what: it doesn't look that nice but it has no stuttering over the film parts too!
I've tried it over FILM and got what I could describe as the best auto-ivtc so far :)
Best regards,
Bilu
kru
2nd November 2003, 17:15
I have tried to encode some high motions interlaced films. I know it is difficult to get good quality, but here is a script that seems to improve the quality :cool: :
[AVISYNTH_MA Interlaced]
0=nf=0
1=SeparateFields()
2=UnDot()
3=BicubicResize(^TargetWidth-(^Edge*2),^TargetHeight/2,0,0.6)
4=MergeChroma(Blur(1.5))
5=MergeLuma(Blur(0.1)) # use only if the video won't get too blurry!
6=STMedianFilter(4,32,0,0)
7=SwitchThreshold = (Width<=352) ? 4 : (Width<=480) ? 3 : 2
8=even=SelectEven().ScriptClip("nf=YDifferenceToNext()"+chr(13)+"nf>=SwitchThreshold?unfilter(-(fmin(round(nf)*2,100)),-(fmin(round(nf)*2,100))):TemporalSoften(fmin(round(2/nf),6),round(1/nf),round(3/nf),0,2)")
9=odd=SelectOdd().ScriptClip("nf=YDifferenceToNext()"+chr(13)+"nf>=SwitchThreshold?unfilter(-(fmin(round(nf)*2,100)),-(fmin(round(nf)*2,100))):TemporalSoften(fmin(round(2/nf),6),round(1/nf),round(3/nf),0,2)")
10=Interleave(even,odd)
11=Weave()
12=AddBorders(^Edge,^BorderTop,^Edge,^BorderBottom)
13=Limiter()
14=function fmin(int f1, int f2) { return (f1<f2) ? f1 : f2 }
^Edge=16
The only bad thing with the script is that the resizer is very bad.
So, is it possible to use FACAR to resize it?
r6d2
2nd November 2003, 18:03
Originally posted by kru
The only bad thing with the script is that the resizer is very bad.
So, is it possible to use FACAR to resize it?
Well, it would require some tweaking, since you are separating fields and resizing separately and then interleaving.
Besides, remember FACAR uses the regular resizers from AviSynth... So if Bicubic is bad for this, I don't know if using other resizer will look better to your eyes. You may replace the resizer in your script and check if that improves the output.
DDogg
2nd November 2003, 19:50
kru, I just glanced at this, but off the top of my head why not try the interlacedresize that is in simpleresize? It only works in yuy2, so to leave it in its present position you would need a:
converttoyuy2(interlaced=true)
interlacedresize(480,480)
#addborders (x,x)
converttoYV12(interlaced=true)
Else you could move the resize down to the end (which might be more proper) of your routine and just do the converttoyuy2()
As an alternative, you might want to evaluate something like this:
(untested)
#Presents as TFF
Import("G:\convert60ito24p.avs")
mpeg2source("D:\interlaced.d2v").DoubleWeave.SelectOdd
jdl_UnfoldFieldsVertical(flip=true)#jdl_util.avsi from Stickboy (http://www.avisynth.org/~stickboy/)
#Whatever filters
jdl_FoldFieldsVertical(flip=true)
Converttoyuy2(interlaced=true).InterlacedResize(x,x)
tylo
3rd November 2003, 13:36
Is it possible for FACAR to autochange the FACAR DetectBorders to FACAR in the Frameserver TAB once the border detection and auto fill in is done?
I'd do it if I knew how to. I guess it might be done with Tylo's plugin, but he didn't do it so I think perhaps it's not that easy. You know, moving through a combo box, where the order of items is not defined...Well, RB did it in his AutoFitCD.dll plugin, but that's a different story...
However, the upcoming D2SRoBa 3.0 automatically toggles D2S back to the Frameserver tab after the preview window is closed. (This only happens whenever 'FACAR DetectBorders', or any plugin that modifies AVISYNTH.INI was used). Then it should be easy to (remember to) change it back to the 'FACAR' script.
PS: AutoIt3 supports modifying GUI controls in apps (e.g the Avisynth setup ListBox), so it may even be possible to also do the changing back to FACAR from D2SRoBa 3, but I won't look into that now.
syzygytec
10th November 2003, 02:39
Just tried this script for the first time.
A couple of points and questions
I have been using AutoFitCD for quite sometime.
Today I encoded the exact same movie as yesterday, today I used FACAR instead of AutofitCD, not other changes.
Today's encode took 1:15 longer, and I see some artifacts that were not present in yesterdays job.
I am wondering if the slow down and artifacts can be attributed to simple resize versus Bicubic resize.
As far as Im concerned with my linited understanding and from what I may have read here all I have done is used a different cropping method and different resize filter correct?
I'd like to know if it's OK to use Bicubic with the FACAR script, exactly how to edit the script for this and someones opinions on it.
There are things I like about both encodes, but overall I like the AutFitCD far better, my main reason for changing was because I came to believe from reading on gerdi's topic that FITCD does not accurately crop.
r6d2
10th November 2003, 03:55
Originally posted by syzygytec
As far as Im concerned with my linited understanding and from what I may have read here all I have done is used a different cropping method and different resize filter correct?
As per the information you provided, yes, but these decisions have collateral effects (see below).
I'd like to know if it's OK to use Bicubic with the FACAR script, exactly how to edit the script for this and someones opinions on it.
It's absolutely OK to use the resizer of your choice with FACAR. You just set the ResizeMethod variable to 1-4 and you're set. My personal opinion on a resizer for SVCDs, if you're interested, can be found here (http://www.geocities.com/r6d2_stuff/IdiotsGuide/IdiotsGuide.htm#_Toc53234278). Of course it's just my opinion, and it is an open issue. An interesting discussion on the topic was held on this (http://forum.doom9.org/showthread.php?s=&threadid=63691&highlight=Resizing) thread. There's a blind test also on this (http://forum.doom9.org/showthread.php?s=&postid=390440&highlight=OK+this+is+the+Pepsi+Challenge#post390440) post you might try.
There are things I like about both encodes, but overall I like the AutFitCD far better, my main reason for changing was because I came to believe from reading on gerdi's topic that FITCD does not accurately crop.
FitCD crops correctly. It sometimes gets confused because it iterates, and some border conditions may be misleading. In my experience, these cases are rare though, and loading the source again gets it right. (The old principle of Turn off then back on).
The only case I know where FitCD always fails is in 528x480 output frame size, but otherwise it is a very good resizer tool.
What gerti67 pointed out, and might have had you thinking, is that in DVD2SVCD, 704-based frame sizes (VCD, CVD) are not cropped correctly, and this is true, although I guess noticeable only to the trained eye (a little more than 2% aspect ratio error on NTSC).
FACAR's main purpose is to operate on "As seen on TV" mode, where you get the same cropping the original DVD has when played on a 4:3 TV, and you save the overscan bitrate consumption. FACAR does not zoom out or zoom in.
You can get also get the same result as in FACAR with FitCD by cropping manually, but it turns out to be cumbersome. FACAR completely automates this task.
There are some cases, however, where you might want to zoom out indeed. For instance, typically with some 720x480 anamorphic movies where the standalones crop the DVD source too much (and of course FACAR does the same), giving you almost a 4:3 full screen picture.
On these cases I use FitCD since by setting overscan=3 I get almost the whole film pixel on the viewable area of my 4:3 TV, as if it was encoded with a letterboxed AR.
But which tool to use is a matter of taste. Both crop and resize correctly.
Today's encode took 1:15 longer, and I see some artifacts that were not present in yesterdays job.
I am wondering if the slow down and artifacts can be attributed to simple resize versus Bicubic resize.
Resizers have different impact on detail retention and speed. Also, speed is influenced by the amount of film pixel you encode. If you zoom out in FitCD, you retain more film pixel, but also your encodeable picture is smaller, thus faster to encode.
Also, if you kept the number of media used in both encodes (same output size), a bigger film pixel encode will have less available bitrate, producing more artifacts.
But if you compare two clips resized with FACAR (unzoomed) and FitCD (zoomed), both with the same quantization, you should not notice any quality difference or strange artifacts on either clip.
I hope I did not put more confusion on you ;)
syzygytec
10th November 2003, 05:04
Looks like I have so reading and learning to do. The speed in my second encode didn't bother me any the picture size is a bit bigger cropped by FACAR over AutoFit CD which I like as I guess for now I'm going to blame simple resize for what I don't like.
Could someone please show me the changes in this to use bicubic resize .6 like I used in AutofitCD?
[AVISYNTH_FACAR]
0=ResizeTo=^ResizeTo. global ResizeMethod=^ResizeMethod. DebugMode=^DebugMode
1=GammaCorrection=^GammaCorrection. Hue=^Hue. Saturation=^Saturation. Brightness=^Brightness. Contrast=^Contrast
2=DetectedTop=^DetectedTop. DetectedHeight=^DetectedHeight
3=OverscanH=^OverscanH. OverscanV=^OverscanV. BlockOptimization=^BlockOptimization. AsoTV=^AsoTV
4=global Bicubic_b_Value=^b_value. global Bicubic_c_Value=^c_value
5=DestinationWidth=^TargetWidth
6=DestinationHeight=^TargetHeight
7=LoadPlugin(!SimpleResize.dll)
8=# Import(!PreResize.avs)
9=Import(!FACAR.avs)
10=# Import(!PostResize.avs)
^ResizeTo.=0
^ResizeMethod.=1
^DebugMode=0
^GammaCorrection.=1.0
^Hue.=0
^Saturation.=1.0
^Brightness.=0
^Contrast=1.0
^DetectedTop.=0
^DetectedHeight=0
^OverscanH.=0.04
^OverscanV.=0.04
^BlockOptimization.=0
^AsoTV=1
^b_value.=0
^c_value=0.6
!SimpleResize.dll=C:\DVD2SVCD\Avisynth2.5 Plugins\SimpleResize\SimpleResize.dll
!FACAR.avs=C:\DVD2SVCD\Avisynth2.5 Plugins\FACAR\FACAR.avs
!PreResize.avs=C:\DVD2SVCD\Avisynth2.5 Plugins\FACAR\PreResize.avs
!PostResize.avs=C:\DVD2SVCD\Avisynth2.5 Plugins\FACAR\PostResize.avs
Thankyou
r6d2
10th November 2003, 13:02
Originally posted by syzygytec
Could someone please show me the changes in this to use bicubic resize .6 like I used in AutofitCD?
The script is already using [0, 0.6] values for Bicubic. And if you want to change them, you don't need to modify the script. Just the variables of your current run in DVD2SVCD.
Please take a look at the FACAR Readme, which includes gerti67's original readme, on how to do that.
syzygytec
10th November 2003, 18:35
I have read everything you have suggested and then some others pages offshot from those.
I have read the documentation of the script by gerdi in the FACAR ReadMe.
I think I was incorrect in referring to simple resize before as a resize method. The script uses Bilinear by default, simpleresize is the filter used?
Do all of the four resize methods use simpleresize.dll or is some of it internal avisyth umm routines?
I'm actually really confused now. My main point in starting this discussion was because I thought maybe the resize method was the reason behind not being nearly as happy
with my encode of the same movie using FACAR as I was using AutoFitCD. I want to be as happy with FACAR because I see room in it for easily advancing in the future to more advanced encoding
such as adding some filters.
There is a whole lot I need to learn and understand here about these scripts in general and thier usage before I can feel confident about making any changes.
Besides some of the questions I have asked in this reply, what I have gathered from Gerdi's documentation in the facar readme is the all I need to do is change the resize method to =2
to be using the same resize methed as AutoFitCD? It does not seem right to me as it will still have 7=LoadPlugin(!SimpleResize.dll) in the script, there is nothing like that in the AutoFitCD script.
Im so lost, you said not to be afriad to post questions, I am however because most things here sound like professional debate and discussion as opposed to newbie support.
r6d2
10th November 2003, 20:29
Originally posted by syzygytec
Do all of the four resize methods use simpleresize.dll or is some of it internal avisyth umm routines?
No, ResizeMethod defines which resize to use. The call to simpleresize is just a loading of the library, in case you decide to use it. It is not invoked unless you say so in the ResizeMethod variable.
I want to be as happy with FACAR because I see room in it for easily advancing in the future to more advanced encoding
such as adding some filters.
To compare apples to apples, use the same resizer in both tools. FitCD does not support all resizers but if you used some flavor of bicubic, use the same one in FACAR by setting the variables.
Besides some of the questions I have asked in this reply, what I have gathered from Gerdi's documentation in the facar readme is the all I need to do is change the resize method to =2
Yes, that simple. The defaults for Bicubic values are 0, 0.6.
It does not seem right to me as it will still have 7=LoadPlugin(!SimpleResize.dll) in the script, there is nothing like that in the AutoFitCD script.
As explained above, don't worry about this.
Im so lost, you said not to be afriad to post questions, I am however because most things here sound like professional debate and discussion as opposed to newbie support.
Go ahead! This is the basic forum and your questions are welcome indeed. There are no stupid questions, just stupid answers. :)
You are a good student and I have no doubt you'll be a "pro" if you want to.
DDogg
10th November 2003, 20:56
syzygytec, I just want to make sure you do understand that all these settings are done in the frameserver tab in the small scrolling window under where is says "FACAR". The first line is:
ResizeTo=3 ResizeMethod=2 Debugmode=0 (these settings are what I was using at the time of writing this post)
I am sure this is obvious to you, but after years of being in this forum I learned never to assume.
syzygytec
10th November 2003, 23:43
Yes DDogg I figured that out, I just did a new encode totally different results major actually. I changed to resize method 2 and changed d2sroba to sample 2% down from 5 encode time dropped from 5hr 15min to 3hr 15min. I'm still reviewing and comparing it. If anyone would like offer to review a sample and logs let me know as can up it to my hosting, I've cut a nice 32mb clip.
EDIT
One other difference...today I used RB's progressive template, last encode was with the progressive template as described by DDogg in the roba3 topic, I just now noticed DDogg posted a sticky about this. Im going to have a look and see if its the same as he posted in roba3
DDogg
11th November 2003, 00:20
Same except for the reuse VAF part and some expanded wording.
Oh and BTW, I have found 1% sample works about as good as anything. Sure saves time.
Crackhead
12th November 2003, 21:52
hey there!
i only have pal-dvds and often they are interlaced. so now i wanted to deinterlace with separate fields from the d2s drop-down menu, but then cce comes up with an error message saying "frame size 776x80 is not supported. frame size up to 720x576 is supported".
so now i got the question if it is possible to deinterlace with your facar-script? and if so, how? :D is it actually recommended to deinterlace?
btw tried also to deinterlace with "reduce vertically by 2", same error message!
here's the avisynthscript-fileLoadPlugin("C:\PROGRA~1\DVD2SVCD\AVISYN~1.5PL\Mpeg2dec\MPEG2D~1.DLL")
mpeg2source("D:\SVCD\DVD2AV~1.D2V")
SeparateFields()
SelectEvery(2,0)
ResizeTo=0 global ResizeMethod=1 DebugMode=0
GammaCorrection=1.0 Hue=0 Saturation=1.0 Brightness=0 Contrast=1.0
DetectedTop=4 DetectedHeight=572
OverscanH=0.04 OverscanV=0.04 BlockOptimization=0 AsoTV=1
global Bicubic_b_Value=0 global Bicubic_c_Value=0.6
DestinationWidth=352
DestinationHeight=216
LoadPlugin("C:\Programme\DVD2SVCD\Avisynth2.5 Plugins\SimpleResize\SimpleResize.dll")
# Import("C:\Programme\DVD2SVCD\Avisynth2.5 Plugins\FACAR\qmf15b1.avs")
# Import("C:\Programme\DVD2SVCD\Avisynth2.5 Plugins\FACAR\QMF_functions.avs")
Import("C:\Programme\DVD2SVCD\Avisynth2.5 Plugins\FACAR\PreResize.avs")
Import("C:\Programme\DVD2SVCD\Avisynth2.5 Plugins\FACAR\FACAR.avs")
Import("C:\Programme\DVD2SVCD\Avisynth2.5 Plugins\FACAR\PostResize.avs")
Import("D:\SVCD\ResampleAudio.avs")
ResampleAudio(44100)
ConvertToYUY2()this encode should be with vcd resolution, but also tried it with svcd-resolution!
//add: tried separating fields in preresize.avs, again same error!
syzygytec
13th November 2003, 05:31
I had that same error in fact every time I recovered it was a bit different....trying to remember. I'm trying to help, something got messed up, I did one or all of these 3 things, started over with fresh dvd2svcd.in & SVCD.ini & avisynth.ini (I save oringinal backups of them.(Then reinstall all plugin's ie: Roba Facar, Delete the CCE registry keys, and uninstall-reinstall avisynth.
I'm sure doing all of that will fix it because it did here!
r6d2
13th November 2003, 13:59
Originally posted by Crackhead
so now i got the question if it is possible to deinterlace with your facar-script? and if so, how? :D is it actually recommended to deinterlace?
I've never tried since my DVDs are all NTSC. All the PAL sources I have are progressive.
But try this:
Put SeparateFields() in preresize.avs and Weave() in postresize.avs.
This is not exactly a deinterlacing method, but should resize properly interlaced sources.
Please post your results.
Crackhead
14th November 2003, 14:58
Originally posted by r6d2
Put SeparateFields() in preresize.avs and Weave() in postresize.avs.
This doesn't work either, same error message.
when I play the avisynthscript with zoomplayer, it says:
you cannot use crop to enlarge or 'shift' a clip:
(C:\Programme\DVD2SVCD\Avisynth2.5 Plugins\FACAR\FACAR.avs, line 196)
(D:\SVCD\AviSynth_Script_file.avs, line 14)
:mad: i have no idea what could solve this prob...:angry:
ebcoelho
15th November 2003, 06:22
I had the same problem with my NTSC interlaced sources, I was using avisynth 2.0 with Blendfields in my movies but FACAR use 2.5x and I can't use this function in DVD2SVCD now :(.
I tried to put SeparateFields() in preresize.avs and Weave() in postresize.avs. But DVD2svcd preview says "you cannot use crop to enlarge or 'shift' a clip".
I'm waiting with Crackhead for an idea :(.
r6d2
15th November 2003, 06:27
OK, guys, let's try this.
Please use one of the default resizers from DVD2SVCD (bilinear, for instance). Select the deinterlacer of your choice and encode a short clip. You should check your encode to make sure it is satisfactory with the default resize/interlace.
Then post your AVS script so I can get a grasp on how to implement that if at all possible. As I said before, I don't have PAL interlaced sources to test it myself, so your help would be appreciated.
Crackhead
15th November 2003, 19:42
ok i hope i didn't misunderstand your suggestion! If so, plz tell me!:rolleyes: :D
i encoded one chapter of a movie with bilinear resize in frameserver and deinterlacer separatefields. the avisynth_script looks like this:
LoadPlugin("C:\PROGRA~1\DVD2SVCD\AVISYN~1.5PL\Mpeg2dec\MPEG2D~1.DLL")
mpeg2source("D:\SVCD\DVD2AV~2.D2V")
SeparateFields()
SelectEvery(2,0)
BilinearResize(480,432)
AddBorders(0,72,0,72)
Import("D:\SVCD\ResampleAudio.avs")
ResampleAudio(44100)
ConvertToYUY2()
the resize went fine, the AR was maintained, didn't notice any difference in quality to another test encode without deinterlacing, only the deinterlaced file was 0,5mb smaller than the one without deinterlacing.
hope this helps! feel free to ask for more test encodes with special settings from me, i want to help wherever i am able to!
btw, facar+d2sroba+dvd2vcd is one hell of a combination!! keep up the GREAT work!:thanks:
r6d2
16th November 2003, 02:48
Originally posted by Crackhead
ok i hope i didn't misunderstand your suggestion!
No, you got it quite right! :helpful:
LoadPlugin("C:\PROGRA~1\DVD2SVCD\AVISYN~1.5PL\Mpeg2dec\MPEG2D~1.DLL")
mpeg2source("D:\SVCD\DVD2AV~2.D2V")
SeparateFields()
SelectEvery(2,0)
BilinearResize(480,432)
AddBorders(0,72,0,72)
Import("D:\SVCD\ResampleAudio.avs")
ResampleAudio(44100)
ConvertToYUY2()
OK then. What I see is that deinterlaced seems to work when done completely just before the resize.
Please do one more test for me. Open FACAR.avs with the notepad and before this line:
# --(r6d2)-- Actual resize
insert this:
SeparateFields()
SelectEvery(2,0)
Encode a short clip again, this time with FACAR, but select No deinterlacing in DVD2SVCD.
Tell me if that works.
Crackhead
16th November 2003, 14:53
ok, did it.
first, it encoded fine, no error message anymore!
the result was ok, no noticable difference to the other encodes, but with facar it was about 5mb smaller. :D
i did the same chapter without any filters and bilinear resize!
i am curious whether it is possible to check if the movie is deinterlaced or not. bitrateviewer still shows that it is interlaced, no matter whether it was deinterlaced or not... :confused:
BIG :thanks: to r6d2, i think i will do some more tests to see what's possible with deinterlacing/interlaced material. :cool:
r6d2
16th November 2003, 22:46
Originally posted by Crackhead
first, it encoded fine, no error message anymore!
Glad to hear that.
i am curious whether it is possible to check if the movie is deinterlaced or not.
BR Viewer says that because of the framerate. In general, BR Viewer is not too smart. Take its information with a grain of salt.
You can indeed check the encode to see the interlacing. Use this (http://www.doom9.org/ivtc-tut.htm) guide.
Remember to comment out those lines if you have progressive source.
I might add a deinterlacing option for PAL sources in a future version, for people not having to edit the script.
ebcoelho
20th November 2003, 13:47
I had a NTSC interlaced source and I used this avisynth script:
AVISYNTH SCRIPT:
LoadPlugin("C:\ARQUIV~1\DVD2SVCD\AVISYN~1.5PL\Mpeg2dec\MPEG2D~1.DLL")
LoadPlugin("C:\ARQUIV~1\DVD2SVCD\AVISYN~1.5PL\AVISYN~2.DLL")
LoadPlugin("C:\ARQUIV~1\DVD2SVCD\AVISYN~1.5PL\SimpleResize\SimpleResize.dll")
mpeg2source("C:\ARQUIV~1\DVD2SVCD\Movie\DVD2AV~2.D2V")
ResizeTo=3 global ResizeMethod=2 DebugMode=0
GammaCorrection=1.0 Hue=0 Saturation=1.0 Brightness=0 Contrast=1.0
DetectedTop=0 DetectedHeight=480
OverscanH=0.04 OverscanV=0.04 BlockOptimization=1 AsoTV=1
global Bicubic_b_Value=0 global Bicubic_c_Value=0.6
DestinationWidth=480
DestinationHeight=480
Import("C:\ARQUIV~1\DVD2SVCD\AVISYN~1.5PL\FACAR\PreResize.avs")
ConvertToYUY2(interlaced=true) # this stuff is important?
LoadPlugin("C:\ARQUIV~1\DVD2SVCD\AVISYN~1.5PL\InverseTelecine\Decomb.dll")
FieldDeinterlace()
Import("C:\ARQUIV~1\DVD2SVCD\AVISYN~1.5PL\FACAR\FACAR.avs")
AvisynthSubtitler("C:\ARQUIV~1\DVD2SVCD\Movie\subs\","permsubs.txt")
Import("C:\ARQUIV~1\DVD2SVCD\Movie\ResampleAudio.avs")
ResampleAudio(44100)
or edit on dvd2svcd frameserver the template FACAR:
0=ResizeTo=^ResizeTo. global ResizeMethod=^ResizeMethod. DebugMode=^DebugMode
1=GammaCorrection=^GammaCorrection. Hue=^Hue. Saturation=^Saturation. Brightness=^Brightness. Contrast=^Contrast
2=DetectedTop=^DetectedTop. DetectedHeight=^DetectedHeight
3=OverscanH=^OverscanH. OverscanV=^OverscanV. BlockOptimization=^BlockOptimization. AsoTV=^AsoTV
4=global Bicubic_b_Value=^b_value. global Bicubic_c_Value=^c_value
5=DestinationWidth=^TargetWidth
6=DestinationHeight=^TargetHeight
7=LoadPlugin(!SimpleResize.dll)
8=LoadPlugin(!Decomb.dll)
9=FieldDeinterlace()
10=# Import(!qmf15b1.avs)
11=# Import(!QMF_functions.avs)
12=Import(!PreResize.avs)
13=ConvertToYUY2(interlaced=true) # this stuff is important?
14=Import(!FACAR.avs)
15=# Import(!PostResize.avs)
^ResizeTo.=3
^ResizeMethod.=2
^DebugMode=0
^GammaCorrection.=1.0
^Hue.=0
^Saturation.=1.0
^Brightness.=0
^Contrast=1.0
^DetectedTop.=0
^DetectedHeight=480
^OverscanH.=0.04
^OverscanV.=0.04
^BlockOptimization.=1
^AsoTV=1
^b_value.=0
^c_value=0.6
!SimpleResize.dll=C:\Arquivos de programas\DVD2SVCD\Avisynth2.5 Plugins\SimpleResize\SimpleResize.dll
!Decomb.dll=C:\ARQUIV~1\DVD2SVCD\AVISYN~1.5PL\InverseTelecine\Decomb.dll
!qmf15b1.avs=C:\Arquivos de programas\DVD2SVCD\Avisynth2.5 Plugins\FACAR\qmf15b1.avs
!QMF_functions.avs=C:\Arquivos de programas\DVD2SVCD\Avisynth2.5 Plugins\FACAR\QMF_functions.avs
!PreResize.avs=C:\Arquivos de programas\DVD2SVCD\Avisynth2.5 Plugins\FACAR\PreResize.avs
!FACAR.avs=C:\Arquivos de programas\DVD2SVCD\Avisynth2.5 Plugins\FACAR\FACAR.avs
:)
What are the important options for FieldDeinterlace?
FieldDeinterlace parameters:
- FieldDeinterlace(full, threshold, dthreshold, blend, chroma, debug). The default parameters correspond to FieldDeinterlace(full=false, threshold=15, dthreshold=9, blend=true, chroma=false, debug=false) or simply FieldDeinterlace().
- full (true/false) selects whether to process all frames or only frames that have been detected as being combed. The default is full=false which will only treat frames detected as being combed.
- threshold (0-255), dthreshold (0-255), blend (true/false), chroma (true/false) and debug (true/false) correspond to the respective functions in telecide.
Thanks :)
windtrader
9th December 2003, 20:08
At the risk of sounding like an idiot:
Is there any benefit of using FACAR if I use DVD2SVCD in DVD-DVD mode and play back the movies via a PC(RGB) based display device (CRT Front Projector)that is calibrated to display the full 720x480 picture?
I installed FACAR while using this great guide http://www.geocities.com/syzygydvd/help/index.htm to configure DS2RoBa with DVD2DVD.
I ran a test using the defaults and it narrowed the sides of the movie, leaving black bars so I went back and changed the overscan to 0. After running this test, the picture was full then I had one of those "duh" moments and figured out I was not using FACAR for its primary purpose. I figured I would go ahead and ask if there might be other less obvious advantages to include FACAR in my DVD reencoding process.
r6d2
9th December 2003, 20:53
Originally posted by windtrader
At the risk of sounding like an idiot:
The only stupid question is the one you keep to yourself because you're affraid to ask. ;)
Is there any benefit of using FACAR if I use DVD2SVCD in DVD-DVD mode and play back the movies via a PC(RGB) based display device (CRT Front Projector)that is calibrated to display the full 720x480 picture?
Even though FACAR is mainly oriented at eliminating overscan, yes, there are.
Even when you only crop the top and botton black bars, you save a significant amount of resizing area. When encoding to smaller frame sizes, this significantly reduces the time used by the resizing stage.
When encoding DVD2DVD (keeping frame size), resizing is neutral, so it will not be done and no overhead is saved (or produced).
However, if you encode the uncropped source straight with the original black bars, artifacts may appear in the black zone, and the black bars may end up being not so "black". Hard to notice, but noticeable at last. There is a thread showing that visually but I don't have the pointer at hand.
Keep in mind that if just one pixel gets grayed by a color conversion or other artifact, a full macroblock will be suboptimal and thus wasting bitrate.
FACAR also optimizes the macroblocks (at least one of the top and bottom borders), which provides some saving in bitrate, leaving more to increase the quality.
Besides that, FACAR provides some filtering capabilities which allow you to tune your encode.
Bottom line is, you lose nothing when using FACAR with DVD output, and you gain flexibility.
windtrader
10th December 2003, 00:55
Thanks.
However, if you encode the uncropped source straight with the original black bars, artifacts may appear in the black zone, and the black bars may end up being not so "black". Hard to notice, but noticeable at last. There is a thread showing that visually but I don't have the pointer at hand.
Great, now I'll start watching and analyzing the black bars too. I'll be committed if this gets out. :)
manolito
21st December 2003, 18:34
Sometimes those real widescreen 2.35:1 Cinemascope films look just too flimsy on a regular 4:3 TV set. You give up more than half of your screen real estate which makes the movie look very distant. If you convert these films to 1.85:1 you will lose some movie information from the outer edges, but in many cases the movie will look much better, because it seems with this "zooming in" the emotional impact is a lot higher.
In the D2S FAQ at http://forum.doom9.org/showthread.php?s=&threadid=21859 you can find a method to do this conversion, but this only works with the standard D2S resizer scripts. In a previous post r6d2 explained how you can do the same thing with FitCD, but he also said that he is not ready to implement this into FACAR.
I thought of implementing this "4:3" mode in FACAR, as it was one of gerti67's ideas on the ToDo, but I didn't because IMHO, it sucks.
I do agree with r6d2 that converting a 1.85:1 film to 4:3 does not make much sense in most cases, but converting 2.35:1 to 1.85:1 is not a bad idea at all IMHO.
Anyway, I could have used the method from the D2S FAQ or FitCD, but somehow I have become a real FACAR addict. All the scripts in my AVISYNTH.INI have been modified to work with the latest FACAR, so I really wanted to make this conversion work with FACAR. I first thought I would just modify FACAR.AVS to implement this thing, but after trying to analyze it I quickly decided not to mess with it. (I am not a "real" programmer after all) :o
What I came up with is just a two line quick and dirty script which can be imported into the D2S FACAR script just before FACAR.AVS. It automatically determines if the output is PAL or NTSC (stolen from FACAR.AVS) and changes the DestinationHeight variable accordingly. The clip is cropped with the appropriate values before turning over control to FACAR.
This method only works with anamorphic sources. Supported target resolutions are SVCD, CVD and DVD. VCD definitely does not work.
Usage:
Paste the two lines into an editor and save it as "235to185.avs" to your FACAR folder.
235to185.avs
------------------------------------------------------------------------------------------------
DestinationHeight = (DestinationHeight % 288 == 0) || (DestinationHeight % 216 == 0) ? 576 : 480
Crop(90,0,540,DestinationHeight)
------------------------------------------------------------------------------------------------
Start DVD2SVCD, go to the Frameserver tab and select the FACAR script. Click "Edit Avisynth script" and insert the following line just before the "Import(!FACAR.avs) line:
11=# Import(!235to185.avs)
Click OK, then scroll down to the "Import" line you just inserted and enter the correct path to "235to185.avs". Close DVD2SVCD to save the changes you just made.
To activate the conversion all you have to do is to uncomment the "Import" line for 235to185.avs.
Of course it would be much more elegant if this method was implemented right into FACAR. Maybe if some forum members find this useful r6d2 might change his mind ??? :cool:
Cheers
manolito
r6d2
22nd December 2003, 17:06
Thanks, manolito. I'll try your stuff and see if it fits easily into FACAR, but not now because I'm finishing some projects and have little spare time.
Holomatrix
22nd December 2003, 17:48
I would second that request :) I too really hate those 2.35:1 films.
manolito
22nd December 2003, 18:41
I would really appreciate if some people tried this little script with various sources and gave me some feedback if it works in all cases. I only own one NTSC DVD, all the rest is anamorphic PAL, so I cannot be totally sure if the PAL/NTSC detection works all the time.
@r6d2
If you find the time it would be very nice of you to review the logic of the method. I only change the value for "DestinationHeight" and let FACAR do its thing afterwards. I am not messing with "NewDestinationHeight" at all, so I am not sure if my script really keeps the correct aspect ratio. The encodes I did with it look OK though.
r6d2
4th February 2004, 16:39
Hi, guys,
Just a note to tell you I found an irritating bug in FACAR. It only affects Anamorphic movies which have a high "height". The OverscanH crops too much in ASOTV mode (the default). I'll fix it ASAP, but wanted to warn you anyway.
Workaround: set OverscanH to 0 for the time being when source is Anamorphic and detected height is above 448 (in NTSC).
r6d2
8th February 2004, 23:36
New features/fixes:
# v1.06.7
# - Added corrected aspect ratio in preview mode for PAL (now both NTSC and PAL supported).
# - Fixed OverscanH bug of cropping too much top&bottom on "high" anamorphic movies (DetectedHeight > 448 in NTSC).
# - Changed default values for Overscan to 5%.
P.S.: I've not forgotten the 2.35/1.85 thing. Not working on it right now but I'll keep you all posted.
homerjay
9th February 2004, 17:12
ive been quiet for a while but got to say thanks for all your continued improvements to this excellent plugin :)
manolito
9th February 2004, 22:29
Thanks r6d2, version 1.06.7 works perfectly.
I wouldn't bother about integrating the 2.35 to 1.85 conversion thing into FACAR. There probably are not too many people who actually need it, and then it already works quite well as it is. Installation is far from elegant, but you only have to do it once. What concerns me a lot more is that it raises your Q by about 85%, so CVD resolution and/or heavy filtering (or more blanks) are required.
r6d2
9th February 2004, 23:15
Originally posted by manolito
What concerns me a lot more is that it raises your Q by about 85%, so CVD resolution and/or heavy filtering (or more blanks) are required.
Well, it does increase the Q of course, since there is more film pixel to encode.
On another topic, I've been doing some tests lately with the ResizeTo variable. I set it to 6 for 704x480 (so it keeps almost all the source). Surprisingly enough, this increases the sharpness a lot and does not significantly increase the Q, provided you use KISS.
But I'll post some results on this soon. It may be a better way to increase quality than just lowering the Q.
r6d2
14th February 2004, 17:34
It would be very helpful if some PAL users could post their results with the PAL aspect ratio feature, since I don't have PAL sources to test it very much.
puddy
16th February 2004, 03:31
First, thanks for the work you put into this. :)
My source is captured NTSC at 29.97 352x480, Interlaced, AVI with Huffy.
I want my output to be NTSC 29.97 352x480 Interlaced MPEG2 (exactly
the same) except I want the overscan removed.
But, I can't seem to make this happen. I mean, the overscan gets removed, but the video is stretched like silly putty from left to right. Smack down the middle the video is the same. As it moves to the left and right it is streched.
Here's 3 screen shots of a test clip:
1. Original AVI as viewed in Vdub.
http://stuff.wso.net/images/max/max_orig.jpg
2. Converted FACAR MPEG as viewed in VdubMod.
http://stuff.wso.net/images/max/max_facar.jpg
3. This is how I'd like the end result to look.
http://stuff.wso.net/images/max/max_desired.jpg
My goal is to capture VHS video and burn it to DVD as
half size DVD spec (CVD size). I've done it many times
already but I wanted to squeeze a little more out and
thought taking out the overscan would be good.
Oh, forgot to post my settings/logs which produced #2 above:
--------------------------------------------------------
- 2/15/2004 8:13:16 PM
- AVI to SVCD Conversion
- AVI2DVD ver. 1.2.1 build 3
--------------------------------------------------------
Initializing
- E:\max_manners1.avi
Initializing finished.
--------------------------------------------------------
- 2/15/2004 8:13:18 PM
- Free on drive D: 11880.66 mb
- AUDIO Extraction
--------------------------------------------------------
Audio extraction finished.
--------------------------------------------------------
- 2/15/2004 8:13:27 PM
- Free on drive D: 11864.15 mb
- AUDIO conversion
--------------------------------------------------------
--------------------------------------------------------
- 2/15/2004 8:13:28 PM
- Free on drive D: 11864.15 mb
- AUDIO conversion
--------------------------------------------------------
Encoding Audio. Filename: D:\DVD2SVCD\audio\Extracted_audio_1.wav
Executing BeSweet. Commandline:
"C:\Program Files\DVD2SVCD\BeSweet\BeSweet.exe" -core( -input "D:\DVD2SVCD\audio\Extracted_audio_1.wav" -output "D:\DVD2SVCD\audio\Encoded_audio_1.mp2"
-logfile "D:\DVD2SVCD\audio\Encoded_audio_1.log" ) -ota( -g max -r 29971 29970 ) -shibatch( --rate 48000 ) -2lame( -e -b 192 -m s )
Audio conversion of D:\DVD2SVCD\audio\Extracted_audio_1.wav finished.
Audio conversion finished.
--------------------------------------------------------
- 2/15/2004 8:13:40 PM
- Free on drive D: 11862.08 mb
- Video Encoding using Cinema Craft
--------------------------------------------------------
Executing Cinema Craft Encoder.
StreamSectors: 4651455788
AudioSectors: 2363508
VideoPAPO: 72016920
ScanOffsetBytes: 4052
SeqAligningBytes: 257495
DVDBytes: 0
VideoEndHeader: 4
SubtitleSectors: 0
EmptySectors: 238.00
PictureSectors: 0.00
PureMPEGStream: 4576813809.17
Seconds: 97.12
CalcMPEGStream: 4576813809.17
Frames: 2701
CDSize: 4450.00
Number of CDs: 1
Cut point 4446.00
Variable Settings:
Frames: 2701
Anti Noise Filter: Off
Passes: 4
Image Quality: 10
VAF file creation: On
Video Encoding Mode: One Pass VBR
Q. Factor: 5
Min. bitrate: 2000
Max. bitrate: 7200
Aspect Ratio: 4:3 (No borders, encoded as 4:3)
---AVS Begin---
LoadPlugin("C:\PROGRA~1\DVD2SVCD\AVISYN~1.5PL\Mpeg2dec\MPEG2D~1.DLL")
AVISource("E:\MAX_MA~1.AVI",False)
ConvertToYUY2(interlaced=true)
AssumeFPS(29.970,True)
ResizeTo=0 global ResizeMethod=4 DebugMode=0
GammaCorrection=1.0 Hue=0 Saturation=1.0 Brightness=0 Contrast=1.0
DetectedTop=0 DetectedHeight=480
OverscanH=0.04 OverscanV=0.04 BlockOptimization=0 AsoTV=1
global Bicubic_b_Value=0 global Bicubic_c_Value=0.6
DestinationWidth=352
DestinationHeight=480
DestinationTop=0
DestinationBottom=0
LoadPlugin("C:\Program Files\DVD2SVCD\Avisynth2.5 Plugins\SimpleResize\SimpleResize.dll")
# Import("C:\Program Files\DVD2SVCD\Avisynth2.5 Plugins\FACAR\qmf15b1.avs")
# Import("C:\Program Files\DVD2SVCD\Avisynth2.5 Plugins\FACAR\QMF_functions.avs")
# Import("C:\Program Files\DVD2SVCD\Avisynth2.5 Plugins\FACAR\PreResize.avs")
Import("C:\Program Files\DVD2SVCD\Avisynth2.5 Plugins\FACAR\FACAR.avs")
# Import("C:\Program Files\DVD2SVCD\Avisynth2.5 Plugins\FACAR\PostResize.avs")
----AVS End----
Closing program
CCE Max Speed: 1.580
Video Encoding finished.
--------------------------------------------------------
- 2/15/2004 8:15:23 PM
- Free on drive D: 11771.63 mb
- Converting Pictures from ES to PS
--------------------------------------------------------
Saving bbMPEG settings: C:\Program Files\DVD2SVCD\bbMPEG\default.ini
--------------------------------------------------------
- 2/15/2004 8:15:26 PM
- Free on drive D: 11771.63 mb
- Converting Pictures from ES to PS
--------------------------------------------------------
Saving bbMPEG settings: C:\Program Files\DVD2SVCD\bbMPEG\default.ini
--------------------------------------------------------
- 2/15/2004 8:15:28 PM
- Free on drive D: 11771.63 mb
- Converting Pictures from ES to PS
--------------------------------------------------------
Saving bbMPEG settings: C:\Program Files\DVD2SVCD\bbMPEG\default.ini
--------------------------------------------------------
- 2/15/2004 8:15:31 PM
- Free on drive D: 11771.63 mb
- Multiplexing and cutting
--------------------------------------------------------
Saving bbMPEG settings: C:\Program Files\DVD2SVCD\bbMPEG\default.ini
Offset in Seconds: 0
Executing bbMPEG.
Variable Settings:
Cut point: 4446 mb
Executing RunbbMPEG. Commandline:
"C:\Program Files\DVD2SVCD\bbMPEG\RunbbMPEG.exe" "D:\DVD2SVCD\muxed\bbMPEG_Muxed_File.mpg"
Multiplexing and cutting finished.
Image creation finished.
--------------------------------------------------------
- 2/15/2004 8:15:47 PM
- Free on drive D: 11678.10 mb
- Conversion done!
--------------------------------------------------------
Thanks!
puddy
r6d2
16th February 2004, 03:48
@puddy,
On its current form, FACAR is only good for DVD sources, sorry.
However, eliminating overscan for a source like yours should be easy. Try adding this line to your AVS script in DVD2SVCD (remember to select CVD output):
Letterbox (http://www.avisynth.org/index.php?page=Letterbox)(16,16,16,16)
This will eliminate 2 blocks of overscan on each side, and top and bottom, which is more or less what FACAR would do.
puddy
16th February 2004, 17:45
Thanks! I'll probably use Letterbox(8,8,8,8) since my resolution is half that of DVD. 16 will show black around the edges, just slightly, on a Sony WEGA at 352x480.
Thanks again!
puddy
r6d2
16th February 2004, 18:33
Originally posted by puddy
16 will show black around the edges, just slightly, on a Sony WEGA at 352x480.If you want to measure the overscan of a NTSC TV you might want to try Overscan 1.1 (http://www.geocities.com/r6d2_stuff/). In most TVs overscan is 4-6%, so 2 blocks each side should be OK IMHO for CVD, but the best thing it to measure it. Good luck!
lordkinbote
19th March 2004, 01:21
In an attempt to clarify my FACAR cropping issues I'm giving example measurements of an AVI of a WS TV show I'm about to encode. All of these measurements are from the Preview windows for both FACAR in Debug mode 1 and AutoFitCD. Oh, by the way, I was mistaken in saying the sides/Vertical measurement would go to 432 when going down 2 sizes in AutoFit. 432 is perfect for my TV (it has HUGE overscan), instead going down two sizes brings the Vertical to 416. THAT is too much. I got it to 432 by changing the Blocks TV-Overscan setting to 3 instead of the default 2. Anyway here are the measurements between the two.
The original source AVI's size is 624x352.
In AutoFitCD, with 3 Blocks TV-Overscan and 16 block optimization, it crops to 618x352 and resizes to 432x336.
FACAR has this info in Debug mode 1:
Crop (36,8,552,344)
Resize (432,344)
Borders (24,72,24,64)
If I'm understanding this correctly, according FACAR's cropping, it's cutting off much more from the sides (552 as opposed to 618 with AutoFit). This is why the CBS logo is much closer to the edge of the screen. My goal is to try to set FACAR up so the resulting cropping and resizing are closer to AutoFitCD's results. Changing the overscan V & H settings don't seem to change the results of the cropping, only the transparency overlay and that lines up perfectly with my .03 OverscanH and .05 OverscanV. If you any suggestions, r6d2, that would be great. Thanks.
r6d2
19th March 2004, 02:06
Seems my readme is not good enough after all since it has not transmitted to you FACAR's leit motiv. ;)
You cannot mimic FitCD with FACAR. You can, however, mimic FACAR with FitCD.
FACAR is powerful, but restricted to a single purpose: "As seen on TV" mode. The idea is to have an image exactly equal to what you get to see when using the original DVD. Since the overscan is on an hidded area, FACAR just eliminates that source part to save bitrate for the rest.
If you want to keep more of the source than what you get on the original DVD, FitCD is the way to go. In fact, I recommend FitCD for full screen 16:9 (anamorphic) sources for plain full screen 4:3 sources, since using FACAR you lose a great deal of picture pixel.
Full screen sources (in which by definition DetectedTop=0 and DetectedHeight=480/576), don't really require FACAR functionality. (You see why?)
Now back to the point. You can mimic FACAR with FitCD by letting target height be equal to the source height. There is an arrow pair to do this. Just make sure to set rounding to 2 instead of the typical default of 16.
On FitCD overscan must be set manually or each selected output frame size, though, and it has a limit of 3 blocks per side.
On anamorphic sources, let height be 3/4 the original height of the film pixel. Try it.
If you need help let me know.
lordkinbote
19th March 2004, 06:03
D'oh!
well, I'll use FitCD for WS AVI's then 'cause I do want to keep as much of the actual video picture as possible. I understand, now, that FACAR is used to crop the overscan and use the extra bitrate on what's left, but I guess I had it in my mind that it was resizing more than cropping. It's stuff that I would've missed anyway, I guess, but now it bothers me thinking I missed something. I love FACAR for the fully automated quality because, well, I'm a lazy bastard.:D But, I know it would bother me more to know I'm cropping off the sides. Not dissin' FACAR, just AutoFitCD seems to be more of what I'm looking for.
I don't really understand exactly what you mean by FACAR not being needed if the Height is 480.
windtrader
19th March 2004, 21:55
FACAR is powerful, but restricted to a single purpose: "As seen on TV" mode.
Humm.. I use FACAR all the time but have the overscans set to 0. I thought FACAR would clean up the video that is not fully using the 720x480 NTSC field and resize it to fit the full size. I also thought on any anamorph DVD with an AR greater than 1.78:1, FACAR optimizes the encoding by eliminating any processing in the black bar areas.
So, I figured using it was getting me the DVD frame filled and saving time due to no black bar processing. Am I out in space? :(
lordkinbote
20th March 2004, 00:00
@windtrader
Well, that is my understanding now.
I was hoping that when I cropped and resized to get rid of my overscan, it would do more resizing than cropping. But it seems to crop quite a bit more than AutoFitCD, which does more resizing. This is more to my advantage since I have a large overscan and don't want to permanently get rid of more picture. If and when I get a service manual and get around to adjusting my TV's geography to get rid of the overscan, I will use FACAR again in the same way you do.
r6d2, correct us both if we're wrong about this, please.
r6d2
20th March 2004, 02:15
Well, you both have the general idea, but I'd rather rephrase it to look simpler, if possible.
What FACAR does is to crop only the "visible film pixel", exactly the same that your TV does. This optimizes the encode because the resizer only works with relevant data, this is only the film pixel and not the black bars. This saves a lot of time, the most as the movie is more wide than tall.
Then FACAR adds the black bars to complete the output frame size selected, so the encoder gets the whole picture, but in much less time.
Any statement about FitCD being more resizer-oriented or FACAR being more cropping-oriented is inaccurate. When fed with the same input, both produce the same output and hence the same optimization level.
The only difference is that FACAR does it always the same way, whereas FitCD lets you play with resizing to keep more or less film pixel. FACAR does not since its purpose is, as stated above, to mimic the TV cropping on the original source.
Don't worry, if you set your Overscan to 0, you still get the top/bottom black bar optimization with FACAR.
If still unclear, please just ask.
lordkinbote
20th March 2004, 02:21
That helps me understand a bit more. Some things take a little bit of time to sink in with me.:( It becomes clearer every day.
bobwillis
24th March 2004, 08:42
Hi r6d2,
I have noticed a few occasions where "FACARDetectBorders" has determined that the left hand side of the frame is 2. However, I can see (in the preview window), picture information to the left of the vertical white line in pixels 0 & 1. This is no big deal (2 pixels), but I thought I'd let you know about it.
Regards,
Bob
r6d2
24th March 2004, 12:26
Originally posted by bobwillis
This is no big deal (2 pixels), but I thought I'd let you know about it.I've seen this from time to time. It has something to do with interlaced frames I think. However, width errors are completely irrelevant since the sides cropping is done based on the overscan setting. Don't worry.
If you experience top and bottom errors, you may want to play with the threshold parameter of "FACAR Detect Borders", but then again, width detection it is not really relevant to the output script.
homerjay
25th April 2004, 23:40
hi there have just had to reinstall dvd2svcd etc and noticed an error i didnt use to have in version 1067 as below ( i think i originally installed it to a subfolder of itself so was always using the previous version )
i dont know what "destinationtop" means
e:\dvd2svcd\avisynth2.5 Plugins\Facar\FACAR.avs, line 136
have searched the FACAR.avs file and dont see any other reference to it other than line 136
could you please point me to what im sure is an obvious oversite by me
thanks
edit - knew it was an oversite the FACAR folder and a new avisynth.ini it :o merged with the original and now all sorted :rolleyes: :o
jorel
12th June 2004, 01:06
r6d2,
i don't use tweak. have a way to remove that filter from FACAR? i know that using the defaults in tweak don't change the image but(i think) that if the filter can be removed from the script maybe it can run faster...or is my mistake? it's a newby question of course but i have my doubts.
in the FACAR readme explain about GammaCorrection. is used the built in dvd2avi or the levels from avisynth?...and why GammaCorretion is in 1.0 if the default is 0.0?
i like to use "kiss" filter like that in d2s:
undot()
lanczosresize(.....)
deen()
using "kiss" in FACAR,where i put this filters using the same sequence like i posted? means undot before resize and deen after resize.
thanks in advance! :)
r6d2
12th June 2004, 02:03
Originally posted by jorel
i don't use tweak. have a way to remove that filter from FACAR?I don't think that eliminating that script line will improve speed. Anyway, you're welcome to try. Just open FACAR.avs and comment out this line:
((Hue <> 0) [...]) ? Tweak(Hue, Saturation, Brightness, Contrast) : NOP()by prepending a '#'.
in the FACAR readme explain about GammaCorrection. is used the built in dvd2avi or the levels from avisynth?...and why GammaCorretion is in 1.0 if the default is 0.0?AviSynth, and actually the default behaviour of the Levels functions is to do nothing if GammaCorrection is 1, not 0. You can check that here (http://www.avisynth.org/index.php?page=Levels). In other words, don't worry. Levels will only be invoked if you change the GammaCorrection value to other thing than 1.0
i like to use "kiss" filter like that in d2s:
undot()
lanczosresize(.....)
deen()Put Undot() in Preresize.avs and Deen() in Postresize.avs. Then just make sure both lines are uncommented in DVD2SVCD AviSynth script editor.
It is likely that Debug mode won't work if you do this though, but in normal operation it should. Please report back if it doesn't.
jorel
12th June 2004, 02:18
i will report all after tests include the comment in tweak if it turn the script faster.
very clear, thanks for all explanations, recomendations and hints! :)
jorel
12th June 2004, 05:40
r6d2,
like you "preview", don't have differences in quality or time to encode using the " # " eliminating tweak from the script in my sample test ( ~ 01minutes:22seconds vob),...just the same with or without tweak(in default values,of course)!
using Undot() in Preresize.avs and Deen() in Postresize.avs worked like a charm....and :o forgive my "old" question cos i read the FACAR readme "too fast" and without atention(sorry)before ask you and there is very clear about "<iii>. Additional filtering" and with details about kiss "filter".everything is clear in the readme.
thank you very much r6d2, FACAR stills "turbo"! :)
Monkeychops
14th June 2004, 17:53
I've been using FACAR for a couple of encodes and it seems to save me bitrate, but at the risk of sounding stupid, can I ask a couple of questions?
1) My understanding from reading the script is FACAR works out what area of the frame you won't see by examining the overscan. It then chops this portion off and adds a border to keep proper frame size. Correct?
2) If 1) is true, is the advantage on a full height movie coming only from chopping the unseen parts off (no visible borders)?
3) I was interested in seeing just how much of the frame is lost when viewing on TV, but FACAR shows what will be encoded post cropping and overlaying additional lost area to overscan so it's hard to judge what is missing.
I've played with the script a little and come up with the following:
Targetpre = AddBorders(1, 1, 1, 1).bilinearresize(DestinationWidth,DestinationHeight)
# --(r6d2)-- Calculate BlocksToCrop based on Overscan parameters.
# --(r6d2)-- Add the overscan overlay to the given clip in transparency mode
# (Target clip must already be properly cropped, resized and bordered.)
DebugTarget = ConvertToRGB32(Targetpre) # use RBG32 for Layer()
[Additions / changes from original script in RED/ BLACK text shows relative position]
Does this do what I want it to do; ie take the original clip and overlay a border showing everything that will be lost?
Forgive me if it doesn't but I don't know much about Avisynth, but like understand the whole process
r6d2
14th June 2004, 18:33
Well, sort of. But it should be easier than that. What FACAR does is to take Overscan percentages as input parameters and crop out the unseen area, thus saving the BR that it would take to encode the whole original picture frame.
If you would like to see how much is being cropped, use Debug mode (set it to 3, for example) and an overlay margin in blue will be shown along with the cropped picture. Currently there is no way to see how much will be cropped together with the original (uncropped) picture, but it sounds like a good idea. I cannot test you your modifications now but I'll look at them later to see if they add the desired effect.
Monkeychops
14th June 2004, 21:23
Thanks for the reply.
No sweat on checking my alterations; for my own amusement as anything else.
jorel
14th June 2004, 23:12
r6d2,please,take a look in this pictures:
http://img12.imageshack.us/img12/6758/fitcdoverscan1.jpg
http://img18.imageshack.us/img18/3848/fitcdoverscan3.jpg
see that the first picture using fitcd overscan1,show the same as the second picture form fitcd overscan3...same details within the borders without loose parts of the scenes(pictures)
now see that using Facar:
http://img12.imageshack.us/img12/9291/facar1.jpg
see that i'm loosing part of the picture within the borders(the chickens on the left and in the right are loose).what can i do to get the same as from fitcd overscan3 in Facar without loose part of the picture within the borders?
thanks in advance!:)
r6d2
15th June 2004, 02:37
Originally posted by jorel
what can i do to get the same as from fitcd overscan3 in Facar without loose part of the picture within the borders?Well, my friend, you are missing the whole point of using FACAR. If you want to keep all the source pixel, you have to use FitCD Overscan 3 (or whatever value suits you).
FACAR is useful if you want to encode in "As seen on TV" mode.
jorel
15th June 2004, 03:28
is true .
and see my point of view r6d2. what i gain in the right/left using fitcd overscan(1,2 or 3)i loose in the top bottom. compare the size of the top bottom of Facar...have less black bordes and with fitcd overscan have more in top bottom. means that with overscan i don't get real gain and the right/left from Facar the tv(4:3) don't show....resuming my "explanation":
fitcd overscan ---> less black borders in right/left(that are invisible in tv,then are irrelevants) from fitcd overscan and true loose in top/bottom(too big black borders)
you loose more in top/bottom than gain in left/right.
FACAR ---> less black borders in top/bottom with facar(the real gain)and "invisibles" left/right borders in tv!
ps: in the end what someone can think or feel as "loose" using Facar is the "true gain"!
that pictures are some more prooves,only need atention in all details!
i was clear?
big thanks! :)
edited>
r6d2, my good conclusion and personal taste about your great job is posted in the last post of that page and in the first 2 posts in the next page (more will be posted later): http://kvcd.net/forum/viewtopic.php?t=11640&postdays=0&postorder=asc&start=0
manolito
23rd June 2006, 14:39
Anyone still using FACAR? I certainly do for my AVI2DVD conversions. Very convenient for cropping off station logos and playing with different filters and resizers.
AviSynth 2.56 introduced two new resizers: GaussResize and SplineResize. A sharper version of LanczosResize (called Lanczos4Resize) is also included. So I decided to modify FACAR to support Lanczos4Resize and Spline36Resize. If anyone is interested, you can download the modded version at
http://scifi.pages.at/manolito/FACAR/FACAR_Update_1.06.8.zip
ResizeMethod=6 is Lanczos4Resize, ResizeMode=7 is Spline36Resize. The debug modes for previewing the different resizers are also modified to display 6 resizers now instead of 4.
Cheers
manolito
homerjay
3rd July 2006, 20:38
im still using it for the very same purpose :)
is there any significant improvement ?
manolito
10th July 2006, 22:33
is there any significant improvement ?You have to play with the new resizers to find out if the improvements they offer are "significant" for you or not. For my purposes LanczosResize is all I need, but Lanczos4 and Spline36 certainly have their merits. I did not change anything in FACAR itself, I just added the new resizers.
Cheers
manolito
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.