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.

Domains: forum.doom9.org / forum.doom9.net / forum.doom9.se

 

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

Reply
 
Thread Tools Search this Thread Display Modes
Old 3rd November 2011, 20:52   #101  |  Link
jmac698
Registered User
 
Join Date: Jan 2006
Posts: 1,869
Some small updates. New sample:
http://screenshotcomparison.com/comparison/91853

Quote:
I'm still working on measuring jitter from 2nd generation tapes, etc.
I'm being mis-understood here, I know most of you can't follow these technical discussions. I should explain that I'm jumping around with a lot of different ideas, most of which have nothing to do with my script or fixing your tapes - but consider them basic research and exploring the issues.

My script *does* work on 2nd generation tapes, it only lines up black borders, the tape has nothing to do with it.
What I was referring to was basic research into technical measurements on 2nd generation tapes. I want to make my own 2nd generation copy and do some measurements on it, that's all.

Last edited by jmac698; 3rd November 2011 at 20:57.
jmac698 is offline   Reply With Quote
Old 12th November 2011, 05:51   #102  |  Link
cherbette
Registered User
 
Join Date: Nov 2011
Posts: 23
I wanted to thank you once again for all of your efforts with this software TBC. So far the results have been pretty stellar so I can't wait to see the final product. Keep up the good work, my friend.
cherbette is offline   Reply With Quote
Old 12th November 2011, 06:30   #103  |  Link
jmac698
Registered User
 
Join Date: Jan 2006
Posts: 1,869
Welcome to the board. Bit of a different community I'm told, but hope you like it.
And your welcome *blush*
I'm working on some plugin stuff now.
jmac698 is offline   Reply With Quote
Old 12th November 2011, 20:34   #104  |  Link
cherbette
Registered User
 
Join Date: Nov 2011
Posts: 23
Awesome! I'm excited for the plugin. If it works on the darker parts of the video as well then you will have officially done what many I have read said couldn't be done...a software TBC.
cherbette is offline   Reply With Quote
Old 13th November 2011, 03:19   #105  |  Link
jmac698
Registered User
 
Join Date: Jan 2006
Posts: 1,869
@sven:
Regarding your line length theory, I did some calculations, but haven't finished analyzing it yet. If you correlate two steps, first of all the mean is length/n, where length is the length of the step. I don't have the rest derived yet.
Sliding the steps against each other forms a pattern, if size=8 over 16 pixels, we have:
x=y=(1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0)
r=1
if size=7 or 9 we have
x=(1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0), y=(1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0) or (1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0)
r=.88
Continuing we have
size
8 1
7/9 .88
6/10 .77
5/11 .67
4/12 .58
3/13 .48
2/14 .38
1/15 .26
0/16 (1/0)
So we have the maximum when edges are aligned and it gets less accurate the further the edges are from each other, also you can't tell sign, that is if the edge is to the left or the right. A simple inspection could tell you probably, like the average on either side.
I still don't see why the lines get bigger, it should be symmetrical. Could be the plugin is stopping at the left edge, but in the video the right edge continues.
jmac698 is offline   Reply With Quote
Old 13th November 2011, 03:37   #106  |  Link
jmac698
Registered User
 
Join Date: Jan 2006
Posts: 1,869
Update: sum(x-xavg)^2=n(1-avg)^2-(n/2-size)/(n/2)
xavg=size/n

This is relevent cause r=sum(x-xavg)(y-yavg)/(sqr(sum(x-xavg)^2)*sqr(sum(y-yavg)^2))
So I have the bottom half of the expression.
jmac698 is offline   Reply With Quote
Old 13th November 2011, 03:46   #107  |  Link
jmac698
Registered User
 
Join Date: Jan 2006
Posts: 1,869
I almost have the answer, but a quick guess is it's something like a/n/(sqr(b/n)*sqr(c/n)) where b+c=n or something like that, anyhow this means I can do a single correlation and compute the exact distance by working backwards, then just gotta find it's sign.

