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 20th October 2011, 14:55   #41  |  Link
sven_x
Registered User
 
Join Date: Oct 2011
Location: Germany
Posts: 39
Just wanted to apply your script to my own source, but I get an error: Invalid arguments to function "YPlaneMin" (GScript line 3 and 8).
sven_x is offline   Reply With Quote
Old 20th October 2011, 15:19   #42  |  Link
jmac698
Registered User
 
Join Date: Jan 2006
Posts: 1,867
It was tested on 2.6a3
I dunno what to say, it works for me.. maybe I should repost.. I actually did edit it some online
jmac698 is offline   Reply With Quote
Old 20th October 2011, 15:41   #43  |  Link
Gavino
Avisynth language lover
 
Join Date: Dec 2007
Location: Spain
Posts: 3,431
Quote:
Originally Posted by sven_x View Post
Just wanted to apply your script to my own source, but I get an error: Invalid arguments to function "YPlaneMin" (GScript line 3 and 8).
You need to use the GRunT version of ScriptClip, which allows run-time functions like YPlaneMin to be called inside a user function.
__________________
GScript and GRunT - complex Avisynth scripting made easier
Gavino is offline   Reply With Quote
Old 20th October 2011, 16:06   #44  |  Link
jmac698
Registered User
 
Join Date: Jan 2006
Posts: 1,867
In other words you need GRunT installed...
jmac698 is offline   Reply With Quote
Old 20th October 2011, 16:10   #45  |  Link
Mounir
Registered User
 
Join Date: Nov 2006
Posts: 773
Error: "compare plane: this filter can only be used within run-time filters" (Gscript line3 ,line8)

tested with avisynth 2.6.0.2 and good filters versions i believe

Last edited by Mounir; 20th October 2011 at 16:16.
Mounir is offline   Reply With Quote
Old 20th October 2011, 16:28   #46  |  Link
jmac698
Registered User
 
Join Date: Jan 2006
Posts: 1,867
I used the version I posted and it works, do you have GRunT installed as well? I think I'll just remove the dependency on Gscript/Grunt...

New comparison
http://screenshotcomparison.com/comparison/88873
This shows lining up with video only. To me it looks like it's worse. So that means my hsync technique does help and the side should look ragged when TBC'd.
jmac698 is offline   Reply With Quote
Old 20th October 2011, 17:16   #47  |  Link
sven_x
Registered User
 
Join Date: Oct 2011
Location: Germany
Posts: 39
@Gavino
Thanks! Works with Avisynth 2.5.8 and GRunT installed.

Quote:
To me it looks like it's worse.
The last 10 lines or so are shifted to the left, but they should'nt. Looking at the source frame you see a black vertical line there in the lower left corner that the algorithm is falsely taking for the left border (indeed it is content of the frame).

If the black inside the line cannot be separated from the black of the border perhaps some plausibility checks must be involved (see this post).

Last edited by sven_x; 20th October 2011 at 17:30.
sven_x is offline   Reply With Quote
Old 20th October 2011, 17:57   #48  |  Link
jmac698
Registered User
 
Join Date: Jan 2006
Posts: 1,867
Aha. There's other differences, but I can't tell which is better. I should run a test signal through. I left detection as a mask just for the purpose of problems like this. The resulting shift mask can just be blurred to reduce sudden changes! The same ideas of limiting it can be turned into a vertical convolution...

How does it look on your sources?
jmac698 is offline   Reply With Quote
Old 20th October 2011, 18:43   #49  |  Link
johnmeyer
Registered User
 
Join Date: Feb 2002
Location: California
Posts: 2,691
I just tried the script, unaltered, on some 720x480 NTSC interlaced footage. The left side is the original footage and the right side is the footage processed by the script. As you can see, it looks like the script is actually producing the very problems it is supposed to eliminate! I didn't alter anything in the script -- just downloaded it and ran it.



Do I need to have the additional information that your capture drivers provide? If so, how do I get that?

Last edited by johnmeyer; 20th October 2011 at 18:44. Reason: Forgot to add the last line.
johnmeyer is offline   Reply With Quote
Old 20th October 2011, 19:42   #50  |  Link
sven_x
Registered User
 
Join Date: Oct 2011
Location: Germany
Posts: 39
@johnmeyer
Did you feed the script with the left input? So there are the borders missing that the script uses to find the transition to the beginning of the "real" line beginning and end. Without borders it cannot estimate anything.

@jmac698
My sources are grabbed with an 15 Euro USB Video Grabber and a fairly good, very old Toshiba VHS recorder. With this setup sync disturbances are rather small. In most cases your script does not find another solution to line up the lines. I can see no differences between source and processed (switching with AvsP through the scripts).
One video is the copy of a copy from a camcorder. This is the only one with some ripple at the border that needs adjustment. The result is better.

