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.

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Usage

Reply
 
Thread Tools Search this Thread Display Modes
Old 3rd January 2005, 15:31   #1  |  Link
len0x
I'm afraid we've to stop
 
len0x's Avatar
 
Join Date: Mar 2003
Location: Amongst mad people
Posts: 5,398
new version of AutoCrop plugin

Here we go - version 1.2. Change log:

- fixed bug when preview and actual crop values were different
- fixed bug when AR was not properly enforced (rounding errors)
- threshold 0 ensures that no cropping is done unless necessary for AR
- fixed bug when leftAdd and rightAdd parameters were not properly working in YUY2 mode
- wMulfOf and hMultOf cannot be zero now
- wMultOf is relaxed to be mod2 for YV12 (previously mod4)
- added mode=3 which is mode 0 plus mode 2 (cropping and logging at the same time)

Download: http://len0x.leffe.dnsalias.com/autocrop12.zip
__________________
Gordian Knot Family:
Gordian Knot: website, download
Auto Gordian Knot: Website and download, tutorial, FAQ
len0x is offline   Reply With Quote
Old 5th January 2005, 11:12   #2  |  Link
AmiRage
Registered User
 
Join Date: Apr 2002
Posts: 87
Thanks, but ...
Quote:
Forbidden
You don't have permission to access /autocrop12.zip on this server.

Apache/1.3.27 Server at len0x.leffe.dnsalias.com Port 80
AmiRage is offline   Reply With Quote
Old 5th January 2005, 11:42   #3  |  Link
len0x
I'm afraid we've to stop
 
len0x's Avatar
 
Join Date: Mar 2003
Location: Amongst mad people
Posts: 5,398
It is protected via referrers feature, so downloads are only possible via clicking through this forum.
__________________
Gordian Knot Family:
Gordian Knot: website, download
Auto Gordian Knot: Website and download, tutorial, FAQ
len0x is offline   Reply With Quote
Old 24th April 2006, 11:29   #4  |  Link
stealth82
Registered User
 
Join Date: Nov 2005
Posts: 7
A lot of time has passed since the last post...

I would like to use this promising filter to crop, on the fly, my DVDs (or whatever video file) through ffshow + Avisynth.

BTW, it seems doesn't work very well. Strange things happen.

When I use this call, the simpleAutoCrop(), I get this situation:



It seems do not crop (as preview) the frame.

If I click on the ffdshow properties, and I modifiy and resave (with the apply button) the Avisynth call, the preview changes as following screenshot:



So, I try to crop for real the source. I change the AutoCrop call with: AutoCrop(mode=0,aspect=-1) (the aspect parameter should be maintain the original aspect ratio). But the result is very odd; the frame is very little (indicated by the arrow):



Some ideas?

Last edited by stealth82; 24th April 2006 at 11:34.
stealth82 is offline   Reply With Quote
Old 24th April 2006, 23:31   #5  |  Link
neutrogenik
Registered User
 
neutrogenik's Avatar
 
Join Date: Jan 2006
Posts: 91
use this

Code:
AutoCrop(mode=0, threshold=30, samplestartframe=200, sampleendframe=205)
and screenshot me what you got
neutrogenik is offline   Reply With Quote
Old 26th April 2006, 10:07   #6  |  Link
stealth82
Registered User
 
Join Date: Nov 2005
Posts: 7
Quote:
Originally Posted by neutrogenik
and screenshot me what you got
Always strange problems... now I get a frame of a color (it seems a zoom of a particular frame area). In combination with LSF and Lanczos resize an error appears: "line 3; the image is too small" etc...

BTW, I'm start to think that's impossible achieve my goal. In a DVD the frame dimensions change several times and the AutoCrop function don't recognize this (it would be useful a sort of reexecution). So, I get a cutted frame even when not necessary (based on the first "sample").

Thanks anyway.
stealth82 is offline   Reply With Quote
Old 31st December 2006, 18:03   #7  |  Link
Barleyman
Registered User
 
