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 4th December 2015, 13:46   #1  |  Link
Jonaldinho
Registered User
 
Join Date: Aug 2008
Posts: 49
Deinterlacing causing ghosting

Hi, I've captured a pal VHS tape and I'm trying to deinterlace it but whatever I do results in ghosting in different scenes depending on what method I use.

I've checked the field order by seperating the fields and it appears to be TFF. When I deinterlace TFF I get ghosting for about 10-25 frames and then clean frames for the next 10-25 frames. When I deinerlace BFF I get ghosting and clean frames in the opposite places to TFF.

I've been using:

Code:
AssumeTFF
QTGMC( Preset="slower", FPSDivisor=2 )
Here is a sample of the video:
https://www.dropbox.com/s/nc13lqholc...ample.avi?dl=0

Does anybody know the correct way to deinterlace this video without ghosting?
Jonaldinho is offline   Reply With Quote
Old 4th December 2015, 14:01   #2  |  Link
ajk
Registered User
 
Join Date: Jan 2006
Location: Finland
Posts: 134
Code:
AssumeTFF()
Bob()
The above produces correctly deinterlaced video, so TFF is correct. There are a lot blends, but they are already present in the fields, so it's not because of deinterlacing. You'll need to try and clean it up afterwards with SRestore() or other suitable tools. In some spots it looks like the chroma is also out of sync with the luma, e.g. frame 1060 (after deinterlacing).
ajk is offline   Reply With Quote
Old 4th December 2015, 14:58   #3  |  Link
Jonaldinho
Registered User
 
Join Date: Aug 2008
Posts: 49
Thanks. I'm not sure how it works but I was hoping that because I can get clean frames in opposite segments depending on the field order I deinterlace in then it could be deinterlaced without ghosting. I'll try your suggestion, can you recommend any settings or should I just try?:

Code:
AssumeTFF
QTGMC( Preset="slower")
srestore()
Edit: I'll crop after deinterlacing but before srestore.

Last edited by Jonaldinho; 4th December 2015 at 15:06.
Jonaldinho is offline   Reply With Quote
Old 4th December 2015, 23:48   #4  |  Link
ajk
Registered User
 
Join Date: Jan 2006
Location: Finland
Posts: 134
Sorry, I haven't got an immediate solution... it's probably mangled by some kind of standards conversion process. It may be difficult to undo this, but perhaps someone here can chime in. I tried to determine a pattern in the clean and blended frames, but it's hard to say with this sort of animation.
ajk is offline   Reply With Quote
Old 5th December 2015, 09:28   #5  |  Link
manono
Moderator
 
Join Date: Oct 2001
Location: Hawaii
Posts: 7,406
Quote:
Originally Posted by Jonaldinho View Post
...or should I just try?:

Code:
AssumeTFF
QTGMC( Preset="slower")
srestore()
Yeah, the results, while not perfect, are about the best you can hope for, I think. Make sure the field order is the same for the whole thing as for the sample you supplied. Depending on how it was cut, the field order for a sample is sometimes not the same as that of the source.
manono is offline   Reply With Quote
Old 6th December 2015, 12:48   #6  |  Link
Jonaldinho
Registered User
 
Join Date: Aug 2008
Posts: 49
Thanks, I tested it out on the sample and I was impressed with the results. I'm now encoding the full 22 minute video, it will be finished tonight after 2 days of encoding I started reading about srestore on the forum to understand it better and I noticed that it used to be advised not to use DirectShowSource. Is this still the case? I get an error when I use AVISource.
Jonaldinho is offline   Reply With Quote
Old 6th December 2015, 13:42   #7  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
Quote:
I noticed that it used to be advised not to use DirectShowSource. Is this still the case?
DirectshowSource() is not guaranteed frame accurate (something that would be quite important for eg SRestore) and is usually the very last thing you would want to use.
Two popular source filters are FFMPegSource and L-SMASH Source, I'm a bit awkward and prefer to convert almost everything with exception
of DVD MPEG2 to AVI (a lot less bother than other methods, I find).

Batch file to do as I do
Code:
setlocal

REM Where to Find ffmpeg
set FFMPEG="C:\BIN\ffmpeg.exe"

