digitalFAQ.com Forum

digitalFAQ.com Forum (https://www.digitalfaq.com/forum/)
-   Restore, Filter, Improve Quality (https://www.digitalfaq.com/forum/video-restore/)
-   -   Any good Avisynth filters? (https://www.digitalfaq.com/forum/video-restore/10210-good-avisynth-filters.html)

ENunn 12-27-2019 09:52 PM

Any good Avisynth filters?
 
1 Attachment(s)
Been wanting to improve my Avisynth script for VHS tapes because its all over the place.

Currently I've been using a JVC HM-DM30000U outputting S-Video through a DMR-ES15 thats outputting S-Video to the I-O DATA GV-USB2, capturing through Virtualdub or AmarecTV with Windows 10 using the x264vfw codec. Not the best setup in the world but it has been working very well for me.

The avisynth script I usually use is this
Code:

SetFilterMTMode("QTGMC", 4)
 SetFilterMTMode("DEFAULT_MT_MODE", 2)
SetFilterMTMode("AVISource", 4)
 SetMemoryMax(8096)

"AViSource(AVISource("file.avi", atrack=0, pixel_type="YUY2")"
or
"v = AVISource("file.avi", atrack=0, pixel_type="YUY2")
a = FFAudioSourcE("file")
AudioDub(v,a)"

AssumeTFF()
QTGMC(Preset="Slow",  SourceMatch=3, Lossless=2, EdiThreads=6)
Tweak(sat=1.30, cont=1.050)
Sharpen(0.5, MMX=True) (since the 30000u is quite soft)
Crop(l,t,r,b) (depends on the tape but crop is usually always 2 on the top)
Spline64Resize(640,480)
ConverttoYV16()
MergeChroma(aWarpSharp2(depth=30))
SMDegrain()
santiag(strh=-3, strv=3)
ConverttoYUY2()
Unsharp() (wait why am I using unsharp when I can just up the sharpness with the sharpen command lol)
Prefetch(12)
Spline64Resize(x, y) (depends on what res I'm going to be uploading to YouTube at)

As you can probably tell, its a bit of a mess. A screenshot has been attached to show what it looks like though. Anything to, I don't know, optimize it? Make it so where it looks just as "fine" as the last one but not have two color space conversions? Speed it up a little? I can't think of the word right now :laugh:

sanlyn 12-31-2019 09:29 AM

1) You can't use the same Avisynth script for all of your captures. Don't even think about it.
2) You wasted your time capturing to lossy codecs if restoration is what you want.

The video you refer to in your posted jpg is not interlaced. You woudn't use QTGMC on it to begin with. That movie is hard-telecined.

ENunn 12-31-2019 12:08 PM

1 Attachment(s)
Quote:

Originally Posted by sanlyn (Post 65476)
1) You can't use the same Avisynth script for all of your captures. Don't even think about it.

Really? I've been using the same script for everything for a while now, I don't see a problem. :hmm:

Quote:

Originally Posted by sanlyn (Post 65476)
2) You wasted your time capturing to lossy codecs if restoration is what you want.

It's not lossy, I have my settings set to lossless. settings attached.

Quote:

Originally Posted by sanlyn (Post 65476)
The video you refer to in your posted jpg is not interlaced. You woudn't use QTGMC on it to begin with. That movie is hard-telecined.

The screenshot showed an interlaced bumper. And even if it was telecined I don't really like using TFM on VHS caps for some reason. Then again I'm only using the ad breaks on the tape and not the film itself so I don't think it matters.

sanlyn 12-31-2019 10:54 PM

If your captures look like that screen shot in your first post, and you're satisfied with it, and your one-size-fits-all script works to your tastes, there's not much anyone can say. The concept of quality used to be an objective standard, many aspects of which can be can be precisely measured and described. But for many, quality is purely a matter of personal opinion. I'd advise that you don't change anything, ever. Why would you?

As for detailed advice, no one can help with a still image that looks as poor as the one in post #1. If my capture looked like that, I'd be forced to recapture to lossless huffyuv. But suit yourself.

msgohan 01-03-2020 08:57 PM

Quote:

Originally Posted by ENunn (Post 65422)
Currently I've been using a JVC HM-DM30000U outputting S-Video through a DMR-ES15 thats outputting S-Video to the I-O DATA GV-USB2

What's the purpose of the DMR-ES15 passthrough here? My understanding is that your JVC D-VHS does line & frame TBC the same as my JVC HM-DH5U.

ENunn 01-03-2020 09:28 PM

1 Attachment(s)
Quote:

