Log in

View Full Version : Random Rainbow Frames during deinterlacing with QTGMC


Kugelfang
31st May 2015, 17:38
Dear All,

i recently captured all my VHS using Huffyuv as codec. In order to prepare the videos for watching on my PC i want to deinterlace them. After lots of reading i found that QTGMC would be the way to go for me. Therfore i prepared a small script for avisynth which i intent to capture via VirtualDUB as a direct steam copy.



SetMTMode(3, 8)
AVISource("E:\test.avi")
SetMTMode(2)
AssumeTFF()
QTGMC(Preset="slow", EdiThreads=4)


However i encountered a weird behaviour. on some frames I get a strage rainbow discoloration. To make thinks even more strage, if i "Save as avi" the file two consecutive times with identical settings, different frames seem to be affected. Enclosed you can finde screenshots of the identical frame which exhibited the discoluration during the first export but not during the second.

It would be great if someone could help me with this.

8-BaLL
31st May 2015, 20:26
I dont think qtgmc needs assumetff(), i never usr it and results are allways fine. Maybe thats the issue?

Kugelfang
31st May 2015, 21:27
thanks for the reply! I tryed it without it but did but the problem persited

8-BaLL
31st May 2015, 21:44
Then I would try without the MT mode, try in normal mode. Ive often had glitches with the MT mode, thats why I stopped using it. Without MT, everything runs fine, but takes a little longer.

There isnt much left in your script which could cause the glitch, you could probably try LSMASHSource (LWLibavVideoSource) or ffms2 instead of Avisource. Thats about it.

StainlessS
1st June 2015, 00:25
which i intent to capture via VirtualDUB as a direct steam copy

Not sure that is a good idea. Use some lossless codec (eg HuffYUV) via Fast Recompress.

Remove MT, test; remove AssumeTFF, test; Remove QTGMC, test.
Narrow down the cause.
If all thats left is AviSource, then maybe something not quite right with your YUV encode/decoding and/or your direct stream copy usage.

Reel.Deel
1st June 2015, 00:39
@Kugelfang

Is your source video really YUY2? Try adding ConvertToYV12(interlaced=true)* before QTGMC just to see if the problem goes away.

*Due to a bug (http://forum.doom9.org/showthread.php?p=1722501#post1722501), the correct way would be ConvertToYV16(interlaced=true).ConvertToYV12(interlaced=true) but for testing purposes it really shouldn't matter.

Kugelfang
1st June 2015, 08:54
Thanks for your help,

Tha source material is actually an VHS captured via VirtualDub using Huffyuv as a codec and im 100% sure its YUY2.

Using Multitreaded QTGMC either as a direct stream copy or using Huffyuv gives the same results with random discolored frames

Using QTGMC single treaded the problem goes away at expense of a way slower processing time so it indeed seems to be due to the multitreading :-(

@Reel.Deel, ill give it a shot tonight and report back

Boulder
5th June 2015, 18:53
You could also try SetMTMode(5) instead of SetMTMode(3).