View Full Version : A very hard work (a lot of filter)
ficofico
24th March 2007, 20:47
I want to encode 5 hours of mpeg recording using avisynth filter.
I have italy-france ( The final ) football match recorded with my dvdrecording ( sp recording), The mpeg file are interlaced and with a not good quality, I want to encode with x264 insane quality and I'm not afraid for time to spending!!!:D
I ask for some script improvement, This is what I use at this moment ( the script is using in virtual dub, The returned avi file without compression, next time pass trough megui)
DGDecode_mpeg2source("K:\Satellite\prove\3-parte.d2v",info=3)
ColorMatrix(hints=true)
mt("mcbob")
YToUV(FFT3DFilter(sigma=3, plane=1, bw=32, bh=32).UToY,\
FFT3DFilter(sigma=3, plane=2, bw=32, bh=32).VToY,\
FFT3DFilter(sigma=2, plane=0, bw=32, bh=32))
YToUV(FFT3DFilter(sigma=3, plane=1, bw=4, bh=4).UToY,\
FFT3DFilter(sigma=3, plane=2, bw=4, bh=4).VToY,\
FFT3DFilter(sigma=2, plane=0, bw=4, bh=4))
mt("Dehalo_alpha")
LimitedSharpenfaster(ss_x=2.0,ss_y=2.0,smode=3,strength=150,overshoot=7)
Lanczosresize(640,512)
400 mb - 9 hours of encoding without recompression!!! I want more:D
ORIGINAL MPEG FILE (http://ficofico.interfree.it/calcio1.rar)
x264 ENCODED FILE (http://ficofico.interfree.it/calcio.rar)
Terranigma
24th March 2007, 21:12
Sure (http://forum.doom9.org/forum-rules.htm). take a look at number 12.
ficofico
24th March 2007, 21:19
forget the best................. how I can improve my script for my mpeg video?
Terranigma
24th March 2007, 21:25
forget the best................. how I can improve my script for my mpeg video?
Well we can't really advise you if there's no sample. Each video is different, therefore I can't give you a straight answer.
I have a question for you first. Does mt("mcbob") actually do anything? I was told that it's not possible to use mt with mcbob :confused:
Anyways, you can try adding a stronger denoiser such as mvdegrain2 with a blksize of 4, (Note: this will slow encoding speed to a crawl).
Do you really need dehalo alpha when you got fft3d? :p
ficofico
24th March 2007, 21:40
Sample's are in my first script, and I've linked also a part of the encoded video with the code.
mcbob with mt is fastest for my procio, cpu usage go to 90%
Do you really need dehalo alpha when you got fft3d?
Today 21:19Is that I don't know!!!:helpful: Usually i copy and paste script from threads and I watch the results, fft3d is a very good filter, but I don't know if this way to use is the better for my video, and if is possible to use with another filter with good results.
Pookie
24th March 2007, 21:45
You can't MT on MCBob - it uses MVtools, which does not work with multithreading.
Terranigma
24th March 2007, 21:48
Sample's are in my first script, and I've linked also a part of the encoded video with the code.
mcbob with mt is fastest for my procio, cpu usage go to 90%
Is that I don't know!!!:helpful: Usually i copy and paste script from threads and I watch the results, fft3d is a very good filter, but I don't know if this way to use is the better for my video, and if is possible to use with another filter with good results.
Yes, fft3d is very good. that's why I asked if you need dehalo alpha as well since it can do a better job at removing halos imo. I'll check out your samples, somehow i missed those links when reading your posts.:rolleyes:
ficofico
24th March 2007, 21:52
But it work....... in megui I've seen that an avs file without mt on mcbob give me 50% cpu usage, with mt cpu usage is 70-80%
In this moment my cpu work with mt on mcbob, the script work, I don't know if it really work.
Terranigma
24th March 2007, 21:59
double fps for the x264 encode. add selecteven() after mcbob to retain the original fps.
e.g.
mt("mcbob").selecteven()
The 50fps clip is more fluid though. Looks like there's a lost of a lot of details as well. What went wrong there? :D
ficofico
24th March 2007, 22:09
I've tried your suggestion time ago, but video non look good, images aren't fluently. I've tried also tdeint and other deinterlacer but result aren't for me good, good image but not fluently images. mvbob and mcbob for me are the best, 50 fps but very good result ( my english is horrible!!!!!:p )
Terranigma
24th March 2007, 22:19
I've tried your suggestion time ago, but video non look good, images aren't fluently. I've tried also tdeint and other deinterlacer but result aren't for me good, good image but not fluently images. mvbob and mcbob for me are the best, 50 fps but very good result ( my english is horrible!!!!!:p )
They're not fluent, but that's how the source is. why should it be different? You're encoding too many frames. Quality will be lower because of that. But to each their own, I need an expert telling you why encoding useless frames is a bad idea. Maybe you'll think twice about that the next time :)
ficofico
24th March 2007, 22:28
Source looks good because I use pure video decoder that is incredible, excellent images and fluent video. If I watch the file with media player classic or videolan, with deinterlacer, video became non fluently, and a football match with this "look" is horrible. To put into an mkv container with x264 video, I need to deinterlace, but I want that video became fluently.
Didée
24th March 2007, 23:45
@ ficofico:
When using MCbob or MVbob, do not use any MT filters on these bobbers. In a nutshell - IF you do so, then internally something is going terribly wrong. It doesn't help that it runs faster, since the results will be of much lower quality, compared to not using MT.
@ Terranigma:
They're not fluent, but that's how the source is. why should it be different? You're encoding too many frames. Quality will be lower because of that. But to each their own, I need an expert telling you why encoding useless frames is a bad idea.
That's nonsense, and
Maybe you'll think twice about that the next time
is *your* task. :)
True interlaced video contains the double amount of field-based temporal information. Bobbers convert those fields to full frames. There are no "useless" frames.
Sure you'll need a higher bitrate when compressing a bobbed stream, because the framecount was doubled, compaired to simple-rate progressive. However, if one can afford the higher bitrate, then keeping the full doubled framerate is definetly preferred.
(Wrapping your statement into the equivalent of the spatial domain, it would mean that keeping HD resolution would be useless, and always shrinking to tiny SD resolution would be better, because the big resolution is useless. That's bullsh*t, isn't it?)
Terranigma
25th March 2007, 01:15
(Wrapping your statement into the equivalent of the spatial domain, it would mean that keeping HD resolution would be useless, and always shrinking to tiny SD resolution would be better, because the big resolution is useless. That's bullsh*t, isn't it?)
There's actually a thread here about large res vs. small res, don't know if you've seen it. if you haven't, you can find it Here (http://forum.doom9.org/showthread.php?t=123257). Are you shocked by the current poll standings?
Speaking of fps, i did find that the 50fps clip was smoother. The 25fps clip seem as if it was jerky. Looks like I got a lot to learn about fps :/
Alain2
25th March 2007, 01:35
Yes, fft3d is very good. that's why I asked if you need dehalo alpha as well since it can do a better job at removing halos imo. I'll check out your samples, somehow i missed those links when reading your posts.:rolleyes:
Well it all depends on what type of video... For real life video, I agree, I prefer fft3d internal dehalo, but it does not perform an as good job as dehalo_alpha, it decreases linearly the halo according to the strength of the halo and therefore residual halo is always there, very visible were halos were very strong ; raising too much the strength of the dehalo reduces the overall picture dynamic contrast (as you need to keep threshold low otherwise it does not catch the halos enough)...
On animation though I much prefer dehalo_alpha, it's much more performant and the artefacs created are not as bad of a problem as on real life video imo.
ficofico
25th March 2007, 11:53
Ok, thanks for your suggestion!!!
My new script will be :
DGDecode_mpeg2source("K:\Satellite\prove\prove\calcio.d2v",info=3)
ColorMatrix(hints=true)
mvbob
YToUV(FFT3DFilter(sigma=3, plane=1, bw=32, bh=32).UToY,\
FFT3DFilter(sigma=3, plane=2, bw=32, bh=32).VToY,\
FFT3DFilter(sigma=2, plane=0, bw=32, bh=32))
YToUV(FFT3DFilter(sigma=3, plane=1, bw=4, bh=4).UToY,\
FFT3DFilter(sigma=3, plane=2, bw=4, bh=4).VToY,\
FFT3DFilter(sigma=2, plane=0, bw=4, bh=4))
Dehalo_alpha()
mt("LimitedSharpenfaster(ss_x=2.0,ss_y=2.0,smode=3,strength=150,overshoot=7)")
Lanczosresize(640,512)
mcbob without mt is impossible to use!!!!:)
Any other suggestion, related to my specific video?
foxyshadis
25th March 2007, 14:13
I wonder how this ugly ytouv fft3d business started spreading. You should really replace
YToUV(FFT3DFilter(sigma=3, plane=1, bw=32, bh=32).UToY,\
FFT3DFilter(sigma=3, plane=2, bw=32, bh=32).VToY,\
FFT3DFilter(sigma=2, plane=0, bw=32, bh=32))
YToUV(FFT3DFilter(sigma=3, plane=1, bw=4, bh=4).UToY,\
FFT3DFilter(sigma=3, plane=2, bw=4, bh=4).VToY,\
FFT3DFilter(sigma=2, plane=0, bw=4, bh=4))
with
FFT3DFilter(sigma=2, plane=0, bw=32, bh=32)
FFT3DFilter(sigma=2, plane=0, bw=4, bh=4)
FFT3DFilter(sigma=3, plane=3, bw=32, bh=32)
FFT3DFilter(sigma=3, plane=3, bw=4, bh=4)
just so you can read them. And since I know you just copied them from somewhere, you should load your script into avsp, turn them into sliders, and play around with them - tune them to your content, so that you don't smooth too much or too little.
Doubled-up fft3d with different block sizes is rarely necessary, and slows things down quite a bit. Even though fft3d is threaded, you can also just wrap the whole block in mt:
mt("""
FFT3DFilter(sigma=2, plane=0, bw=32, bh=32)
FFT3DFilter(sigma=2, plane=0, bw=4, bh=4)
FFT3DFilter(sigma=3, plane=3, bw=32, bh=32)
FFT3DFilter(sigma=3, plane=3, bw=4, bh=4)
Dehalo_alpha()
LimitedSharpenfaster(ss_x=2.0,ss_y=2.0,smode=3,strength=150,overshoot=7)
""")
Otherwise I can't yet offer specific suggestions, as it's still downloading.
foxyshadis
25th March 2007, 14:17
There's actually a thread here about large res vs. small res, don't know if you've seen it. if you haven't, you can find it Here (http://forum.doom9.org/showthread.php?t=123257). Are you shocked by the current poll standings?
Speaking of fps, i did find that the 50fps clip was smoother. The 25fps clip seem as if it was jerky. Looks like I got a lot to learn about fps :/
People here are bitrate misers, the home of the 1-cd dvds and 1-dvd hds, but that's orthoganal to what Didée asked. Higher framerates are definitely harder to get playing smoothly, though, which is why I rarely bother even when the source could use it.
Didée
25th March 2007, 18:54
mcbob without mt is impossible to use!!!!:)
Then don't.
Once more:
- MVTools do not work correctly with MT.
- MCBob & MVBob do use MVTools.
The conclusion is obvious.
There's actually a thread here about large res vs. small res, don't know if you've seen it. if you haven't, you can find it Here (http://forum.doom9.org/showthread.php?t=123257). Are you shocked by the current poll standings?
Sure I have seen it. If I'm shocked in any way, then by the silliness of the poll ... the Question "HiRes/LowQ vs. LowRes/HiQ" is plain bollocks. A poll "Do you prefer a yellow banana or a green apple" would be about as significant...
Plus, it has nothing to do with the comparison I tried to make. You're distracting. ;)
Higher framerates are definitely harder to get playing smoothly, though, which is why I rarely bother even when the source could use it.
Sure, but not that hard. If you're used to play 1920ish HD content smoothly, there should be no problem with playing 720 50/60p content smoothly. ;)
foxyshadis
25th March 2007, 20:48
Who says I can get 1920 playing smoothly? :p (Lately even standard DVD playing with subtitles has been causing nasty interactions on my system, and tracking them down has been a huge pain. I've avoided watching much lately thanks to that.) If you don't try to push the filters, and have the power and tv for it, it's definitely liquid-smooth though.
ficofico
25th March 2007, 21:22
Hi guys, now I', trying this varying .... It seems to give very good result.
ColorMatrix(hints=true)
mvbob
mt("""
FFT3DFilter(sigma=2, plane=0, bw=32, bh=32 )
FFT3DFilter(sigma=2, plane=0, bw=4, bh=4, sharpen=0.6)
FrFun7(1.0,8,4)
Dehalo_alpha()
LimitedSharpenfaster(ss_x=2.0,ss_y=2.0,smode=3,strength=210,overshoot=7)
""")
Lanczosresize(640,512)
ficofico
27th March 2007, 22:13
After 2 days of tests I've learn a rule....... never fix with a filter, and never think that this filter is the right filter for your video.
I've interlaced video that I want to deinterlace, denoise and sharpen. For deinterlace mvbob is the best of the bobber, therefore I've used this.
For denoise I've used FFt3dfilter in every its form, all the plane, all sigma, all the "best" value of the guide, but when I sharpen the video with LSF, noise and fastidious halo ruin the video. therefore I've used frfun7 without fft3dfilter, and he erase all the halo and noise.
With Soothe I've sharpen properly the video, and now I'm quite happy:D
I was deprived of hope, after 2 days of encoding and tests, result from uncompressed avi file (only avisynth seting) had less quality than the original mpeg video watched with dvbviewer and nvidia pure video filter. Now quality is better than original, but I want more. I'm sure that anybody know a better way to restore this video. I want to encode with good quality, because is an important video of an important day.
These are my actual setting:
mcbob
ColorMatrix()
frfun7(1.1,8,4)
dull = last.LanczosResize(640,512)
sharp = dull.LimitedSharpenfaster(ss_x=2.0,ss_y=2.0,dest_x=640,dest_y=512,smode=3,strength=130,undershoot=50,soft= 20)
Soothe(sharp,dull,20
:thanks: for your aid.
This is another part of video, shakira dancing and singing!!
http://ficofico.interfree.it/prova.MPG
p.s. It's a short code but itìs born after hour and hour and houre .... of test!!!!!!!!!!!!!
tsp
27th March 2007, 22:40
mcbob
ColorMatrix()
frfun7(1.1,8,4)
dull = last.LanczosResize(640,512)
sharp = dull.LimitedSharpenfaster(ss_x=2.0,ss_y=2.0,dest_x=640,dest_y=512,smode=3,strength=130,undershoot=50,soft= 20)
Soothe(sharp,dull,20
:thanks: for your aid.
This is another part of video, shakira dancing and singing!!
http://ficofico.interfree.it/prova.MPG
p.s. It's a short code but itìs born after hour and hour and houre .... of test!!!!!!!!!!!!!
what about using mt with limitedsharpenfaster?
mcbob
ColorMatrix()
frfun7(1.1,8,4)
dull = last.LanczosResize(640,512)
sharp = dull.mt("LimitedSharpenfaster(ss_x=2.0,ss_y=2.0,dest_x=640,dest_y=512,smode=3,strength=130,undershoot=50,soft= 20)")
Soothe(sharp,dull,20
mt might even work with frfun7 mt("frfun7(1.1,8,4)") but I haven't tried that
ficofico
27th March 2007, 22:44
oh yes, mt.......... now I try, thanks
ficofico
28th March 2007, 00:09
Here a demo of the video encoded with x264 megui profile_hq quality, bitrate 2500.
http://ficofico.interfree.it/prova.mp4
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.