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 30th June 2010, 13:57   #1  |  Link
Music Fan
Registered User
 
Join Date: May 2009
Location: Belgium
Posts: 1,744
Trying to remove flickering from VHS source

Hi,
At first, excuse my bad english.
I copied a bad quality Secam VHS (converted in PAL by my Hauppauge card) and it flickers a lot. I mean that the lines move from right to left and vice versa.
I use avisynth for simple scripts (crop, resize, changefps) but I don't know complicated scripts.
The source is interlaced and I would like to keep it interlaced.
Usually, I use these fonctions when I have to resize an interlaced source (to keep 50 fps) ;
Code:
tdeint(mode=1)
converttoyuy2()
crop()
lanczosresize()
assumetff() 
separatefields()
selectevery(4,0,3)
weave()
I don't know if I have to deinterlace the video if I wanna "deflicker" it.
I also would like to remove a little bit the grain but I don't wan't to obtain a blurred image (if possible).
Anyway, I won't resize it, I will only crop the borders and replace it by new black borders (with "addborders").
Look at this picture, we see well what I mean on the balcony and the window's frame (what is supposed to be vertical !) ;


and with tdeint() ;

Thanks for your help !
Music Fan is offline   Reply With Quote
Old 30th June 2010, 14:32   #2  |  Link
AVIL
Registered User
 
Join Date: Nov 2004
Location: Spain
Posts: 408
Hi,

IMHO this artifacts are "jittering" and you must de-jitter the clip to minimize them. Google to learn about the causes.

There are some avisynths's plugins and scripts to help:

http://avisynth.org/mediawiki/External_filters

but they aren't perfect.

Good luck
AVIL is offline   Reply With Quote
Old 30th June 2010, 14:43   #3  |  Link
2Bdecided
Registered User
 
Join Date: Dec 2002
Location: UK
Posts: 1,673
Wobbly vertical lines are cause by time base errors in the original analogue video signal, typically from unstable VHS. All VHS is somewhat unstable! Tape damage, VCR head problems etc mean that the video signal is temporally unstable; most TVs will happily sync to an unstable signal, but most capture devices assume the signal is stable, and small instabilities move each line of video backwards and forwards relative to its true location.

The problems should be removed by a Time Base Corrector (TBC) - preferably one built-in to the VCR you use to play the tape, or the capture device, or inserted in between. A TBC checks the location of the synchronisation pulses in the analogue video, and resamples the video to make these pulses (and the video line) regular, rather than shifting backwards and forwards in time relative to a steady clock.

Once you've converted the source to digital, it's too late to fix this problem properly - the analogue sync pulses are gone! There is an AVIsynth script that tries to perform TBC based on picture content...
http://avisynth.org/mediawiki/Extern...#Stabilization
...but it's far less effective and reliable than using external hardware.

Take a look at the videohelp.com capturing and restoration forums for more details on the hardware fix for this.

Hope this helps.

Cheers,
David.
2Bdecided is offline   Reply With Quote
Old 30th June 2010, 16:46   #4  |  Link
Terka
Registered User
 
Join Date: Jan 2005
Location: cz
Posts: 704
http://avisynth.org/vcmohan/DeJitter/DeJitter.htm
Terka is offline   Reply With Quote
Old 30th June 2010, 19:12   #5  |  Link
Music Fan
Registered User
 
Join Date: May 2009
Location: Belgium
Posts: 1,744
Thank you guys ! I'm gonna try DeJitter and stabilization filters.
Do I have to deinterlace the video before or can I stabilize an interlaced video ?
Music Fan is offline   Reply With Quote
Old 30th June 2010, 22:25   #6  |  Link
Terka
Registered User
 
Join Date: Jan 2005
Location: cz
Posts: 704
first dejitter, then deinterlace
Terka is offline   Reply With Quote
Old 1st July 2010, 14:16   #7  |  Link
Music Fan
Registered User
 
Join Date: May 2009
Location: Belgium
Posts: 1,744
Thanks.
I tried both orders and I didn't see any difference.
But I should begin to find good settings for DeJitter. For now, it's worse without than with though I tried a lot of values.
I also tried TBC but I can't make it work. I'm lost with this kind of huge scripts !
I could maybe try Stab ;
http://avisynth.org/mediawiki/Stab
Music Fan is offline   Reply With Quote
Old 1st July 2010, 15:48   #8  |  Link
Terka
Registered User
 