Originally Posted by sanlyn (Post 65492)
If your captures look like that screen shot in your first post, and you're satisfied with it, and your one-size-fits-all script works to your tastes, there's not much anyone can say.

Yeah probably should've posted a video, I̶'̶l̶l̶ ̶g̶e̶t̶ ̶t̶h̶a̶t̶ ̶a̶t̶t̶a̶c̶h̶e̶d̶ ̶i̶n̶ ̶a̶ ̶b̶i̶t̶.̶ ̶P̶o̶s̶t̶e̶d̶ ̶t̶h̶i̶s̶ ̶t̶o̶o̶ ̶e̶a̶r̶l̶y̶ ̶l̶o̶l̶ It's attached. Not the best example, probably should've used an SP mode tape, I'll probably upload that later.

Quote:

Originally Posted by sanlyn (Post 65492)
I'd advise that you don't change anything, ever. Why would you?

I'm not necessarily saying I want to improve the quality, I just kinda want to "optimize" it. I'm doing two color space conversions because some filters don't work with some color spaces. I was just wanting to see if I can do it without having to convert color spaces while keeping the the thing as is. Also it's kinda slow, but I guess thats supposed to be normal?

Quote:

Originally Posted by sanlyn (Post 65492)
As for detailed advice, no one can help with a still image that looks as poor as the one in post #1. If my capture looked like that, I'd be forced to recapture to lossless huffyuv. But suit yourself.

I have my x264fvw set to lossless. I would try other codecs but more space and other garbage.

Quote:

Originally Posted by msgohan (Post 65580)
What's the purpose of the DMR-ES15 passthrough here? My understanding is that your JVC D-VHS does line & frame TBC the same as my JVC HM-DH5U.

Honestly...I have no idea :hmm: I did it incase the VCR added dropped frames in Virtualdub, but I guess I can try going without the recorder.

lordsmurf 01-03-2020 09:48 PM

Quote:

Originally Posted by sanlyn (Post 65476)
1) You can't use the same Avisynth script for all of your captures. Don't even think about it.

Well ... it depends. If you run a very minimal script, just a few lines, with things like chroma shifting, it can be done. Noting that settings per line probably still need adjustment.

I do cringe when people copy/paste script online, and run them without adjustments. :mad4:

The idea of ALL videos using the same script does raise my eyebrow. :huh2:

Quote:

Originally Posted by msgohan (Post 65580)
What's the purpose of the DMR-ES15 passthrough here? My understanding is that your JVC D-VHS does line & frame TBC the same as my JVC HM-DH5U.

Too many people (on sites like VH) keep parroting the false notion that the ES10/15 replaces an external framesync TBC. And it does not. As you know, as you suggested from the post, ES10 has line(ish) TBC(ish) abilities. That ES15 line is negated by usage of VCR (JVC) TBC, as a second line does nothing. Due to weaknesses (as per Macrovision/anti=copy enforcement), it's not a true TBC, and still allows too many errors (artificial or natural) to pass and cause capture/quality problems.

The only use for an ES15 chasing JVC D-VHS is where tearing exists, JVC cannot defeat, so JVC TBC off. ES15 takes over line duty, and then signal should next be passed to full frame sync TBC (DataVideo, Cypress).

Quote:

Originally Posted by ENunn (Post 65582)
I have my x264fvw set to lossless. I would try other codecs but more space and other garbage.

Why x264vfw? It works fine, but Hybrid is much better for the encoding. Hybrid can accept lossless source, run some various Avsiynth or Vapoursynth filters, and export to x264. The only problem is that preview modes are buggy, so filter-test outside Hybrid.

Quote:

Honestly...I have no idea I did it incase the VCR added dropped frames in Virtualdub, but I guess I can try going without the recorder.
Not how how it works. Dropped frames are prevents by actual framesync external TBCs, not something built into VCRs or DVD recorders. As per my above reply to msgohan.

You will get almost always frame drops without TBC. And dropped frames leads to audio sync errors.

ENunn 01-03-2020 10:32 PM

2 Attachment(s)
Quote:

Originally Posted by lordsmurf (Post 65583)
Too many people (on sites like VH) keep parroting the false notion that the ES10/15 replaces an external framesync TBC. And it does not. As you know, as you suggested from the post, ES10 has line(ish) TBC(ish) abilities. That ES15 line is negated by usage of VCR (JVC) TBC, as a second line does nothing. Due to weaknesses (as per Macrovision/anti=copy enforcement), it's not a true TBC, and still allows too many errors (artificial or natural) to pass and cause capture/quality problems.

