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. |
3rd November 2002, 06:15 | #1 | Link |
Registered User
Join Date: Oct 2002
Posts: 31
|
New filter: AutoCrop
AutoCrop is a simple AVISynth Filter that automatically crops the black borders from a
clip. It operates in either preview mode where it overlays the recommended cropping information on the existing clip, or cropping mode where it really crops the clip. It can also ensure width and height are multiples of specified numbers so the cropped clip can be passed to the video compressor of your choice without problems. This is the first release of this filter and also my first AviSynth filter, so there may be some problems. Feedback about problems and suggestions for improvements are welcome. It has occurred to me that this filter maybe to simplistic for AviSynth users who are generally a pretty savvy lot but I've decided to release it anyway. Someone might find it useful and I'd like to contribute something back to the AviSynth community whose tools I use regularly. http://www.videofringe.com/autocrop/autocrop.zip |
3rd November 2002, 14:38 | #5 | Link | |
Registered User
Join Date: Oct 2002
Posts: 31
|
Quote:
Rrrough I'll definitely need to do some research into YV12 in the not too distant future. At the moment I know as much about YV12 as did YUY2 a week ago ie. Nothing I'd like to lock down the feature set of AutoCrop first though if possible. |
|
5th November 2002, 07:21 | #7 | Link |
Registered User
Join Date: Oct 2002
Posts: 31
|
AutoCrop updates
I've released version 0.3 which fixes the following problems.
Setting wMultOf=width now behaves correctly. ie. Just letterboxes the clip. Debugging information no longer written to disk. Thanks to Nesti for pointing out these problems. It's available from http://www.videofringe.com/autocrop/autocrop.zip |
11th November 2002, 19:11 | #8 | Link |
Registered User
Join Date: Aug 2002
Posts: 14
|
Great work.
But when i use your autocrop how can i resize in keep "aspect ratio" without know the autocrop value ???. Can you put variable for know the crop value for make a good resize. Sorry for the mistakes. i'm just a french. In french : Beau travail, mais comment peut t'on savoir quels sont les valeurs de l'auto-crop pour pouvoir redimmensionner le fichier vidéo en gardant l'aspect ratio. serait il possible d'implementer des variables pour faire un bon crop. Exemples : AutoCrop(preview=true,hMultOf=4,wMultOf=width) # Resize LanczosResize(AutoCropvalue) If you have have beta version i can test it. byebye.
__________________
My rippack only in french for this moment but i can traduce if you would http://www.ldivx.fr.st |
13th November 2002, 08:48 | #9 | Link |
Registered User
Join Date: Oct 2002
Posts: 31
|
ldivx
If you run AutoCrop with preview=false, then AviSynth will update it's built in width and height variables appropriately. Then you can use a function like the one below to set the new width and have the height calculated to main aspect ratio. Sample Usage: ResizeMaintainAspectWidth(384,"BiCubicResize") That will call BiCubicResize with the width set to 384 and the height set to maintain aspect ratio. function ResizeMaintainAspectWidth(clip c,int newwidth,string resizefn) { nh=floor(eval(string(c.height)+". * "+string(newwidth)+". / "+string(c.width)+".")) return eval(resizefn+"(c,"+string(newwidth)+","+string(nh)+")") } |
14th November 2002, 16:05 | #10 | Link |
MooPolice 1st division
Join Date: Dec 2001
Location: VIlnius,LT
Posts: 448
|
Cropsyx, how would it deal with a movie that has several "widescreen" scenes while the movie itself is 3:4?
Also, if a movie has a "space scene" with very very low luma values in the first minute of a movie? A suggestion: Maybe add "frame range" using which it would detect cropping values and then use them throughout the movie... Also, when it finished detection it is supposed to act like a regular crop. There are Crop() sources. Maybe use that so it would be a bit faster solution.
__________________
___________________MooPolice is watching you!____.o/________ |
14th November 2002, 16:12 | #11 | Link |
Registered User
Join Date: Oct 2002
Posts: 31
|
OUTPinged_
The way the filter works is to sample frames evenly spaced throughout the movie. It then uses the least aggressive crop settings it finds from the frames sampled. This should in theory handle both your possible problem areas. If there is any evidence that it doesn't I'll look into possible alternatives. With regards to speeding up the cropping I need to have a look at the how avisynth does it's cropping. That and aspect ratio's are the two main things I want to finish before a 1.0 release. |
14th November 2002, 16:57 | #12 | Link |
MooPolice 1st division
Join Date: Dec 2001
Location: VIlnius,LT
Posts: 448
|
Can you still implement "manual" crop sample selection? It's not that complex and will be helpfull in "hard" cases(ie dark short clips).
It worked ok on my 2 test files but i am still afraid to use it blindly :-) The reason is, it is one more step for a fully automated and full proof encoding and i really want it to work best, it's a great idea.
__________________
___________________MooPolice is watching you!____.o/________ |
14th November 2002, 16:59 | #13 | Link |
MooPolice 1st division
Join Date: Dec 2001
Location: VIlnius,LT
Posts: 448
|
Erm... more on that:
Can it calculate average brightness for a frame and, if all frames have av. brightness lower than threshold, increase "samples" value and recalc?
__________________
___________________MooPolice is watching you!____.o/________ |
14th November 2002, 17:47 | #14 | Link | |||
Registered User
Join Date: Oct 2002
Posts: 31
|
Quote:
Quote:
I'm sure there will be problems with the way autocrop deals with various sources but until there are concrete examples I think it will be better to add needed features than try to avoid problems no one has encountered. Quote:
|
|||
14th November 2002, 20:44 | #15 | Link |
MooPolice 1st division
Join Date: Dec 2001
Location: VIlnius,LT
Posts: 448
|
Well if you would be able to make it's speed comparable to Crop(), i guess everyone here will use it :-)
Dont know about you guys, but i'm sick inputting crop values for 9999th time :/
__________________
___________________MooPolice is watching you!____.o/________ |
11th December 2002, 07:50 | #19 | Link | |
Registered User
Join Date: Oct 2002
Posts: 31
|
Quote:
probably won't start on it until AviSynth 2.5 is released or is at least at a relatively stable beta level. There will probably be one or two more releases of AutoCrop for YUY before then. I have a few features I'm keen to implement before I tackle YV12. |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|