Join Date: Jan 2005
Location: cz
Posts: 704
stab deshakes whole picture, its not for what you need now.
Terka is offline   Reply With Quote
Old 1st July 2010, 16:33   #9  |  Link
Music Fan
Registered User
 
Join Date: May 2009
Location: Belgium
Posts: 1,744
Ok, thanks.
Anyway, I have a problem with this script : when I open the script with stab, I have a message saying that I need libfftw3.dll, thus I downloaded it, but I can't register it (dllregisterserver entry point not found).
So I don't know what to do now because DeJitter doesn't improve my video.

edit : I was wrong, I tried with libfftw3.dll in place of fftw3.dll ! I found this dll and now I can open the script with the Stab function, but I have an "avisynth read error : CAVIStreamSynth, unknown system exception ...".
Anyway, as you said, this is not the good function for my video.

Last edited by Music Fan; 1st July 2010 at 17:11.
Music Fan is offline   Reply With Quote
Old 8th July 2010, 10:30   #10  |  Link
Music Fan
Registered User
 
Join Date: May 2009
Location: Belgium
Posts: 1,744
Quote:
Originally Posted by 2Bdecided View Post
The problems should be removed by a Time Base Corrector (TBC) - preferably one built-in to the VCR you use to play the tape, or the capture device, or inserted in between. A TBC checks the location of the synchronisation pulses in the analogue video, and resamples the video to make these pulses (and the video line) regular, rather than shifting backwards and forwards in time relative to a steady clock.

Once you've converted the source to digital, it's too late to fix this problem properly - the analogue sync pulses are gone!
I had an idea, but your last sentence make me doubt.
I was wondering if I could play the digitized video with a dvd player connected to another VCR himself connected to my capture device and retry the capture with a better signal.

Why another VCR ? Because the one I used to play the Secam tape didn't avoid these TBC problems, but my other VCR could maybe do that.

Why don't I read the Secam tape with this other VCR ? Because he can't ! He only reads PAL VHS.

Why don't I insert the second VCR between the first (the Secam player) and the capture device to avoid a re-digitizing of an already digitized video ? Because I guess that the second VCR will not recognize the Secam signal (as he can't play it) and will transform it in black and white (but I'm not sure).

Anyway, if the analogue sync pulses are gone after the first digitizing, I guess that he won't be re-created by the dvd player ! In this case, this idea is not a good one.

There's maybe another solution : I could use my old TV (which recognize Secam signal) between the Secam player and the capture device, assuming it can correct TBC and send the corrected signal on its Peritel output, to do again the capture.

What do you think of it ?

Last edited by Music Fan; 8th July 2010 at 10:41.
Music Fan is offline   Reply With Quote
Old 8th July 2010, 15:03   #11  |  Link
2Bdecided
Registered User
 
Join Date: Dec 2002
Location: UK
Posts: 1,673
Unfortunately none of those solutions will work, for the reasons you've already guessed!

The TV won't TBC the signal before output; the TBC-like effect is produced as it drives the display.

You need a SECAM capable TBC.

I'm wondering if you can use the luma only captured from a PAL machine with TBC, and the chroma captured from a SECAM machine without TBC. You could combine them both in AVIsynth, but there may be problems. You'd need the PAL machine to play the tape and ignore the chroma (maybe it would via S-video luma output) - not add the chroma to the luma (e.g. via composite) as that would just make for a messy noisy monochrome capture.

Cheers,
David.
2Bdecided is offline   Reply With Quote
Old 8th July 2010, 16:48   #12  |  Link
Music Fan
Registered User
 
Join Date: May 2009
Location: Belgium
Posts: 1,744
Outch, not easy at all.
Thanks for the idea.
I will try with my neighbor's standalone dvd-recorder which supports Secam.
Music Fan is offline   Reply With Quote
Old 10th August 2011, 13:37   #13  |  Link
Music Fan
Registered User
 
Join Date: May 2009
Location: Belgium
Posts: 1,744
Hi,
one year later, I still have this video.
Is there a new tool or a trick with avisynth to increase the quality of this video ?
I can give an extract of this video if needed.
Music Fan is offline   Reply With Quote
Old 10th August 2011, 14:31   #14  |  Link
Ghitulescu
Registered User
 
Ghitulescu's Avatar
 
Join Date: Mar 2009
Location: Germany
Posts: 5,769
Can't you get one of these VCRs that converts the SECAM into PAL for output? I know of JVCs but may be other manufacturers as well (probably Thomson, which builds regularly on JVC, and Panasonic). I am not aware of any SECAM TBC (but I don't live in France) so one needs a converter before feeding it into a TBC.

