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 Development

Reply
 
Thread Tools Search this Thread Display Modes
Old 30th May 2005, 20:18   #1  |  Link
dinstun
dinston wannabe
 
Join Date: Dec 2004
Posts: 6
New filter for some jumpy vhs captures

This is a filter which might be used to stabilize some "jumpy" video sources. This was written for a specific problem I was having with a DV capture of a VHS source (actually a 6 year old SVHS-ET at EP speed). The VHS source was a recording of an interlaced 30fps NTSC broadcast (a football game). Throughout the video the odd-numbered lines would sporadically "jump" up or down, shifting vertically by one line in the interlaced field.

The filter attempts to correct this by examining the last few (10) lines of each interlaced frame, and finding the "end of signal" of the even and the odd lines, and deciding whether to "fix" the frame based on these two positions. The "fix" is to shift all odd lines up or down by one line in the field.

Maybe there is a better or easier way to do this already in existence, but I couldn't find it (if there is, let me know). Possibly this filter could be the start of a sort of software TBC, since that is what I think it is doing, although I don't really know the technical details of what hardware TBC does.

The filter takes three integer parameters (after the clip parameter):

fix: 0-fix, 1-don't fix

mark: 0-no mark, 1-color the two "end of signal" pixels with: green at even lines, yellow at odd lines of good frames, red at odd lines of bad/fixed frames.

debug: 0-no debug, 1-report "end of signal" positions on bad frames with OutputDebugString, 2-report position on all frames.

Here is an example "good" frame, left side is result of DeJump(0,1,0), right side DeJump(1,1,0). The bottom 10 lines are magnified. Since this is a good frame, no fix was made: http://www.frontiernet.net/~sbyrne/252444.png

The next frame is bad. You can see the original frame on the left, the fixed frame on the right: http://www.frontiernet.net/~sbyrne/252445.png

This is just a start. I believe it likely that some "good" frames will be "fixed" incorrectly, so be careful. Some refinements could be made to the filter to better determine good/bad frames.

A word of warning: the filter depends entirely on a fairly consistent pattern of what I call "end of signal" at the bottom of the frame, as you can see in the example frames. I don't know if these result from the broadcast or the vhs recording, and I don't know how common they are, maybe someone could explain. If these are not present, the filter will not work.
Attached Files
File Type: zip DeJump100.zip (23.8 KB, 650 views)

Last edited by dinstun; 30th May 2005 at 20:52. Reason: disclaimer
dinstun is offline   Reply With Quote
Old 30th May 2005, 20:31   #2  |  Link
scharfis_brain
brainless
 
scharfis_brain's Avatar
 
Join Date: Mar 2003
Location: Germany
Posts: 3,648
WOW!

I need to try this, next time I do some VHS capping, because my SAA-based card does this dynamical field swapping all aver the time.

Some VHS tapes are THAT bad, that there are some seconds of continuous field swapped content.

This solution worked pretty well with film content (progressive):
http://forum.doom9.org/showthread.ph...ghlight=SAA%2A
__________________
Don't forget the 'c'!

Don't PM me for technical support, please.

Last edited by scharfis_brain; 31st May 2005 at 04:46.
scharfis_brain is offline   Reply With Quote
Old 30th May 2005, 23:50   #3  |  Link
Revgen
Registered User
 
Join Date: Sep 2004
Location: Near LA, California, USA
Posts: 1,545
Is this like a software based TBC(time base corrector)?
Revgen is offline   Reply With Quote
Old 31st May 2005, 01:25   #4  |  Link
Backwoods
ReMember
 
Backwoods's Avatar
 
Join Date: Nov 2003
Posts: 416
I have just the tape to test this with. Need some approval on the file.
Backwoods is offline   Reply With Quote
Old 31st May 2005, 02:46   #5  |  Link
dinstun
dinston wannabe
 
Join Date: Dec 2004
Posts: 6
Quote:
Originally Posted by Revgen
Is this like a software based TBC(time base corrector)?
Ummm, I'm not sure. As I understand TBC, this is small step
in that direction, for particular types of sources. Maybe
someone with TBC experience could answer this.
dinstun is offline   Reply With Quote
Old 31st May 2005, 23:59   #6  |  Link
Backwoods
ReMember
 
Backwoods's Avatar
 
Join Date: Nov 2003
Posts: 416
Can we get a mod to approve the attachment please?
Backwoods is offline   Reply With Quote
Old 1st June 2005, 16:53   #7  |  Link
Revgen
Registered User
 
Join Date: Sep 2004
Location: Near LA, California, USA
Posts: 1,545
Dinstun,

Take a look at this site.

This guy seems to be a TBC expert. He even has some homebrew UV mask filters for download. Hopefully he'd be willing to help.
Revgen is offline   Reply With Quote
Old 2nd June 2005, 02:10   #8  |  Link
dinstun
dinston wannabe
 
Join Date: Dec 2004
Posts: 6
Revgen,
thanks for the link. Wow, that guy has designed his own hardware TBC! The link on his page to more tbc info is broken. The correct link is: http://www.questronix.com.au/info/info_tbc.htm
I'm trying to soak in all the info, I might get ideas about my filter. However, they're talking about hardware. The "mask" you refer to is for making a circuit board. An AviSynth filter will have the disadvantage of not having the vertical sync signal, which doesn't exist in a video file. There may, however, be enough residual clues to make some repairs.
dinstun is offline   Reply With Quote
Old 2nd June 2005, 15:17   #9  |  Link
Revgen
Registered User
 
Join Date: Sep 2004
Location: Near LA, California, USA
Posts: 1,545
Here's another idea that you might be able to use.

Dscaler has a feature called JutterTerminator which is sort of a pseudo TBC. Dscaler is an open source project so it could turn out to be useful.
Revgen 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 00:00.


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