I agree with you 100%. I've been using it with my old setup (an old Quasar deck with nothing special) before I got my D-VHS deck, and the ES15 did stabilize the signal quite well and I've had no issues transferring complete tapes. But I guess nothing beats a true external TBC :laugh:

Quote:

Originally Posted by lordsmurf (Post 65583)
The only use for an ES15 chasing JVC D-VHS is where tearing exists, JVC cannot defeat, so JVC TBC off. ES15 takes over line duty, and then signal should next be passed to full frame sync TBC (DataVideo, Cypress).

What type of tearing are you talking about? The weird curved ripping at the top of the screen or something else? I can't turn off the TBC on my deck. I can turn off video stabilization though, I can't stand the vertical jitter with it on. Doesn't an external TBC like the DataVideo or Cypress fix that? I would love to get my hands on one of those but they're pretty expensive on the marketplace so I'm just waiting.

I've been doing some tests (and by tests I mean, at the moment, one tape cause I'm currently transferring all these D-VHS tapes I acquired off eBay) with just the VCR (no ES15), and I've had some good luck with 0 dropped frames or audio sync issues so far. Gonna keep testing though. Like I said obviously not the best setup, but it'l do for now.

Quote:

Originally Posted by lordsmurf (Post 65583)
Why x264vfw? It works fine, but Hybrid is much better for the encoding. Hybrid can accept lossless source, run some various Avsiynth or Vapoursynth filters, and export to x264. The only problem is that preview modes are buggy, so filter-test outside Hybrid.

x264vfw is the codec I'm recording my tape transfers to in Virtualdub/Amarec. I just like the lower file sizes and the flags I can set like --tff so I can play it back at 60fps with VLC. Guess I should be using other codecs?

I could never get used to Hybrid for some reason so I've been using Avspmod to do my encodings.

Quote:

Originally Posted by lordsmurf (Post 65583)
Not how how it works. Dropped frames are prevents by actual framesync external TBCs, not something built into VCRs or DVD recorders. As per my above reply to msgohan.

You will get almost always frame drops without TBC. And dropped frames leads to audio sync errors.

ES15 fixed all that for me, and looks like the 30000u without it is working fine, but I haven't 100% concluded on that. Gotta do more tests.

I did find that the 30000u picture quality without the ES15 is much better than with the ES15 though. Updated videos attached. Same script but without the Tweak command.

Sorry I'm not so smart with this stuff. Obviously my setup ain't the best but I'm just going by with what I have for now until I can upgrade.

lordsmurf 01-03-2020 11:21 PM

Quote:

Originally Posted by ENunn (Post 65585)
the ES15 did stabilize the signal quite well

Nope, not the signal. The signal and the image isn't the same. ES10/15 via line TBC(ish) stabilizes/cleans the signal, similar to JVC S-VHS VCR TBC. But different. In some ways, much weaker. In others, stronger, namely tearing correction.

Quote:

What type of tearing are you talking about? The weird curved ripping at the top of the screen
That's it.

Quote:

I can't turn off the TBC on my deck. I can turn off video stabilization though, I can't stand the vertical jitter with it on.
Thus why I'm not a fan of D-VHS decks. That and the fact the non-SP playback is pretty poor, as the units were attuned to retail releases playback, not any kind of recordings.

Quote:

Doesn't an external TBC like the DataVideo or Cypress fix that?
These are framesync external TBCs, and correct the signal. Not the image. (Though all TBCs affect other aspects, so external frame TBCs do somewhat improve image as a byproduct of cleaning the signal.)

Quote:

I would love to get my hands on one of those but they're pretty expensive on the marketplace so I'm just waiting.
Why are you waiting? Availability has gone down, and price gone up, so waiting won't accomplish anything but time to save up funds. If the latter, I can understand.

Quote:

and I've had some good luck with 0 dropped frames or audio sync issues so far. Gonna keep testing though. Like I said obviously not the best setup, but it'l do for now.
What capture card, what software? Some hardware and software simply doesn't report drops, and the capture is still flawed. Your I-O DATA GV-USB2 appears to be an Easycap clone, and problems can/will arise from it.

Quote:

Guess I should be using other codecs?
For capture, yes, lossless. With some specific cards, MPEG with a high bitrate. Capturing direct to a delivery format like H264 has lots of problems, especially with quality. Interlacing and H264 also don't mix well together, so watch-ready copies. HDDs are so cheap now (12tb for under $150 recently), so space shouldn't be a concern. It not like it was 15 years ago, where you could do ONE video at a time, with a "massive" 100gb HDD on "fast" P4.

