Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Usage
Register FAQ Calendar Today's Posts Search

Reply
 
Thread Tools Search this Thread Display Modes
Old 6th August 2011, 05:26   #1  |  Link
hydra3333
Registered User
 
Join Date: Oct 2009
Location: crow-land
Posts: 540
old topic, latest thinking ? sharpening an interlaced source

I have PAL 576i TV captures which are fast sports action. I want to convert these to DVD and also to MP4.

Recently, a lot of them seem blurry. What are the latest function(s) which you would use to sharpen the captures (including de-interlacing, if that's part of it) ?

Something like this ?
Code:
DGMultiSource("file.dgi",deinterlace=2) #deinterlace=2 means double rate deinterlacing 
trim(1,-999999) # fix a double-framerate bug in NV per http://forum.doom9.org/showthread.php?p=1391556#post1391556
#LimitedSharpenFaster(smode=4,strength=100)
UnFilter(15,15)
# Re-Interlace and halve framerate, back to 25i
AssumeTFF()
Blur(0,1).SeparateFields().SelectEvery(4,0,3).Weave() #reinterlace - ASSUMED TFF HERE # BLUR(0,1) per http://forum.doom9.org/showthread.php?p=1488308#post1488308 
AssumeTFF()
hydra3333 is offline   Reply With Quote
Old 6th August 2011, 10:24   #2  |  Link
TheSkiller
Registered User
 
Join Date: Dec 2007
Location: Germany
Posts: 632
Yeah, that's how to sharpen an interlaced source (well, if you activate LSF ). You should throw out the Blur(0,1) this is not neccessary for a SD source. This is a suggestion for downscaling high definition to DVD to avoid extreme line twittering.
TheSkiller is offline   Reply With Quote
Old 6th August 2011, 12:46   #3  |  Link
Mounir
Registered User
 
Join Date: Nov 2006
Posts: 773
SelectEvery(4,0,3) is for BFF no?
Mounir is offline   Reply With Quote
Old 6th August 2011, 14:13   #4  |  Link
Gavino
Avisynth language lover
 
Join Date: Dec 2007
Location: Spain
Posts: 3,431
SelectEvery(4,0,3), when used as above, preserves whatever field parity you have before the call to SeparateFields(). So here (because of the preceding AssumeTFF) it gives TFF. (The second call to AssumeTFF() is unnecessary.)
__________________
GScript and GRunT - complex Avisynth scripting made easier
Gavino is offline   Reply With Quote
Old 6th August 2011, 17:31   #5  |  Link
Mini-Me
Registered User
 
Join Date: Jan 2011
Posts: 121
Everyone else already seems to have the parity covered for reinterlacing. What I would suggest though is to try QTGMC(preset = "super fast", lossless = 1) for deinterlacing in place of DGMultiSource. It might be a bit more temporally stable, which should help prevent temporal aliasing as a result of the sharpening operation.
Mini-Me is offline   Reply With Quote
Old 6th August 2011, 19:41   #6  |  Link
wonkey_monkey
Formerly davidh*****
 
wonkey_monkey's Avatar
 
Join Date: Jan 2004
Posts: 2,496
Quote:
You should throw out the Blur(0,1) this is not neccessary for a SD source. This is a suggestion for downscaling high definition to DVD to avoid extreme line twittering.
Won't sharpening the video also induce twittering, because you're undoing the vertical blur that would have been performed before broadcast to avoid it?

David
wonkey_monkey is offline   Reply With Quote
Old 6th August 2011, 23:48   #7  |  Link
hydra3333
Registered User
 
Join Date: Oct 2009
Location: crow-land
Posts: 540
David, does that mean I should not bother sharpening ?

I recall testing QTGMC with the highest of hopes. Per http://forum.doom9.org/showthread.ph...08#post1488308 it was with HD->SD to find in the end that I was not comfortable with bang for the cpu-cycle as it was comparatively slow.

Maybe the cost/benefit will be better here with 576i source. Suggestions for QTGMC settings (or a link to them) to use on large grassed arena/fast ball sports action 567i TV captures welcomed.

(Was it QTGMC that required a plugin with a special non-standard MS C runtime ?)
hydra3333 is offline   Reply With Quote
Old 7th August 2011, 10:33   #8  |  Link
TheSkiller
Registered User
 
Join Date: Dec 2007
Location: Germany
Posts: 632
Quote:
Originally Posted by davidhorman View Post
Won't sharpening the video also induce twittering, because you're undoing the vertical blur that would have been performed before broadcast to avoid it?
Sharpening will amplify any present line twittering, it won't "add" new because for that to work new details are required which no sharpener can simply produce. A loss of detail can't be undone. I really doubt you can make a rather blurry video so sharp without looking ugly (overdone) that this would become an issue. If there aren't many details then there isn't much that could cause line twittering in case of reasonable sharpening.
Why should there be a vertical blur before boadcast, this is not neccessary if the video is filmed with SD cameras (which is probably not so likely, instead it is a blurry downscaled HD video with too much vertical blur I guess).



Since you're going to reinterlace the video there is no need for a very elaborate bob-deinterlacing. You just need to "fill in the missing lines" with something stable to give the sharpener a reasonable video to chew on. What Mini-Me suggested is what I would suggest as well, QTGMC(preset="super fast", lossless=1). Lossless=1 keeps the original fields untouched, "super fast" will give sufficient quality interpolated lines. Those will be thrown away with the final reinterlace (as long as you don't change the field order in between; if the source is TFF then it should stay TFF to keep the original and sharpened, not interpolated, lines when reinterlacing).