In one case the result looks pure: lots of lines out of row that were okay in the source. I have no idea what is causing this. The borders look clear and smooth in the source.
PAL recordings have 576 lines. A part of the algorithm seem to work with 480 lines only.

I have the impression that removing the blur effect (that occurs when merging two frames) requires sub-pixel accuracy (at least 1/2 pixel).

Last edited by sven_x; 21st October 2011 at 17:13.
sven_x is offline   Reply With Quote
Old 21st October 2011, 01:14   #51  |  Link
johnmeyer
Registered User
 
Join Date: Feb 2002
Location: California
Posts: 2,691
Quote:
Originally Posted by sven_x View Post
Did you feed the script with the left input? So there are the borders missing that the script uses to find the transition to the beginning of the "real" line beginning and end. Without borders it cannot estimate anything
OK, here's another one from an ancient LP VHS recording. It definitely has the left & right borders that give the script something to "grab" onto:



I've read through the script, and tried changing both the "thresh" and "searchwidth" parameters, but that didn't fix the problem.

The left border in the original (before) is about ten pixels wide, and the black border on the right is about four pixels.

Here's a link to 2-3 seconds of the footage from which the left snap was taken:

Test File
johnmeyer is offline   Reply With Quote
Old 21st October 2011, 02:09   #52  |  Link
jmac698
Registered User
 
Join Date: Jan 2006
Posts: 1,867
Top post updated. It's up to you to make a mask, try returning mt_binarize(thresh) to see what's going on. AvsPmod is useful to cursor over the black bits and read the Y (luma) value. It was made for a special capture with hsync and/or viewing blacker than black at the borders (with NTSC-J capture).
jmac698 is offline   Reply With Quote
Old 21st October 2011, 15:27   #53  |  Link
Mounir
Registered User
 
Join Date: Nov 2006
Posts: 773
You still haven't explained how to tweak the drivers exactly and capture the HSync, i hope you'll talk about it
Mounir is offline   Reply With Quote
Old 21st October 2011, 16:33   #54  |  Link
jmac698
Registered User
 
Join Date: Jan 2006
Posts: 1,867
It's pretty simple, open virtualdub, select bt8x8 tweaker, move the left border slider to the left.
jmac698 is offline   Reply With Quote
Old 21st October 2011, 17:18   #55  |  Link
sven_x
Registered User
 
Join Date: Oct 2011
Location: Germany
Posts: 39
@johnmeyer
Opening your source screenshot in Photoshop, selecting the inner image area and displaying a histogramm shows, that the image possibly has undergone a levels adjustment. The levels of the inner area lay in the range 0 ... 255 (well, deepest luma is a bit higher), so that searching for a minium might not land in the border area. After a levels adjustment the borders are not in a deeper black.



Nevertheless in one case the script produced also a bad result with my own recordings. That was recorded from TV with a very cheap PAL VHS recorder.

Last edited by sven_x; 21st October 2011 at 17:41.
sven_x is offline   Reply With Quote
Old 21st October 2011, 18:29   #56  |  Link
William.Lemos.BR
Registered User
 
Join Date: Oct 2010
Posts: 18
Iīm trying to use your script but Iīm getting this error message:

"Script error: there is no function named "mt_binarize" ([ScriptClip], line 5)"

I have Masktools v.2a48 installed (also GRunT and GScript). Iīm using Avisinth 2.6.
Iīve looked for a solution, but didnīt find it. Donīt know what to do.
I know probably this is a noobie mistake, but I appreciate if somebody could help me...
William.Lemos.BR is offline   Reply With Quote
Old 21st October 2011, 19:13   #57  |  Link
jmac698
Registered User
 
Join Date: Jan 2006
Posts: 1,867
That doesn't seem a problem with the script itself, but you can try
Code:
colorbars(pixel_type="YV12")
mt_binarize(162)
If that doesn't work on it's own, something's wrong with masktools installation. Try the support thread at http://forum.doom9.org/showthread.php?t=98985&page=23
jmac698 is offline   Reply With Quote
Old 21st October 2011, 19:29   #58  |  Link
William.Lemos.BR
Registered User
 
Join Date: Oct 2010
Posts: 18
It didnīt work. Iīll try the support thread.

Thanks for your reply!
William.Lemos.BR is offline   Reply With Quote
Old 21st October 2011, 19:32   #59  |  Link
jmac698
Registered User
 
Join Date: Jan 2006
Posts: 1,867
@sven, john
I should note that the search stops at the first pixel from the left or from the right, so it stops at the border even if there are black pixels in the picture.
jmac698 is offline   Reply With Quote
Old 21st October 2011, 20:00   #60  |  Link
jmac698
Registered User
 
Join Date: Jan 2006
Posts: 1,867
Since people have asked about it, there's no a preliminary capture guide in the capture forum: How to capture with HSYNC
jmac698 is offline   Reply With Quote
Reply

Tags
tbc

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 09:00.


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