REM Where to get input file, No terminating Backslash, "." = current directory (ie same as dir .bat file)
set INDIR="."


REM Where to place output file, No terminating Backslash. "." would be same as .bat file
set OUTDIR="D:


FOR %%A IN (*.264 *.vob *.wmv *.mpg *.m2v *.avi *.flv *.mov *.mp4 *.m4v *.RAM *.RM *.mkv *.TS *.y4m *.yuv *.webm) DO (
  %FFMPEG% -i "%INDIR%\%%A" -vcodec utvideo -acodec pcm_s16le "%OUTDIR%\%%~nxA.AVI"

)

Pause
Requires ffmpeg (one from MeGUI should suffice) and as provided expects UT_Video codec.
Converts anything with extensions specified in the 'FOR %%' line to AVI in OUTDIR as UT_Video video and PCM audio.

EDIT: current version ffmpeg supplied with MeGUI seems to have been greatly improved so far as corrupt video tolerance is concerned.
EDIT: MeGUI development 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 ???

Last edited by StainlessS; 7th December 2015 at 12:59.
StainlessS is offline   Reply With Quote
Old 7th December 2015, 03:10   #8  |  Link
Jonaldinho
Registered User
 
Join Date: Aug 2008
Posts: 49
Ok, I use MEGUI but I only knew how to load multiple videos with DirectShow or AviSource but now I've worked out how to load multiple videos with MEGUI's suggested FFVideoSource. Thanks
Jonaldinho is offline   Reply With Quote
Old 8th December 2015, 14:37   #9  |  Link
Jonaldinho
Registered User
 
Join Date: Aug 2008
Posts: 49
I also want to put this video on DVD, I always encode interlaced material as interlaced but I've never dealt with blended frames before, should I just encode interlaced or try and get rid of blended frames?
Jonaldinho is offline   Reply With Quote
Old 8th December 2015, 16:54   #10  |  Link
LemMotlow
Registered User
 
Join Date: Jul 2011
Location: Tennessee, USA
Posts: 266
Quote:
Originally Posted by Jonaldinho View Post
I also want to put this video on DVD, I always encode interlaced material as interlaced but I've never dealt with blended frames before, should I just encode interlaced or try and get rid of blended frames?
sRestore removed dupes and changed the frame rate to 23.976 film speed, which would be correct despite remaining blended fields that can't be fixed. The video would now be progressive and is invalid for DVD at that frame rate. For PAL you can add 2:2 pulldown and encode at 25fps. Or you can do what many do with film-to-PAL, speed up the video to 25 fps. Whether you add pulldown or not, PAL DVD is usually encoded interlaced. Many modern players can handle it as progressive, some might not do it so well.
LemMotlow is offline   Reply With Quote
Old 8th December 2015, 20:27   #11  |  Link
manono
Moderator
 
Join Date: Oct 2001
Location: Hawaii
Posts: 7,406
Or, alternatively, after removing most of the blends and making it progressive, encode as progressive 23.976 and 720x576 followed by using DGPulldown to apply 23.976->25fps pulldown. It'll be valid for PAL DVD.
manono is offline   Reply With Quote
Old 9th December 2015, 23:26   #12  |  Link
Jonaldinho
Registered User
 
Join Date: Aug 2008
Posts: 49
Finished encoding the whole video, definitely an improvement using SRestore thanks for everyones help. I'm thinking i'll go with the pulldown option thank you.

Last edited by Jonaldinho; 10th December 2015 at 00:53.
Jonaldinho is offline   Reply With Quote
Old 9th December 2015, 23:58   #13  |  Link
LemMotlow
Registered User
 
Join Date: Jul 2011
Location: Tennessee, USA
Posts: 266
[oops. Wrong thread]

Last edited by LemMotlow; 10th December 2015 at 00:00.
LemMotlow is offline   Reply With Quote
Old 10th December 2015, 00:57   #14  |  Link
Jonaldinho
Registered User
 
Join Date: Aug 2008
Posts: 49
Ah I see, i've edited my post sorry
Jonaldinho is offline   Reply With Quote
Reply

Tags
avisynth, avisynth deinterlace, deinterlace, field order, ghosting

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 10:03.


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