Last edited by TheSkiller; 7th August 2011 at 17:31.
TheSkiller is offline   Reply With Quote
Old 7th August 2011, 17:50   #9  |  Link
Mini-Me
Registered User
 
Join Date: Jan 2011
Posts: 121
Quote:
Originally Posted by hydra3333 View Post
David, does that mean I should not bother sharpening ?

I recall testing QTGMC with the highest of hopes. Per http://forum.doom9.org/showthread.ph...08#post1488308 it was with HD->SD to find in the end that I was not comfortable with bang for the cpu-cycle as it was comparatively slow.

Maybe the cost/benefit will be better here with 576i source. Suggestions for QTGMC settings (or a link to them) to use on large grassed arena/fast ball sports action 567i TV captures welcomed.

(Was it QTGMC that required a plugin with a special non-standard MS C runtime ?)
I don't think QTGMC requires anything strange (other than what FFT3D requires), but it does have a long list of required plugins (some depending on settings). -Vit- has packaged them all together into a single .zip for simplicity on page 1 of the thread though.

If you're deinterlacing for final rendering, everyone has their own subjective preferences for the best settings, and there's a lot of discussion over that.

However, if you're deinterlacing just to apply a filter to interlaced input, and you're planning on interlacing again, I would definitely use:
Code:
source.QTGMC(preset = "super fast", lossless = 1)
In fact, I'm using exactly that in a function I've been working on. As TheSkiller said, your goal is to fill in the missing lines with something reasonable and temporally stable. That will give the original lines good neighbors for applying spatial filters to the interlaced video.

I would also use those same settings for real-time playback deinterlacing. Unlike some other presets, "super fast" is fast enough for single-threaded real-time playback on most recent processors. At the same time, I've never seen any faster deinterlacer look as good, but you can try yourself by interleaving and comparing frames!

That's the short version. For a bit of justification, lossless = 1 is important for both use cases for different reasons:
  • For filtering interlaced content: By default, QTGMC modifies the original fields. Lossless mode 1 allows you to keep the original fields exactly as they were (and simply give them good neighbors), which is precisely what you need for deinterlace->sharpen->reinterlace. If you were to simply deinterlace->reinterlace forever in a loop, you would lose nothing with lossless mode 1.*
  • For real-time playback: By default, QTGMC modifies the original fields (as mentioned before). The original fields become noticeably softer with "super fast", and the final output is much less detailed than with "placebo." Simply using lossless mode 1 restores about half of that difference. For the "super fast" preset, I pretty much can't do without lossless mode 1. The generated fields are also soft enough with "super fast" that the untouched original fields fit with them very well. Ironically, lossless mode 1 doesn't work as well with the medium-speed presets, where the generated fields are a bit sharper. With those presets, using lossless mode 1 makes bob shimmer more noticeable on thin horizontal details...but once you get to the slowest presets, it's awesome again (though lossless mode 2, "almost lossless," can be better here).

Deinterlacing->filtering->reinterlacing is a great general technique for using spatial filters on interlaced content. As others said, using sharpening filters in particular is not always the best idea when your final output will be interlaced...but I'd like to think that in your case it will probably be alright: Your source lines are probably soft enough for it, since a.) they're the result of interlacing and may have been low-passed beforehand (and you're not downscaling), and b.) you seem to think the source could use sharpening, so I'm assuming it's softer than usual. If you have problems with the sharpened output, perhaps you could sharpen only in stationary areas (similar to what Didee suggests here about low-passing only areas with motion).


*To be precise, you do have to careful with a few other settings for lossless mode 1 to work perfectly: If you're using NoiseProcess = 1, you should set NoiseRestore to 1.0, GrainRestore to 0.0, and StabilizeNoise to False. If you're using NoiseProcess = 2, you should set NoiseRestore to 0.0 instead. You don't want to use EZDenoise or EZKeepGrain for lossless, because they set those values differently.

Last edited by Mini-Me; 7th August 2011 at 20:09.
Mini-Me is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 02:42.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.