Hello,
Been a lurker here and learned from reading threads for a long time. Thought I had an account, but my computer just had me create a new one.
I have a video capture. I'm going to try to upload a few seconds of video.
The problem: You'll see the video "flashes" a few times during playback and I'm unsure why.
Here is my process.
I have my vcr connected to a Panasonic DMR-ES15 in-line as a kind of video stabilizer, substitute for a time based corrector.
I capture using a USB-Live 2 and I use HuffyUV codec to obtain a lossless .avi capture.
My capture looks decent (to me).
From there, I have this little script I made in AVIsynth. I am self taught, going through the forums here.
I open this script in VirtualDub (or Virtualdub 2) and save the video also using Huffyuv codec.
I was using this script:
SetFilterMTMode("QTGMC",2)
FFMPEGSource2("F:\amarectv310\captures\stvhs1.avi" ,atrack=1)
ConvertToYV12()
AssumeTFF()
QTGMC(Preset="Slower",EdiThreads=3)
BilinearResize(720,540)
Prefetch(1)
this deinterlaced the vhs capture and improved the picture. Sometimes, it worked beautifully. Other times, the audio would get out of sync.
My computer is old, 32 bit operating system.
I realized, I was capturing an AVI, so I adjusted the script as follows. This is the one I used which produced the "flashing" video attached.
Except for the flashing, I'm pleased with the results. But, hoping the group can provide some helpful info to help a newbie out. Thank you.
SetFilterMTMode("QTGMC",2)
AVISource("F:\amarectv310\captures\stvhs1.avi")
ConvertToYV12()
AssumeTFF()
QTGMC(Preset="Slower",EdiThreads=3)
BilinearResize(720,540)
Prefetch(1)
+ Reply to Thread
Results 1 to 19 of 19
-
-
Not related to the issue, but huffyuv is 4:2:2, so ConvertToYV12() should be ConvertToYV12(interlaced=true), otherwise you'll get interlaced chroma downsampling errors
Some of the errors look like frame corruption .
Are you saying that you do not get the flashing issue with FFMpegSource2 , and only with AVISource ?
Are you saying that the out of sync issue only occurs with FFMpegSource2, but not AVISource ?
What version of ffms2 and huffyuv are you using ? Probably old ones if you're using 32bit os
Upload a corresponding sample of the source , maybe it 's a bad capture to begin with (need to rule that out first), or maybe you're using bad/depreciated versions of decoders -
Yes, upload a sample of the raw capture. BTW ConvertToYV12() or better ConvertToYV12(interlaced=true) is not needed prior to QTGMC.
The attached file suffers from frames corruption and line errors inside the frame itself -
Thanks for the above replies. Let me try the suggestions above and I can try to get a sample from the original capture to compare.
No, I have not noticed the flashing issue when using FFMpegSource2.
Thanks again for the responses. -
Attached should be a small sample of my raw capture.
This does not seem to me to display the errors which were present when I ran QTGMC.
I tried running the script by first adding the ConvertToYV12(interlaced=true)
and then tried it.
Then, I tried deleting that line altogether from my script and the error seems to still appear.
If frames are corrupt, do I just need to attempt a new capture?
Once I have the raw capture, my script (at the moment) is thus:
SetFilterMTMode("QTGMC",2)
AVISource("F:\amarectv310\captures\stvhs1.avi")
AssumeTFF()
QTGMC(Preset="Slower",EdiThreads=3)
BilinearResize(720,540)
Prefetch(1) -
Code:
ClearAutoloadDirs() SetFilterMTMode("DEFAULT_MT_MODE", MT_MULTI_INSTANCE) LoadPlugin("I:\Hybrid\64bit\Avisynth\AVISYN~1\LSMASHSource.dll") LoadPlugin("I:\Hybrid\64bit\Avisynth\AVISYN~1\RgTools.dll") LoadPlugin("I:\Hybrid\64bit\Avisynth\AVISYN~1\masktools2.dll") LoadPlugin("I:\Hybrid\64bit\Avisynth\AVISYN~1\mvtools2.dll") LoadPlugin("I:\Hybrid\64bit\Avisynth\AVISYN~1\nnedi3.dll") Import("I:\Hybrid\64bit\Avisynth\avisynthPlugins\mtmodes.avsi") Import("I:\Hybrid\64bit\Avisynth\avisynthPlugins\QTGMC.avsi") Import("I:\Hybrid\64bit\Avisynth\avisynthPlugins\Zs_RF_Shared.avsi") # loading source: C:\Users\Selur\Desktop\sample raw capture stvhs1.avi # color sampling YUY2@8, matrix: bt601, scantyp: top field first, luminance scale: limited LWLibavVideoSource("C:\Users\Selur\Desktop\SAMPLE~1.AVI",cache=false,dr=true,format="YUV422P8", prefer_hw=0) # current resolution: 720x480 # deinterlacing AssumeTFF() QTGMC(Preset="Fast", ediThreads=2) # filtering # scaling to 720x540 Spline36Resize(720,540) # adjust color to YV12 (color matrix: Rec601) ConvertToYV12() # setting output fps to 59.940fps AssumeFPS(60000,1001) PreFetch(16) # output: color sampling YV16@8, matrix: bt601, scantyp: progressive, luminance scale: limited return last
I also would:
a. add SpotLess to remove some of the spots
b. shift the chroma a bit using ShiftChromaSPusers currently on my ignore list: deadrats, Stears555, marcorocchini -
I don't get those bright flashes with QTGMC() and that source sample. Though I don't have a VFW huffyuv decoder installed so I had to use LWlibavVideoSource() instead of AviSource(). I'm also using AviSynth+.
Code:LWLibavVideoSource("sample raw capture stvhs1.avi", cache=false, format="YUY2") AssumeTFF() QTGMC(Preset="Slower",EdiThreads=3) BilinearResize(720,540) Prefetch(1)
-
-
Though, I don't think there's any overlap between the bad portion of the clip in post #1 and the source clip in post #5. So one can't draw any conclusions.
-
Yes, the raw capture starts later than the flashes in first clip...
-
Attached should be a raw capture which includes the same footage.
My AVIsynth is AVIsynth+.
My version of FFMpeg2 appears to be 4.0.2.
This is an older PC running 32 bit OS.
Capturing this basketball footage and I have some VHS tapes wtih tv shows I've been transferring.
When I used the code above with FFMPEGSOURCE2, I had what I thought were some decent results, except from time to time, the audio would get out of sync, particularly near the end of the clip.
I tried changing the script from FFMPEGsource2 to AVIsource as in my first post, and have not (yet) experienced the audio sync issue, but the video contained the flashing.
Maybe it is a problem with my source capture?
If I go back to FFMPegsource2, do I still need to delete the line ConverttoVY12 or converttoVY12 (interlaced=true), or does that only apply to ASIsource script?
Thank you for all the assistance. I hope to get this straighened out and get back to my capture project. -
I see nothing wrong with the clip in post #11. Using the script in your original post (except for adding interlaced=true to ConvertToYV12) shows no flashing.
-
Same here. No flashing. The input is clean, the output is clean.
AviSynth 2.60, QTGMC 3.364, MaskTools2 2.2.23, RgTools 1.0, MVTools 2.7.41, Nnedi3 0_9_4_55, Zs_RF_Shared 1.121
Code:AviSource("10 sec stvhs1 bball 2.avi") AssumeTFF() QTGMC(Preset="Slower",EdiThreads=3) BilinearResize(720,540)
-
You want to capture as YUYV or YUY2. Then compress with huffyuv in 4:2:2 YCbCr (YUYV, YUY2) mode.
With your current setup you are capturing as YV12 (YUV 4:2:0), converting to RGB, huffyuv is then converting the RGB to YUY2, and finally compressing it. So you have two useless lossy conversion between the capture device and the output file. That's a waste of CPU time and a possible cause of dropped frames. But not likely the cause of your QTGMC() problem -- which is most likely a version issue of all the filters used by QTGMC. -
[QUOTE=lollo;2687041]Same here. No flashing. The input is clean, the output is clean.
AviSynth 2.60, QTGMC 3.364, MaskTools2 2.2.23, RgTools 1.0, MVTools 2.7.41, Nnedi3 0_9_4_55, Zs_RF_Shared 1.121
I have been running
AviSynth+, QTGMC 3.383, MaskTools2 2.218, RgTools 0.97, MVTools 2.7.31, Nnedi3 0_9_4_51, Zs_RF_Shared 1.157
I'm going to bring Masktools2, RgTools, MVTools and Nnedi3 up to the versions you have and see if that does the trick.
I also see a few of those have newer versions. I'll try to bring them into line with yours first.
Thank you. -
Resurrecting this post just long enough to say I finally did find my answer.
For future visitors who may stumble across this thread.
I tried all responses and suggestions listed above.
What finally worked for me was using DirectshowSource in my code rather than FFmpegSource2, AVISource or LSMASHSource.
No more "flashing" and my audio seems to have remained in sync when using an .avi source. -
The file from the first post generates the following artifacts in MPC-HC (LAV Decoder). Same in VLC and VirtualDub.
That's why I don't use Huffyuv, but UTVideo.
Similar Threads
-
QTGMC not working properly (AviSynth+)
By JadHC in forum RestorationReplies: 12Last Post: 15th Feb 2023, 17:18 -
QTGMC Avisynth
By juli4561 in forum Video ConversionReplies: 12Last Post: 14th Oct 2020, 17:44 -
Avisynth-QTGMC render gradually slowing down
By camwow13 in forum Newbie / General discussionsReplies: 10Last Post: 14th Jan 2020, 22:11 -
QTGMC/IVTC issues on AVISynth/AvspMod
By Fraugster in forum RestorationReplies: 33Last Post: 7th Aug 2019, 07:55 -
Multithreading QTGMC with AviSynth+
By ZetaStax in forum Video ConversionReplies: 5Last Post: 16th May 2019, 07:23