So what we've just discovered is a simple formula to find the edge which is robust to noise, brightness and contrast. It gets very sensitive to noise the farther apart the edges are. I could do two correlations to get the maximum accuracy.
jmac698 is offline   Reply With Quote
Old 16th January 2012, 15:35   #108  |  Link
cherbette
Registered User
 
Join Date: Nov 2011
Posts: 23
Hey Jmac just wanted to see if you had made any progress with this great idea?
cherbette is offline   Reply With Quote
Old 16th January 2012, 23:40   #109  |  Link
jmac698
Registered User
 
Join Date: Jan 2006
Posts: 1,869
Hey Cher,
thanks for asking, it reminds me and also encourages me. In fact I haven't done any video work since xmas, once the festivities took me away from my hobby it wasn't easy getting back. So you never know, I would like to finish these ideas...
jmac698 is offline   Reply With Quote
Old 10th June 2012, 19:12   #110  |  Link
zerowalker
Registered User
 
Join Date: Jul 2011
Posts: 1,121
I can get the Dscaler driver to work With Dscaler, but donīt know how to set it up in Virtualdub;S
Conextant driver, w7 x64.

Anyone knows?
zerowalker is offline   Reply With Quote
Old 23rd June 2012, 00:02   #111  |  Link
NoX1911
Registered User
 
NoX1911's Avatar
 
Join Date: Aug 2003
Location: Germany
Posts: 186
Looking at your screenshot it shows a visible area (52us) of roughly 670x576 pixel with a loss of horizontal information by 704->670 (~34 pixels per line). So technically the scan rate/pixel clock hasn't change noticeably if i see that correctly.

Do you have any informations about that changed parameters (clock rate, hsync, prescale...)? I'm currently looking into patching philips drivers and it would be much easier if i would have some values i can work with.
NoX1911 is offline   Reply With Quote
Old 23rd June 2012, 20:06   #112  |  Link
jmac698
Registered User
 
Join Date: Jan 2006
Posts: 1,869
Modern cards sample SD ntsc & pal at a multiple of 13.5MHz. Modern cards use oversampling of 27MHz or more. As a result, there's actually over 1000 samples per line.
There is a standard for VCRs for jitter to be +-3uS (I believe). In my sample, I used a tweaked card with standard sampling rate, but the registers adjusted to begin active video line earlier, that is less offset from front porch. If you tell me the datasheet for your device, I can suggest which register and value to put there, although if you can make all the timing registers variable then it's easier to experiment.

Hopefully I'll get back to this this year. I'm collecting new equipment to examine it in more detail. I believe I bought a TBC the other day, haven't tested it yet.
jmac698 is offline   Reply With Quote
Old 4th July 2012, 08:25   #113  |  Link
lordsmurf
Registered User
 
lordsmurf's Avatar
 
Join Date: Jan 2003
Posts: 124
I'm wondering if this could be modified to solve whole-frame vertical image jitter. (Not horizontal signal jitter, as this virtual TBC is attempting to resolve.)

What I'd like to see is an if/then/else type dejitter script for videos with jumps in the frame that are only ONE frame long (compared against several before/after framse). Not even frequent bouncing or vibration necessarily, but jumping frames maybe once per second (at most). If whole-frame movement exists, then act. If not, ignore.

Vibration and serious jitter can come later. It's actually less common to be that ruined.

Trying to apply deshake filters is crap because it wants to "correct" vertical pans and movements of large objects. It could be tracked against the head switching noise at the bottom of the frame. In fact, I have a matted widescreen VHS movie, where it jumps, so there's two huge black borders on top/bottom to track against.

I've tried to find a good vertical de-jitter method for probably 10 years now. All create more problems than they solve.

I'd still like to see this virtual TBC fix my fubar Robotech test captures.