Quote:

I could never get used to Hybrid for some reason so I've been using Avspmod to do my encodings.
AvsPmod works well. Lossless source, script in AvsPmod, VirtualDub to run script.

Quote:

Sorry I'm not so smart with this stuff. Obviously my setup ain't the best but I'm just going by with what I have for now until I can upgrade.
You're doing just fine. Learning, testing. :)

ENunn 01-03-2020 11:35 PM

Quote:

Originally Posted by lordsmurf (Post 65588)
Why are you waiting? Availability has gone down, and price gone up, so waiting won't accomplish anything but time to save up funds. If the latter, I can understand.

Yeah it's cost :P


Quote:

Originally Posted by lordsmurf (Post 65588)
What capture card, what software? Some hardware and software simply doesn't report drops, and the capture is still flawed. Your I-O DATA GV-USB2 appears to be an Easycap clone, and problems can/will arise from it.

GV-USB 2, software depends. If I'm doing short clips I use Amarec but if I'm transferring an entire tape I use Virtualdub. I went through the captures and yeah there were no drops.

Quote:

Originally Posted by lordsmurf (Post 65588)
For capture, yes, lossless. With some specific cards, MPEG with a high bitrate. Capturing direct to a delivery format like H264 has lots of problems, especially with quality. Interlacing and H264 also don't mix well together, so watch-ready copies. HDDs are so cheap now (12tb for under $150 recently), so space shouldn't be a concern. It not like it was 15 years ago, where you could do ONE video at a time, with a "massive" 100gb HDD on "fast" P4.

So I guess my codec isn't really lossless, weird. I used the same codec with some Nintendo DS captures with a USB capture mod and I could do a nearest neighbor scale to 1000%+ and there was no compression artifacts. Guess I'll go with UtVideo for VHS stuff :P

Quote:

Originally Posted by lordsmurf (Post 65588)
AvsPmod works well. Lossless source, script in AvsPmod, VirtualDub to run script.

No FFMpeg?

Also about the tearing, it's weird. With the stabilizer off on some tapes there is some tearing, which gets fixed with the stabilizer. at the cost of jumpy video. However, the ES15 doesn't fix the tearing for me. So it's either jumpy video with the stabilizer on or occasional tearing with it off in that situation.

hodgey 01-04-2020 05:06 AM

Don't think the IO-Daga GV-USB2 is an ezcap clone, it seems to be based on a techwell (Renesas) chip:
https://linuxtv.org/irc/irclogger_lo...21,Sun&text=on

No idea about the quality of those.

Quote:

Originally Posted by ENunn (Post 65591)
No FFMpeg?

I mostly use ffmpeg to encode from avisynth scripts, it's fine if you know your way around the command-line parameters.

msgohan 01-04-2020 12:35 PM

Quote:

Originally Posted by ENunn (Post 65591)
So I guess my codec isn't really lossless, weird. I used the same codec with some Nintendo DS captures with a USB capture mod and I could do a nearest neighbor scale to 1000%+ and there was no compression artifacts. Guess I'll go with UtVideo for VHS stuff :P

Your x264vfw settings are lossless.

I think decoding Ut Video should be faster. The downside, as you noted, is that you can't flag TFF to play your capture at 60fps in VLC. I use PotPlayer for this: http://www.digitalfaq.com/forum/news...nterlaced.html

Quote:

Also about the tearing, it's weird. With the stabilizer off on some tapes there is some tearing, which gets fixed with the stabilizer. at the cost of jumpy video. However, the ES15 doesn't fix the tearing for me. So it's either jumpy video with the stabilizer on or occasional tearing with it off in that situation.
As noted earlier in the thread, this is because you can't disable the TBC of the D-VHS VCR. The output is always digitized, baking-in the flagging (tearing).

ENunn 01-09-2020 11:58 AM

Quote:

Originally Posted by msgohan (Post 65595)
I think decoding Ut Video should be faster.

Just finished a transfer and UtVideo was indeed faster and took up less size.


Quote:

Originally Posted by msgohan (Post 65595)
As noted earlier in the thread, this is because you can't disable the TBC of the D-VHS VCR. The output is always digitized, baking-in the flagging (tearing).

Understandable, might need to get myself another good deck somday :hmm:

Also, should I turn off the 3-DNR and Digital R3 functions on my deck or is it fine to leave them on?

ENunn 06-15-2020 02:08 AM

5 Attachment(s)
Just giving a 6 month update, I've updated my script and I'm pretty satisfied with the results.

