View Full Version : Deinterlacing causing ghosting
Jonaldinho
4th December 2015, 13:46
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:
AssumeTFF
QTGMC( Preset="slower", FPSDivisor=2 )
Here is a sample of the video:
https://www.dropbox.com/s/nc13lqholcflu8w/The%20Glo%20Friends%20Save%20Christmas%20Sample.avi?dl=0
Does anybody know the correct way to deinterlace this video without ghosting?
ajk
4th December 2015, 14:01
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() (http://avisynth.nl/index.php/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).
Jonaldinho
4th December 2015, 14:58
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?:
AssumeTFF
QTGMC( Preset="slower")
srestore()
Edit: I'll crop after deinterlacing but before srestore.
ajk
4th December 2015, 23:48
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.
manono
5th December 2015, 09:28
...or should I just try?:
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.
Jonaldinho
6th December 2015, 12:48
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 :eek: 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.
StainlessS
6th December 2015, 13:42
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
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.
Jonaldinho
7th December 2015, 03:10
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
8th December 2015, 14:37
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?
LemMotlow
8th December 2015, 16:54
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.
manono
8th December 2015, 20:27
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.
Jonaldinho
9th December 2015, 23:26
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.
LemMotlow
9th December 2015, 23:58
[oops. Wrong thread] :rolleyes:
Jonaldinho
10th December 2015, 00:57
Ah I see, i've edited my post sorry
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.