Join Date: Oct 2006
Posts: 204
Dumb question about this plugin.. If you define samples = 50 and give some broad range for start and end frame (say, 7500 and 30000), does autocrop pick randomly 50 frames in that range or just 50 sequential frames in 7500 onwards?
Barleyman is offline   Reply With Quote
Old 31st December 2006, 18:24   #8  |  Link
foxyshadis
ангел смерти
 
foxyshadis's Avatar
 
Join Date: Nov 2004
Location: Lost
Posts: 9,556
It picks 50 frames at equidistant intervals.
foxyshadis is offline   Reply With Quote
Old 19th May 2007, 02:19   #9  |  Link
zambelli
Doom9ing since 2001
 
zambelli's Avatar
 
Join Date: Oct 2001
Location: Seattle, WA, USA
Posts: 2,002
I think there's a bug in the plugin. Even when wMultOf and hMultOf are specified, the plugin will pick top and bottom points which aren't multiples of those numbers. This can be really bad when dealing with YV12 video. For example, regardles of the MultOf values, the filter might still do Crop(6,2,64,128). This will effectively mess up the chroma in a YV12 video.
zambelli is offline   Reply With Quote
Old 19th May 2007, 11:51   #10  |  Link
len0x
I'm afraid we've to stop
 
len0x's Avatar
 
Join Date: Mar 2003
Location: Amongst mad people
Posts: 5,398
I think that would have been noticed ealier if it was a common problem... what's you avisynth script and how do you know it doesn't respect the parameters?
__________________
Gordian Knot Family:
Gordian Knot: website, download
Auto Gordian Knot: Website and download, tutorial, FAQ
len0x is offline   Reply With Quote
Old 19th May 2007, 21:16   #11  |  Link
zambelli
Doom9ing since 2001
 
zambelli's Avatar
 
Join Date: Oct 2001
Location: Seattle, WA, USA
Posts: 2,002
Quote:
Originally Posted by len0x View Post
I think that would have been noticed ealier if it was a common problem... what's you avisynth script and how do you know it doesn't respect the parameters?
AutoCrop(mode=3, wMultOf=16, hMultOf=16, samples=7)

I used the log function to verify that it was cropping on mod2 dimensions. Also, there was chroma ghosting in the cropped video. Converting the video to YUY2 made the chroma problem go away - which would strongly suggest AutoCrop was not respecting mod4 cropping for YV12.
zambelli is offline   Reply With Quote
Old 19th May 2007, 22:02   #12  |  Link
len0x
I'm afraid we've to stop
 
len0x's Avatar
 
Join Date: Mar 2003
Location: Amongst mad people
Posts: 5,398
You should probably re-read what those parameters actually do: "Ensures that the width/height of the cropped clip will be a multiple of the number specified. Use
this to ensure that clip is a valid for whatever codec you are going to compress with." It does NOT ensure the crop itself will be done as mod16 in your case, but just height/width...
__________________
Gordian Knot Family:
Gordian Knot: website, download
Auto Gordian Knot: Website and download, tutorial, FAQ
len0x is offline   Reply With Quote
Old 21st May 2007, 10:39   #13  |  Link
zambelli
Doom9ing since 2001
 
zambelli's Avatar
 
Join Date: Oct 2001
Location: Seattle, WA, USA
Posts: 2,002
Quote:
Originally Posted by len0x View Post
You should probably re-read what those parameters actually do: "Ensures that the width/height of the cropped clip will be a multiple of the number specified. Use
this to ensure that clip is a valid for whatever codec you are going to compress with." It does NOT ensure the crop itself will be done as mod16 in your case, but just height/width...
That doesn't make much sense, IMHO, but more importantly: the plugin should not be cropping YV12 at less than mod4 vertically when the video is interlaced. Since it does not have any way of knowing whether the video is interlaced, it should either have an "interlaced=true" parameter or it should never crop at less than mod4 vertically. From the Avisynth docs for Crop():
Quote:
In order to preserve the data structure of the different colorspaces, the following mods should be used. You will not get an error message if they are not obeyed, but it may create strange artifacts.

In RGB:
width no restriction
height no restriction if video is progressive
height mod-2 if video is interlaced

In YUY2:
width mod-2
height no restriction if video is progressive
height mod-2 if video is interlaced

