07-03-2022, 08:09 PM
|
|
Free Member
|
|
Join Date: Jun 2022
Location: Vancouver
Posts: 22
Thanked 4 Times in 4 Posts
|
|
I came across a thread about using DeFreq, and the scripts being shown had the source having the fields separated first, then applying DeFreq, then weaving back together, then run through QTGMC for deinterlacing. But if I try that, the fields stay separated. If I comment out the defreq(), they weave back together. But if I enable defreq, they stay separated.
Code:
LoadPlugin("C:\Program Files (x86)\AviSynth\plugins\FFT3DFilter.dll")
AviSource("E:\Day 1\Daytime\Day 1-02.avi")
AssumeTFF()
SeparateFields()
Return DeFreq(fx=10,fy=-11.7,show=0,info=false)
Weave()
QTGMC(Preset="Slower", SourceMatch=3, Lossless=2, MatchEnhance=0.75, TR2=1, Sharpness=0.1)
What am I doing wrong? Is it ok to deinterlace first, then apply defreq?
|
Someday, 12:01 PM
|
|
Ads / Sponsors
|
|
Join Date: ∞
Posts: 42
Thanks: ∞
Thanked 42 Times in 42 Posts
|
|
|
07-04-2022, 12:13 AM
|
|
Premium Member
|
|
Join Date: Jan 2017
Location: USA
Posts: 191
Thanked 90 Times in 64 Posts
|
|
Remove the Return keyword from your script. When you use the return statement, you are saying to exit the script and return the result of what is placed on the same line after the return keyword. So, it does not execute Weave or QTGMC. If you move the return to after Weave, you'd see the full frame result of DeFreq but before QTGMC. If you remove it altogether, you'll see the result of DeFreq and QTGMC combined. return can be handy for debugging a script to see what things look like at a certain point in a script. But ultimately, you don't want a return statement in your finished script. It is generally used when you define functions, where you would place a return statement at the end of the function.
|
07-04-2022, 01:41 AM
|
|
Free Member
|
|
Join Date: Jun 2022
Location: Vancouver
Posts: 22
Thanked 4 Times in 4 Posts
|
|
Quote:
Originally Posted by keaton
Remove the Return keyword from your script. When you use the return statement, you are saying to exit the script and return the result of what is placed on the same line after the return keyword. So, it does not execute Weave or QTGMC. If you move the return to after Weave, you'd see the full frame result of DeFreq but before QTGMC. If you remove it altogether, you'll see the result of DeFreq and QTGMC combined. return can be handy for debugging a script to see what things look like at a certain point in a script. But ultimately, you don't want a return statement in your finished script. It is generally used when you define functions, where you would place a return statement at the end of the function.
|
That did it, thank you very much. Looking back at the example scripts, and I seemed to have combined 2 of them. The first had the Return DeFreq, but also had Weave commented out, but a second script with Weave uncommented, didn't have the Return.
Does defreq need to be applied before deinterlacing though, or can I run QTGMC then apply defreq afterwords?
|
07-04-2022, 10:54 AM
|
|
Free Member
|
|
Join Date: Mar 2013
Location: Italy
Posts: 673
Thanked 189 Times in 163 Posts
|
|
Quote:
Does defreq need to be applied before deinterlacing though, or can I run QTGMC then apply defreq afterwords?
|
Defreq is a spatial only filter, but is designed for a progressive frame, so it must be applied on a "deinterlaced" video.
If you do not want your final video to be deinterlaced you do:
Code:
AssumeTFF()
SeparateFields()
DeFreq(fx=10,fy=-11.7,show=0,info=false)
Weave()
or better (the filter will work with double the data, acting on the full frame rather than on the fields)
Code:
AssumeTFF()
QTGMC(lossless=1)
DeFreq(fx=10,fy=-11.7,show=0,info=false)
AssumeTFF()
SeparateFields()
SelectEvery(4,0,3)
Weave()
If you want your final video to be deinterlaced you simply do:
Code:
AssumeTFF()
QTGMC()
DeFreq(fx=10,fy=-11.7,show=0,info=false)
|
The following users thank lollo2 for this useful post:
bmichaelb (07-04-2022)
|
07-04-2022, 11:20 AM
|
|
Free Member
|
|
Join Date: Jun 2022
Location: Vancouver
Posts: 22
Thanked 4 Times in 4 Posts
|
|
Thanks lollo2. I run deinterlacing overnight, then test with filtering after that, so this way helps a lot. Cheers.
|
07-10-2022, 04:38 AM
|
|
Free Member
|
|
Join Date: Mar 2013
Location: Italy
Posts: 673
Thanked 189 Times in 163 Posts
|
|
As you are going to experiment, I would also try something like the following. It may be more effective because QTGMC() will fix the common problems of deinterlacing and it may be confused by the wrong patterns inside the video because the embedded defect requiring DeFreq(). So we first fix the defect, using a "frame" approach with Defreq, and then we deinterlace. The best solution really depends on the specific case.
Code:
AssumeTFF()
QTGMC(lossless=1) # lossless deinterlacing to build original frame
DeFreq(fx=10,fy=-11.7,show=0,info=false)
AssumeTFF()
SeparateFields()
SelectEvery(4,0,3)
Weave() # back to interlaced video after fixing the defect with DeFreq()
QTGMC() # deinterlacing
|
The following users thank lollo2 for this useful post:
bmichaelb (07-10-2022)
|
07-10-2022, 05:39 AM
|
|
Free Member
|
|
Join Date: Jun 2022
Location: Vancouver
Posts: 22
Thanked 4 Times in 4 Posts
|
|
Thanks lollo2. The electrical interference lines are rolling upwards in the frame, but are at a slight angle, not perfectly horizontal. NeatVideo can remove them, but I found it to lose too much detail in the process, but it was the demo version, and I haven't played around with the settings yet. My project is my copy of Woodstock '99, spanning 30 tapes, for a total of 60 hours of coverage... live during the day, as well as the overnights. So my goal is to capture a few tapes during the day, then deinterlace while I sleep. Once everything's digitized and deinterlaced, I'll then start tackling the filtering. I have 10 more tapes to capture, and I'm only 5 tapes into deinterlacing. Once I've finished the captures, I can deinterlace during the day as well as overnight, so I'm hoping another 2 weeks... or so. :-p I did find that 2 of my tapes have intermittent tearing at the top of the frame, and after inspection, it's the bottom field that's messed up. I then found a script that interpolated the full frame from the good field, then uses qtgmc to reinterlace, so I can then use qtgmc again to deinterlace into 60fps to match the rest of the sources. It actually looks indistinguishable from the original. :-)
Edit: forgot to mention... the interference is only present on 2 tapes. I had 4 Toshiba vcrs going, using 160min tapes, with 15min overlaps, all connected to a 4-way splitter. Unfortunately, I didn't ground the splitter, and the interference was from my roommate vacuuming when I was at work. :-p I'll try your script once I've finished capturing. Cheers.
Last edited by bmichaelb; 07-10-2022 at 06:03 AM.
|
08-22-2023, 05:53 PM
|
|
Free Member
|
|
Join Date: Jun 2022
Location: Vancouver
Posts: 22
Thanked 4 Times in 4 Posts
|
|
Well, 13 months later and I had to restart all over...
I picked up a Panasonic DMR-ES16 (Canadian version of the ES15) off of ebay last week... $140 CAD including shipping, and it actually fixed the tearing at the tops of the 2 problem tapes. But to keep all the footage consistent, I'm running all the tapes through the Panasonic now. I read that the DMR's blow out the whites and blacks, but I haven't noticed it, at least not with this unit. Maybe it's because I'm also adjusting the brightness and contrast of the capture card to compensate.
Another reason I'm redoing it, is because I originally captured in Edit mode on my JVC HR-S7800U, and although NeatVideo cleans it up fairly well, I'm noticing that setting the deck to Normal actually looks better in the end. NeatVideo does an amazing job on some electrical inteference raster lines though, the type that look like / / / / crawling up the screen. So I'm pretty happy with that.
As for the jumpy frames in the one tape, instead of using After Effects, I'm probably going to use Davinci Resolve's Frame Replacer. I'm going to actually purchase it so I can use the benefits of the Neural Engine. Apparently you can even replace entire patches within a bad frame with data from the previous or following frames. We shall see. I have 1 tape that got snagged while ejecting, so now it has ~10 seconds of a pinch line rolling down the screen, looping about 3 times. Hopefully I can repair that with Resolve. NeatVideo reduces the line, but it's still there. We shall see.
|
Similar Threads
|
Thread |
Thread Starter |
Forum |
Replies |
Last Post |
Applying AviSynth filters to capture, FPS cost?
|
sprotte |
Capture, Record, Transfer |
3 |
08-08-2022 03:34 AM |
VirtualDub is unable to see my ATI 600 USB capture card?
|
stevevid |
Capture, Record, Transfer |
8 |
09-12-2018 01:03 PM |
Applying different filters to different parts of the video in VirtualDub
|
naripeddi |
Restore, Filter, Improve Quality |
2 |
03-13-2013 03:22 AM |
Unfolding fields before applying Virtualdub filters
|
unclescoob |
Restore, Filter, Improve Quality |
10 |
10-02-2011 09:18 PM |
VirtualDubMPEG - applying different filters to different sections, color correction
|
unclescoob |
Restore, Filter, Improve Quality |
10 |
09-28-2011 10:05 AM |
All times are GMT -5. The time now is 03:23 AM
|