.
__________________
Back in town.
If you want my advice, then find me at the DigitalFAQ forum. Glad to assist.
lordsmurf is offline   Reply With Quote
Old 8th July 2012, 07:11   #114  |  Link
jmac698
Registered User
 
Join Date: Jan 2006
Posts: 1,869
Yep, vertical jitter shouldn't be hard to write in script. I'm trying to put my TBC into a plugin, but again, writing plugins is very hard. So I have a new idea for the script to make it a lot faster.
jmac698 is offline   Reply With Quote
Old 11th July 2012, 12:51   #115  |  Link
jmac698
Registered User
 
Join Date: Jan 2006
Posts: 1,869
New Avisynth script
TBC 0.6 by jmac698
Jul 11, 2012

A script to resize each line of the source by a different amount, by searching for black borders. YUV only. Avisynth 2.58+
Usage: see tbc.avs demo
Requirements: dejitter 0.2, findpos 0.1 (included)

0.6: first plugin version

http://www.sendspace.com/file/01u1wc

The quality is no different, but it's a lot faster. Example included.
jmac698 is offline   Reply With Quote
Old 11th July 2012, 13:22   #116  |  Link
Mounir
Registered User
 
Join Date: Nov 2006
Posts: 780
it return an error : unable to Load dejitter.dll , error=0x36b1, any idea ?
Mounir is offline   Reply With Quote
Old 11th July 2012, 13:27   #117  |  Link
jmac698
Registered User
 
Join Date: Jan 2006
Posts: 1,869
Please extract the included plugins and place into your plugins directory.
jitter02.zip -> jitter.dll -> plugins\jitter.dll
findpos01.zip -> findpos.dll -> plugins\findpos.dll

Fun with jitter analysis
Using the download package, try this script instead:
Code:
srcdir="C:\Documents and Settings\me\My Documents\Downloads\filters\tbc\"
src=ImageSource(srcdir+"jittered.jpg").converttoyuy2
thresh=85
#Mark video edges
findpos_h(src, x1=60, x2=0, thresh=thresh)#search for the first bright pixel, starting 48 from left and 0 from right
#test note: (65,0)=92
converttoyv12.histogram(mode="levels")#show distribution of jitter
#histogram(mode="classic")#recreate the jitter with a solid white line
return last
function findpos_h(clip src, int "searchwidth", int "x1", int "x2", int "thresh"){
    searchwidth=default(searchwidth,32)
    x1=default(x1,0)
    x2=default(x2,0)
    l=findpos(src, x1=x1, x2=x1+searchwidth, thresh=thresh)#.crop(0,0,-src.width+2,0)
    r=findpos(src.fliphorizontal, x1=x2, x2=x2+searchwidth, thresh=thresh).crop(0,0,-src.width+2,0)
    stackhorizontal(l,r).pointresize(2,src.height)
    l
    greyscale
}
It shows the distribution of jitter amounts; it looks like a normal distribution! That's good actually, it can help me learn how to limit change per line etc.

In the classic mode, you can see more clearly the jitter in this video, but with an artificial white line.
jmac698 is offline   Reply With Quote
Old 11th July 2012, 15:33   #118  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 11,406
Jmac, hope you remembered to point out that users need VC++ runtimes for 2008 (think thats your version).
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???
StainlessS is offline   Reply With Quote
Old 11th July 2012, 21:29   #119  |  Link
jmac698
Registered User
 
Join Date: Jan 2006
Posts: 1,869
Oh no! The classic "works for the developer only" has bit me! Is there any way to remove this requirement?
jmac698 is offline   Reply With Quote
Old 11th July 2012, 22:20   #120  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 11,406
Quote:
Originally Posted by jmac698 View Post
Is there any way to remove this requirement?
Yes of course there is, use a different compiler.

Just be glad you did not choose 2010 Express.
(A lot, but not all will already have 2008 runtimes).
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???
StainlessS 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 15:16.


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