In YV12:
width mod-2
height mod-2 if video is progressive
height mod-4 if video is interlaced
zambelli is offline   Reply With Quote
Old 21st May 2007, 18:28   #14  |  Link
len0x
I'm afraid we've to stop
 
len0x's Avatar
 
Join Date: Mar 2003
Location: Amongst mad people
Posts: 5,398
That is probably true, but I'm just pointing out that there is no bugs in existing parameter implementation. I didn't write the original plugin, so I can't comment on what was the intended use, but since no one raised this for many years before I'm guessing no one is using it on interlaced material (I always deinterlace before crop)...
__________________
Gordian Knot Family:
Gordian Knot: website, download
Auto Gordian Knot: Website and download, tutorial, FAQ
len0x is offline   Reply With Quote
Old 21st May 2007, 19:34   #15  |  Link
Mtz
Registered User
 
Mtz's Avatar
 
Join Date: Sep 2003
Location: On The Beach
Posts: 714
Quote:
Originally Posted by len0x View Post
(I always deinterlace before crop)...
Hmm... and this was the reason why you didn't implement "keep interlaced" in AutoGK? I asked you that some time ago in the AutoGK thread, and you responded something like: "... usefull feature..."

enjoy,
Mtz
Mtz is offline   Reply With Quote
Old 22nd May 2007, 19:32   #16  |  Link
len0x
I'm afraid we've to stop
 
len0x's Avatar
 
Join Date: Mar 2003
Location: Amongst mad people
Posts: 5,398
Frankly I don't understand the question and not only the question itself, but logic behind it...
__________________
Gordian Knot Family:
Gordian Knot: website, download
Auto Gordian Knot: Website and download, tutorial, FAQ
len0x is offline   Reply With Quote
Old 29th May 2007, 11:13   #17  |  Link
zambelli
Doom9ing since 2001
 
zambelli's Avatar
 
Join Date: Oct 2001
Location: Seattle, WA, USA
Posts: 2,002
Quote:
Originally Posted by len0x View Post
That is probably true, but I'm just pointing out that there is no bugs in existing parameter implementation. I didn't write the original plugin, so I can't comment on what was the intended use, but since no one raised this for many years before I'm guessing no one is using it on interlaced material (I always deinterlace before crop)...
Fine, it's not in the parameters perhaps, but it is in the implementation. YV12 interlaced is not being handled correctly. I'm not saying YOU should fix it. But I am saying it's there if somebody cares enough to fix it.
zambelli is offline   Reply With Quote
Old 19th October 2007, 10:50   #18  |  Link
smok3
brontosaurusrex
 
smok3's Avatar
 
Join Date: Oct 2001
Posts: 2,392
if my original is LB 4:3 and my target is PAR 1:1..., is there a way to automate the resizing after the autocrop? (like max y=somey, max x= somex, do something nice with that..)
smok3 is offline   Reply With Quote
Old 13th April 2008, 21:10   #19  |  Link
morphinapg
ASXGui Developer
 
morphinapg's Avatar
 
Join Date: Sep 2007
Posts: 248
I'm having a problem, some videos can't be auto cropped because they aren't YUY2 or YV12, so I add ConverttoYV12() to the script before autocrop and it hangs whenever I open the AVS in any program.

Last edited by morphinapg; 13th April 2008 at 21:15.
morphinapg is offline   Reply With Quote
Old 14th April 2008, 07:20   #20  |  Link
buzzqw
HDConvertToX author
 
Join Date: Nov 2003
Location: Cesena,Italy
Posts: 6,552
a simple workaround for not yv12 file could be this

Code:
movie = directshowsource("myfile.mkv",fps=25.000000,convertfps=true,audio=false)
movie = isRGB(movie) ? ConvertToYV12(movie,interlaced=true) : movie
movie = isYUY2(movie) ? ConvertToYV12(movie,interlaced=true) : movie
in that way your movie will be sure yv12

BHH
__________________
HDConvertToX: your tool for BD backup
MultiX264: The quick gui for x264
AutoMen: The Mencoder GUI
AutoWebM: supporting WebM/VP8
buzzqw is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 11:25.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.