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. |
![]() |
#1 | Link |
x264 developer
Join Date: Sep 2005
Posts: 8,667
|
Restoring low-quality Youtube/similar videos
I was looking at this older thread and decided to try a slight modification of his script on some low quality Youtube and Nicovideo sources that I wanted to restore.
After and Before, respectively: ![]() Script: Code:
Deblock() dfttest() FastLineDarken() deen("a3d",4,8,9) Spline36Resize(last.width*2,last.height*2) AddBorders(4, 0, 4, 0) aWarpSharp(depth=12,blurlevel=4,thresh=0.2,cm=1) FastLineDarken() aWarpSharp(depth=6,blurlevel=4,thresh=0.7,cm=1) Crop(4,0,-4,0) FastLineDarken() DeHalo_Alpha() fft3dgpu(bt=3,sigma=8,sharpen=1.3) Spline36Resize(last.width/2,last.height/2) ![]() |
![]() |
![]() |
![]() |
#6 | Link |
brainless
Join Date: Mar 2003
Location: Germany
Posts: 3,650
|
I restored a lot of youtube clips as well for a students video project.
I needed to upsample them to PAL 50i. Source: http://www.youtube.com/watch?v=eN85MDSYiv4 Filtered: http://rapidshare.com/files/86115836..._kaza.mpg.html ![]() But the script is REALLY bruteforce: Code:
loadplugin("c:\x\dgdecode.dll") loadplugin("c:\x\mvtools.dll") loadplugin("c:\x\ttempsmooth.dll") loadplugin("c:\x\nnedi.dll") #load A&V v=avisource("get_video.avi") a=wavsource("get video.wav") audiodub(v,a) #correct video to true fps assumefps(30,true) resampleaudio(48000).getchannel(1,1) #deblock/dering s=DeBlock(quant=35).Blindpp(cpu2="ooooxx") # very strong temporal denoising (stabilisation) bv2 = s.MVAnalyse(isb = true, truemotion=true, delta = 2, idx = 10, blksize=16) bv1 = s.MVAnalyse(isb = true, truemotion=true, delta = 1, idx = 10, blksize=16) fv1 = s.MVAnalyse(isb = false, truemotion=true, delta = 1, idx = 10, blksize=16) fv2 = s.MVAnalyse(isb = false, truemotion=true, delta = 2, idx = 10, blksize=16) fc2 = s.MVFlow(fv2, idx=10, thSCD1=500) fc1 = s.MVFlow(fv1, idx=10, thSCD1=500) bc1 = s.MVFlow(bv1, idx=10, thSCD1=500) bc2 = s.MVFlow(bv2, idx=10, thSCD1=500) interleave(fc2, fc1, s, bc1, bc2) ttempsmooth(maxr=2, lthresh=40, cthresh=50) selectevery(5,2) #decimate out duped frames selectevery(6,1,2,3,4,5) #upscale to double size source=nnedi(dh=true,field=0).turnleft().nnedi(dh=true,field=0).turnright().sharpen(0.5) #interpolate to 50fps for fluent motion backward_vec = source.MVAnalyse(isb = true, truemotion=true, pel=2, idx=1,blksize=8) forward_vec = source.MVAnalyse(isb = false, truemotion=true, pel=2, idx=1,blksize=8) cropped = source.crop(4,4,-4,-4) # by half of block size 8 backward_vec2 = cropped.MVAnalyse(isb = true, truemotion=true, pel=2, idx=2,blksize=8) forward_vec2 = cropped.MVAnalyse(isb = false, truemotion=true, pel=2, idx=2,blksize=8) source.MVFlowFps2(backward_vec,forward_vec,backward_vec2,forward_vec2,num=50,idx=1,idx2=2) bicubicresize(720,576) #resize to PAL converttoyuy2() assumebff() #for PAL-DV separatefields().selectevery(4,0,3).weave() #reinterlace http://www.youtube.com/watch?v=2Dag6BTFB2s
__________________
Don't forget the 'c'! Don't PM me for technical support, please. Last edited by scharfis_brain; 24th January 2008 at 02:21. |
![]() |
![]() |
![]() |
#9 | Link |
x264aholic
Join Date: Jul 2007
Location: New York
Posts: 1,752
|
Come to think of it, that sounds EXACTLY like what my filter is doing. Was my filter chain the one you based yours off of?
![]() Code:
toon(0.15) Deblock(quant=33, bOffset=14) dfttest() AAA(Chroma=true) Spline36Resize(1536,864) aWarpSharp(depth=12,blurlevel=4,thresh=0.3,cm=1) LimitedSharpenFaster(edgemode=1,strength=200) deen("a2d",3,6,6) Dehalo_alpha() Spline36Resize(1024,576) Last edited by Sagekilla; 24th January 2008 at 03:15. |
![]() |
![]() |
![]() |
#12 | Link |
Registered User
Join Date: Feb 2007
Location: ::1
Posts: 1,236
|
*points at DS*
Slightly modified for my purposes. Code:
LoadPlugin("C:\Anime\WarpSharp\warpsharp.dll") AviSource("MD_01.avi", audio=false) Deblock() dfttest() FastLineDarken() deen("a3d",4,8,9) Spline36Resize(last.width*2,last.height*2) AddBorders(4, 0, 4, 0) aWarpSharp(depth=12,blurlevel=4,thresh=0.2,cm=1) FastLineDarken() aWarpSharp(depth=6,blurlevel=4,thresh=0.7,cm=1) Crop(14,10,-14,-10) FastLineDarken() DeHalo_Alpha() fft3dgpu(bt=3,sigma=8,sharpen=1.3) Spline36Resize(640,480) Tweak(sat=1.1, bright=0.0, cont=1.1) TextSub("MD_01.ass") Dup(threshold=4) |
![]() |
![]() |
![]() |
#13 | Link |
x264aholic
Join Date: Jul 2007
Location: New York
Posts: 1,752
|
It seems like the problem is related to dfttest(). By sheer random luck, I was testing dfttest() as a replacement for one of the denoisers in my script and found it to produce odd output. It output an overtly green image, as you said.
Don't know why, but it did. |
![]() |
![]() |
![]() |
#14 | Link | |
x264 developer
Join Date: Sep 2005
Posts: 8,667
|
Quote:
Check that you have the latest fft3w library? |
|
![]() |
![]() |
![]() |
#15 | Link |
x264aholic
Join Date: Jul 2007
Location: New York
Posts: 1,752
|
Indeed, I tried dfttest alone on that clip and it's effects were amazing. But when I used either your filter chain or mine with dfttest instead of the first deen call, I got green screens. Annoyingly enough, I have the fft3w library from FFT3Dfilter and I get this effect with our filter chains.
Last edited by Sagekilla; 24th January 2008 at 02:54. |
![]() |
![]() |
![]() |
#17 | Link |
x264aholic
Join Date: Jul 2007
Location: New York
Posts: 1,752
|
That could probably be it. My source input is 720x416 though, mod 16. Unless it requires mod 32?
Edit: That makes no sense, I called this before I did any changes to the dimensions and it gave me a green tinted screen. When I used it standalone, I got the normal (and amazing at that) effects. |
![]() |
![]() |
![]() |
#19 | Link |
Registered User
Join Date: Feb 2007
Location: ::1
Posts: 1,236
|
Update. At least on my end, FastLineDarken() is causing the green-screens. I can comment out only the FLDs and it will work. Even one FLD seems to bork it.
The interesting thing is, depending on which FLD I don't comment out, different things happen. Leaving in the last FLD only will cause green screens everywhere. Leaving in the second only causes weird bubbles of color in the first few frames after you seek somewhere new in MPC. Leaving in the first one only causes the color bubbling for a frame or two, then permanent green screens. Last edited by Ranguvar; 24th January 2008 at 03:14. |
![]() |
![]() |
![]() |
#20 | Link |
x264aholic
Join Date: Jul 2007
Location: New York
Posts: 1,752
|
Oops, yeah it's FastLineDarken that causes the problem.. Not dfttest. I got the names mixed up when I posted, sorry! Swapped out deen and removegrain for dfttest on my first filter call. Much better results and I think it's slightly faster.
|
![]() |
![]() |
![]() |
Thread Tools | Search this Thread |
Display Modes | |
|
|