From JVC HR-DVS1MS
__________________
Born in the USB (not USA)
Ghitulescu is offline   Reply With Quote
Old 10th August 2011, 17:17   #15  |  Link
Music Fan
Registered User
 
Join Date: May 2009
Location: Belgium
Posts: 1,744
My Sony VCR plays Secam and let it in Secam but I don't believe it can convert Secam in Pal, there is no conversion's option. And I don't know anybody who has a VCR which can do that.

Quote:
Originally Posted by Ghitulescu View Post
one needs a converter before feeding it into a TBC.
Do you mean an external TBC or the integrated TBC of the VCR used after the conversion in PAL ?
Music Fan is offline   Reply With Quote
Old 10th August 2011, 17:30   #16  |  Link
Ghitulescu
Registered User
 
Ghitulescu's Avatar
 
Join Date: Mar 2009
Location: Germany
Posts: 5,769
That particular model (see the MS, for France SECAM L) has a TBC on-board (see the image). So you don't have to rely on an external one. But if you have a lower/entry level deck, and since there's no TBC for SECAM AFAIK (maybe there are studio/pro ones, but these are expensive and scarce), you have to convert somehow the signal into PAL to feed it into an external TBC (PAL).
I still think that most newer models do have PAL output (towards the end of analog era - around the time when the first digital camcorders have been introduced). Keep searching.

If you do not clean the signal as much as you can in the analog domain, you'll have trouble in the digital one (and sometimes the problems cannot be cured).
__________________
Born in the USB (not USA)
Ghitulescu is offline   Reply With Quote
Old 10th August 2011, 18:15   #17  |  Link
Music Fan
Registered User
 
Join Date: May 2009
Location: Belgium
Posts: 1,744
Yes but avisynth can do much more complex tasks, so I'm astonished that this problem look so hard to solve.

Quote:
I still think that most newer models do have PAL output
Mine is old (12 or 13 years).

Quote:
Keep searching
I'm sure that nobody has it around me, it's very rare in Belgium. It was more common in France.
Music Fan is offline   Reply With Quote
Old 10th August 2011, 18:57   #18  |  Link
Ghitulescu
Registered User
 
Ghitulescu's Avatar
 
Join Date: Mar 2009
Location: Germany
Posts: 5,769
Quote:
Originally Posted by Music Fan View Post
Yes but avisynth can do much more complex tasks, so I'm astonished that this problem look so hard to solve.
It's because it's an analog thing, not a digital one. Once you [wrongly] digitized the material all the "markers" (synch pulses) disappeared and one can only guess how it was done.

One of the big problems is that while you see the picture is wrong, the computer doesn't, they are all pixels to it. People generally tend to forget this simple thing.

If you can't find a TBC, you'll have to deal with this issue in software, and this is relatively hard to do. See also my posts in CAPTURE.
__________________
Born in the USB (not USA)
Ghitulescu is offline   Reply With Quote
Old 10th August 2011, 18:58   #19  |  Link
Ghitulescu
Registered User
 
Ghitulescu's Avatar
 
Join Date: Mar 2009
Location: Germany
Posts: 5,769
Quote:
Originally Posted by Music Fan View Post
I'm sure that nobody has it around me, it's very rare in Belgium. It was more common in France.
Try ebay.fr if the tape is valuable to you.
__________________
Born in the USB (not USA)
Ghitulescu is offline   Reply With Quote
Old 11th August 2011, 16:25   #20  |  Link
Music Fan
Registered User
 
Join Date: May 2009
Location: Belgium
Posts: 1,744
Quote:
Originally Posted by Music Fan View Post
There's maybe another solution : I could use my old TV (which recognize Secam signal) between the Secam player and the capture device, assuming it can correct TBC and send the corrected signal on its Peritel output, to do again the capture.
I finally did something like this : I borrowed my neighbor's standalone dvd-recorder which supports Secam and I made a test with a short extract. The image was more stable but the compression was not very good, even in the best mode (1 hour by dvd).
So I put it between my VCR and my PC, and it stabilized the video.
I record in CBR @ 12 Mbps with my Hauppauge card (in Pal, as the dvd converts Secam in Pal, even when one don't record with the dvd) and it looks better than without the dvd-recorder between player and recorder.
I only have to remove some grain and the borders.

Can I remove grain on an interlaced video ?
I'd like to keep it interlaced (the aim is to put this video on dvd).
Music Fan 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 17:46.


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