digitalFAQ.com Forums [Archives]

digitalFAQ.com Forums [Archives] (http://www.digitalfaq.com/archives/)
-   Avisynth Scripting (http://www.digitalfaq.com/archives/avisynth/)
-   -   Avisynth for Underwater Scenes? (http://www.digitalfaq.com/archives/avisynth/6337-avisynth-underwater-scenes.html)

Jellygoose 10-26-2003 05:41 AM

Avisynth for Underwater Scenes?
 
Hi everybody!

Encoded a movie yesterday, and watched it on my standalone! Movie was "Below" (kind of a submarine mystery thriller) with some underwater scenes...
Well the movie looked fantastic, except for the underwater scenes! :evil:
Artifacts and blocks all over the place! It was actually hard to watch, because you just didn't know what's happening because of the artifacts!
Has anyone had those problems with underwater scenes yet, and how did you try to solve them! I already increased CQ to 90 on those scenes, but artifacts are still showing! Later today I post some screenshots and maybe a sample!

kwag 10-26-2003 11:06 AM

Hi Jellygoose,

How do the underwater scenes look on the original source :?:
If there are any artifacts visible, then they will look worse on the recompression :!:

-kwag

Boulder 10-26-2003 11:44 AM

Did you try cranking the max bitrate higher and then using CQ90?

Jellygoose 10-27-2003 08:14 AM

Hi all!!

Ok, here we go! I uploaded a small sample, where you can see how these underwater scenes look like. This scene is taken out of my encode, and you can see how the rest of the movie actually looks pretty good.

Here's the sample: http://www.angelfire.com/film/jellygoose/Underwater.m1v

There are not a whole lot of these scnes, so i actually might get away by using the Force Picture Settings of TMPGEnc...
I never tried this before, but it might really help with those scenes, what do you think? :roll: Make all frames of these I-Pictures? Or every second frame of these scenes? :roll:

@kwag: The Original picture has a few artifacts on these scenes, you're right! however in those pictures there are lots of bubbles and mud, so it's hard for me (and probably also for the encoder) to distinguish those from noise and artifacts! I think that's what's leading to those results...

@boulder: Tried it with max. Bitrate 10.000 and CQ 100... Picture was better, but still blocky with artifacts!

-Andy

jorel 10-27-2003 08:24 AM

Jell,
i always have problems in scenes with
water(or underwater),(big flames)fire and smoke(like in musical clips)!
i try everything but can't solve.
seems that this kind of scenes need big CQs and high(max)bitrate!
my tese(maybe wrong or stup):
this scenes are always in moviments and have dimentional(2d or 3d) variations!
i was clear?

:?

Jellygoose 10-27-2003 08:30 AM

I totally understand you jorel! I know you cannot make a perfect copy of these scenes, however we might get it better! It's some work, but maybe with these "Force Picture settings", we can get it right!

incredible 10-27-2003 08:38 AM

No way to download your exampe m1v :cry:
But it would be more interesting to see the source!

But if your source does contain artefacts as performing also on Dvix sources you should do a preprocessing by adding ...

BlindPP(CPU=4)
ATC(xxxxxxx)

I added these lines on top of the MA next to the Mpeg2source last Week when when I tried to reencode a very bad quality DVD d2v stream.

Code:

nf =* 0
Mpeg2Source("Source.d2v")*
BlindPP(CPU=4)
ATC(xxxxx)
#
undot()
Limiter()
asharp(1, 4)
GripCrop(480, 576, overscan=3)
GripSize(resizer="BicubicResize")
MergeChroma(blur(1.50))
MergeLuma(blur(0.1))
#
## Linear Motion Adaptive Filtering ##
#
SwitchThreshold = (Width<=352) ? 5 : (Width<=480) ? 4 : 3
ScriptClip("nf = YDifferenceToNext()"+chr(13)+ "nf >= SwitchThreshold ? \
unfilter( -(fmin(round(nf)*4, 100)), -(fmin(round(nf)*4, 100)) ) : \
TemporalCleaner(round(6+nf), round(13+nf)) ")
#
######################################
#
GripBorders()
LetterBox(16,16,16,16)*
Limiter()
#
######################################
#*
## Functions ###
function fmin( int f1, int f2) {
* return ( f1<f2 ) ? f1 : f2
}
#
######################################

Maybe someone now pulls the breaks cause of two times a temporalcleaning is used, but I tried a lot but ... by using this script Macroblocks where killed (well it depends of the source's macroblocks!) and an the other hand details like in hair and skins where preserved.

Code:

ATC(xxxxx)
You have to adjust ATC before!

Code:

TemporalCleaner(round(6+nf), round(13+nf))
Also try to adjust the "added" values to nf, like here 6 and 13, cause the source in that case was really bad transformed from the original DVD.

So in your case the best way would be a specific "selected frame area "if"-routine" where these heavyer filters do perform and where on the other areas an "else" routine would call a lighter filtering part in the script ;-)

Jellygoose 10-27-2003 09:05 AM

Sample should work now... :oops:

Dialhot 10-27-2003 10:27 AM

For what I can see, you problem is a typical DCT blocks problem that you can reduce with a blockbuster line at the end of your script :
(just before the borders)

Code:

Blockbuster(method="noise",detail_min=1,detail_max=10,variance=0.3,seed=5623)
(but my PC monitor at the office isn't verry good, eve if it's a 21". I might be wrong :-))

incredible 10-27-2003 11:14 AM

Sorry, still Angelfire/Error when trying to download or watching the m1v in the browser ...

Jellygoose 10-27-2003 11:26 AM

:evil: Angelfire just deleted my account because of "File Storage Only"... Well Dialhot could actually see the sample, and I already considered using the Blockbuster Filter, but I always thought that Blockbuster has no effect on Encodes with a Resolution above 352xxxx... I think SansGrip himself talked about that when he first tested the filter...

Dialhot 10-27-2003 11:54 AM

I didn't remember that so I did an encoding in SVCD resolution with and without blockbuster line and I'm quite sure the effect wasn't only in my mind :-). Try it.

Jellygoose 10-28-2003 06:23 AM

:D Worked like a charm Dialhot! Those scenes look far more natural with that blockbuster line! Thanks a lot to you and incredible!

incredible 10-28-2003 07:30 AM

Try the Script I posted above with Blockbuster added (before adding the borders).
With this yesterday I compressed Matrix reloaded (even it got a good quality) fitting one CDr80 at 480x576 inkl. 2 audio Channels (112kbit)! at CQ 61, ... picture is really nice! No Blocks, clear surfaces and preserved details. 8O
Success cause the movie contains a very lot of black/dark parts and the fast moving scenes where handled by the heavier working MA routine (multiplicator at 4 and Threshold set higher).
On the other hand ... no way to get a right prediction using CQ matic, so I used TOK set to numbers of samples=2 and SampleLenght=75 (PAL).

audioslave 10-28-2003 08:03 AM

Does it matter what number I put in the "seed" parameter for BlockBuster? From what I recall this parameter only tells BlockBuster to put the same amout of noise in each frame. Is this correct?

Dialhot 10-28-2003 08:05 AM

The "seed" is just the starting point for the randomizer. You can choose whatever you want but if you have two BB lines in your script, you should take a different seed for each one.

audioslave 10-28-2003 08:13 AM

Thanks again! :D

Jellygoose 10-28-2003 09:44 AM

Hi incredible!!

I'd love to try your script, but ATC always gives me a corrupt output (whole image is green)... :roll:
Downloaded the newest version of the filter... Any ideas?

Dialhot 10-28-2003 09:50 AM

Do you work in YV12 ? I don't have any problem but I never work in YUY2.

Jellygoose 10-28-2003 09:58 AM

Source is DVD and I don't convert to YUY2 in the script, so I suppose yes I do work in YV12...


All times are GMT -5. The time now is 03:29 AM  —  vBulletin © Jelsoft Enterprises Ltd

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