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. |
10th September 2009, 20:35 | #1 | Link |
Registered User
Join Date: Jul 2005
Posts: 317
|
Flickering Problems with DVD
Hello,
I've been trying to re-encode a DVD of mine and a couple scenes throughout the movie have this weird "flickering" present (to be honest, I'm not even sure if that's the actual name of it, but it sure looks like flickering). I've run Deflicker() on the 3 scenes and it seems to have helped a little bit, but the flickering isn't completely gone. I also tried wdeflicker() and it seems to give superior results on the 1st scene but leaves behind "horizontal lines" as artifacts. And on the 2nd and 3rd scene its debatable which one gives better results. I was wondering if you guys had any ideas on how to tackle this sort of thing? Any advice is appreciated. Here are the 3 (untouched) scenes: http://www.sendspace.com/file/hlohzl (2MB) http://www.sendspace.com/file/rpk9mj (8MB) http://www.sendspace.com/file/nfm08c (16MB) Thanks. |
14th September 2009, 15:05 | #3 | Link |
x264 Fanatic !
Join Date: Mar 2009
Location: Earth I guess ?
Posts: 36
|
Well its too ugly , it actually makes me doesnt even want to touch it .
FFT3D / removegrain / mvtools2() / cpu=6 are too brutal and hardcore on this as it is already bitrate starved and they kill the details for my liking , i ran a simple degrainmedian . I've also overcropped by 2 pixels on each side . For the cleaning all i did was MSU Deblocking 2.2 (http://compression.ru/video/deblocking/index_en.html) and stab() (http://avisynth.org/mediawiki/Stab) and its doing a better job then depanestimate().despot() or dejitter() imho . ( let me know if you need help loading the vdub filters into avisynth ) The deinterlacing is screwed as well as it is seemingly double hard telecine ( i just ran what megui suggested even though i know its screwed ) ( tfm(order=1).tdecimate(hybrid=1).vinverse() ) , it gives ghosting and what not , i cannot be bothered to annoy myself on that. Probably deint masking + nnedi or something like that would be better + a stablizer . Frame 3 : Frame 95 : Frame 94 .. ( Scary ) : I actually like my beaches a bit more greener .. dil chahta hai actually made me a bit nostalgic Last edited by Who Am I ?; 14th September 2009 at 15:11. |
14th September 2009, 17:21 | #4 | Link |
Registered User
Join Date: Jul 2005
Posts: 317
|
^I already got the the deinterlacing part down packed. TIVTC+yadifmod+nnedi2 was able to handle the movie pretty well. it's just these 3 scenes that have this "flickering" problem that I'm having trouble controlling. Thanks for the suggestions.
|
14th September 2009, 20:24 | #5 | Link | |
x264 Fanatic !
Join Date: Mar 2009
Location: Earth I guess ?
Posts: 36
|
Quote:
good luck with the compressibility |
|
14th September 2009, 23:26 | #6 | Link | |
Registered User
Join Date: Jul 2005
Posts: 317
|
Quote:
|
|
15th September 2009, 21:23 | #7 | Link | |
x264 Fanatic !
Join Date: Mar 2009
Location: Earth I guess ?
Posts: 36
|
Quote:
|
|
16th September 2009, 19:00 | #8 | Link |
Registered User
Join Date: Jul 2005
Posts: 317
|
^I tried looking into what you suggested but I'm not sure exactly what you mean by "frequency controlling filter"... I also found msu_deflicker which is supposed to work very well but I believe it only takes in RGB colour space and I'd rather not change colour spaces. Looks like I'm kind of stuck
Although DeFlicker(scene=18) gives moderately good results that certainly helps the scenes. If I don't find anything else to alleviate the problem, I'm gonna go with this. |
18th September 2009, 09:39 | #9 | Link |
Registered User
Join Date: Apr 2002
Location: Germany
Posts: 5,391
|
Okay, I toyed a bit with this one.
Shortly summed-up: using Deflicker is fine, but it benefits from a lil'bit of additional assistance. First of, just for fun I made a small deflicker function. It is pretty simple, read "dumb", in that it just gathers the average luma of frames, smoothens that with temporalsoften, and applies the obtained difference to the original input: Code:
o = last screen = mt_lutf(o,o,mode="average",yexpr="x",U=1,V=1) #.greyscale screenTS = screen.temporalsoften(1,9,0,9,2).merge(screen,0.249).temporalsoften(2,5,0,5,2) calmed = o.mt_makediff(mt_makediff(screen,screenTS),U=2,V=2) Then I noticed that some parts - especially the sky in scene1 - had *more* flicker after this processing than before. Examining the histograms, it can be seen that it's not the whole range of levels that flickers up-and-down. In fact, it's only the vast midrange that flickers, with the blacklevel and whitelevel keep being fixed. So, the obvious thing to do was to make a simple brightness mask for the range that actually is concerned, and merge-in the deflickered result by that mask: Code:
masky = o.mt_lut("x 32 < x 16 - 16 * x 204 > 255 204 x - abs 255 30 / * - 255 ? ?").removegrain(11,-1) #.greyscale final = o.mt_merge(calmed,masky,U=2,V=2) And, as far as "frame-wide" flicker is concerned, the story ends here. The remaining flicker can not be catched by such simple means, it's mostly a form of encoding artifacts, or something. To get that remaining flicker out, the way probably is to use a temporal denoiser. (MDegrain2 did a reasonable job, especially when the search clip is preprocessed by fft3dfilter with bt>=3.) ***** The little thing that stroke me about Deflicker() is that it creates a result with spikes in the histogram, which indicates that there's some discontinuities in the output. Honestly, I could not spot anything with the naked eye, so probably it isn't serious. But OTOH, the histogram does not lie, so I thought I should mention it. Full script for comparison: Code:
mpeg2source("scene2.d2v") crop(0,48,-0,-48) tfm().tdecimate() o = last screen = mt_lutf(o,o,mode="average",yexpr="x",U=1,V=1) #.greyscale screenTS = screen.temporalsoften(1,9,0,9,2).merge(screen,0.249).temporalsoften(2,5,0,5,2) calmed = o.mt_makediff(mt_makediff(screen,screenTS),U=2,V=2) deflk = o.Deflicker() masky = o.mt_lut("x 32 < x 16 - 16 * x 204 > 255 204 x - abs 255 30 / * - 255 ? ?").removegrain(11,-1) final_dumb = o.mt_merge(calmed,masky,U=2,V=2) final_deflk = o.mt_merge(deflk,masky,U=2,V=2) # comparisons ... arrange clips as you like stackvertical( final_dumb.histogram("levels"), final_deflk.histogram("levels") ) # stackvertical( deflk.histogram("levels"), o.histogram("levels") )
__________________
- We´re at the beginning of the end of mankind´s childhood - My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!) |
18th September 2009, 15:41 | #10 | Link |
Registered User
Join Date: Feb 2004
Posts: 743
|
Also MSU's deflicker will take it all out, tested on sence 3.vob. However this filter has problems with movie film flicker which is my business. Make a test with clip that has sence changes using defualt settings.
Richard photorecall.net |
18th September 2009, 15:43 | #11 | Link | |
x264 Fanatic !
Join Date: Mar 2009
Location: Earth I guess ?
Posts: 36
|
Quote:
i'd blindly use what you suggest any given day |
|
18th September 2009, 18:25 | #14 | Link |
Registered User
Join Date: Jul 2005
Posts: 317
|
Thank you Didee for your input! It looks much better than deflicker.
rfmmars, I've uploaded the 3 scenes again but i've added a little more on the beginning and end of each so you can see the transitions. I hope this is what you wanted. test (16MB) test2 (8MB) test3 (24MB) And if it makes any difference I'm going to be using any solutions to theses problems only on those scene with conditional reader. That way only those scenes get processed. The only flickering scene that has flickering during scene changes as well is test.VOB. Last edited by canuckerfan; 18th September 2009 at 18:28. |
18th September 2009, 22:14 | #15 | Link | |
Registered User
Join Date: Feb 2004
Posts: 743
|
Quote:
Richard photorecall.net |
|
19th September 2009, 00:11 | #16 | Link | |
Registered User
Join Date: Jul 2005
Posts: 317
|
Quote:
|
|
|
|