Code:

SetFilterMTMode("DEFAULT_MT_MODE", 3)
SetFilterMTMode("AVISource", 3)
SetFilterMTMode("QTGMC", 3)
LoadVirtualdubPlugin("C:\Program Files (x86)\AviSynth+\plugins64+\ccd_64bit.vdf", "CCD", 0)

"AViSource(AVISource("file.avi", atrack=0, pixel_type="YUY2")"
or
"v = AVISource("file.avi", atrack=0, pixel_type="YUY2")
a = FFAudioSourcE("file")
AudioDub(v,a)"

AssumeTFF()
ConverttoRGB32(matrix="rec601",interlaced=true)
separatefields()
CCD(10,1)
weave()
ConvertToYV12(interlaced=true, matrix="Rec601")
QTGMC(Preset="faster", EZDenoise=2, ChromaMotion=true,ChromaNoise=true, DenoiseMC=true, Lossless=2, SourceMatch=3, MatchEnhance=1, TR2=1, Rep2=2, SLMode=2, edithreads=4)
MergeChroma(aWarpSharp2(depth=20))MergeChroma(aWarpSharp2(depth=10))
Santiag(strh=3,strv=3)
Spline64Resize(640,480)
Crop(l,u,-r,-d)
x = float(width) / float(height)
spline64resize(round(x * 72x.0),72x) or spline64resize(round(x * 216x.0),216x)
Prefetch(6)

Cropping depends on the tape, resizing depends on what I'm uploading to YouTube. 720p for very long segments/commercials, 4k for short segments (because of yt compression).

Some picture examples are attached, although not cropped and not upscaled. If anyone wants to see video examples I'd be glad to send them.

I've been using this setup for a while now and I'm quite pleased with the results. Although unfortunately it'll never really be perfect. Since my VCR's TBC can't be turned off I have to deal with tearing (see the 5th attachment). Is there anything I can do to remedy it on my VCR? I took the lid off and if fixed a tear issue on one of my tapes but the others...not so much.

And about the 3-DNR and R3, I have them both off and I'm not gonna be turning those on. 3-DNR is basically the stabilization + more noise reduction so that means a jumpy picture. R3 is just some sharpness setting thats unneeded in capture.

Also is it a good idea to separate fields then weave between a CCD?

archivarious 09-08-2020 12:35 PM

Quote:

Originally Posted by ENunn (Post 69491)
Just giving a 6 month update, I've updated my script and I'm pretty satisfied with the results.

And about the 3-DNR and R3, I have them both off and I'm not gonna be turning those on. 3-DNR is basically the stabilization + more noise reduction so that means a jumpy picture. R3 is just some sharpness setting thats unneeded in capture.

Thanks for this fruitful conversation. I'm about to purchase a VR1100 from the recommended list. Would turning DNR/TBC on, on such a a machine, also result in jumpy picture? Background info: I still have to learn Avisynth, just learned about it. At the moment I have a GV-USB 2 to capture, not sure if I'll swap it with an ATI 600 USB.

ENunn 09-11-2020 08:51 PM

Late

Quote:

Originally Posted by archivarious (Post 71310)
Thanks for this fruitful conversation. I'm about to purchase a VR1100 from the recommended list. Would turning DNR/TBC on, on such a a machine, also result in jumpy picture? Background info: I still have to learn Avisynth, just learned about it. At the moment I have a GV-USB 2 to capture, not sure if I'll swap it with an ATI 600 USB.

I don't think so? I don't have one of those VCR's so I wouldn't know. I suggest giving it a shot. I don't suggest turning on the video stabilizer though. 95% of the time it'll be jumpy.

If the GV-USB2 works I don't suggest swapping it out unless you have some major problems I've been using it for a year+ now with tapes and it's worked quite well.

archivarious 09-16-2020 09:59 AM

Quote:

Originally Posted by ENunn (Post 71404)
Late



I don't think so? I don't have one of those VCR's so I wouldn't know. I suggest giving it a shot. I don't suggest turning on the video stabilizer though. 95% of the time it'll be jumpy.

If the GV-USB2 works I don't suggest swapping it out unless you have some major problems I've been using it for a year+ now with tapes and it's worked quite well.

Thanks, I'll start my setup with GV-USB 2 this week. Will see which TBC settings will be best


All times are GMT -5. The time now is 10:10 AM

Site design, images and content © 2002-2024 The Digital FAQ, www.digitalFAQ.com
Forum Software by vBulletin · Copyright © 2024 Jelsoft Enterprises Ltd.