Log in

View Full Version : x264 encode sparkles/glitters


ZionDK
3rd January 2008, 23:14
I've noticed that some of my encodes have areas that sparkles/glitters and it is real annoying to look at.

I couldn't catch it in a screenshot so I've uploaded a sample instead: http://rapidshare.com/files/81044484/template_encode-002.mkv.html (827 KB). Look at the hair on the left side.

When looking at source it is also there, but a bit less, and if it is possible i would like to remove/reduce it.

Got any recommendation of filters?

Terranigma
3rd January 2008, 23:42
What you call sparkle/glitter, I call artifacting. I'd say use a better deinterlacer.

ZionDK
3rd January 2008, 23:51
But I am: Yadif (same thing with TDeint()).

As I said it's also in the source.

Terranigma
3rd January 2008, 23:53
But I am: Yadif (same thing with TDeint()).

As I said it's also in the source.

Could you upload an unprocessed sample of the original?

ZionDK
4th January 2008, 00:05
No problem: http://rapidshare.com/files/81057266/template_encode-002.VOB.html

Terranigma
4th January 2008, 00:35
Ever heard of Inverse Telecine? That Video rarely needs to be deinterlaced. Check my sample
http://www.zshare.net/download/6162205c8bf130/
(deinterlaced frames = 0)


I also increased the resolution, because that was just way too small and lowered the bitrate from what you have.

So read up on decomb or tivtc.

ZionDK
4th January 2008, 09:44
I see that every movie on HDBits is pulled down to original 23.976 fps just like you did. Is that the way to go for maximum quality?

Instead of deinterlacing I tried what you said and put this in my script
AssumeTFF()
Telecide()
Decimate(cycle=5)
But I still see a lot more artifacts than you have. The color is also much different and yours look way better. I've uploaded a sample here: http://rapidshare.com/files/81130799/decomb_test.mkv.html (MeGUI upped the bitrate a bit from desired input = 1500). What minimum bitrate would you suggest for sources like this?

Is it because I resize with LanczosResize?

Also, what did you do to keep original AR? You can see why I ask here: http://forum.doom9.org/showthread.php?t=133233. I put in a
# Resize to original AR
LanczosResize(640,480)
after the inverse telecine process.

Besides all of my questions I'd love to see your avs to see exactly what you did.

foxyshadis
4th January 2008, 19:36
Almost all movies need IVTC, but for regular interlaced shows, it can totally mess it up. You just have to find out by using separatefields, it's simple enough.

Terranigma
4th January 2008, 19:54
Besides all of my questions I'd love to see your avs to see exactly what you did.

That's like asking the same thing from an internal encoder at the site you mentioned; to post their script. :D

For the ivtc process that was applied here though, I used the overly complicated YATTA (http://en.wikipedia.org/wiki/YATTA).

ZionDK
4th January 2008, 20:34
For the ivtc process that was applied here though, I used the overly complicated YATTA (http://en.wikipedia.org/wiki/YATTA).
That Yatta seems complicated, and I'm not quite sure what to do with it. Is it something like [this] (http://forum.doom9.org/showpost.php?p=1033248&postcount=6)?

Anyway, when I try to load my .d2v I get this error:
http://img242.imageshack.us/img242/1552/errorua2.th.png (http://img242.imageshack.us/img242/1552/errorua2.png)

If it's to much of a work to guide me through Yatta, I totally understand, and I guess I have to settle for less quality. Otherwise, thank you!

Terranigma
4th January 2008, 20:44
Is that from the YATTA metrics calculator, or the YATTA inverse teleciner? You'd need to select a suitable decoder for .d2v files. By default, iirc, Mpegdec3 is selected, so to change this to dgmpgdec, start the Inverse Teleciner, choose "settings", the project settings tab, and dot in DGDecode. That should fix your problem.

ZionDK
4th January 2008, 21:02
Is that from the YATTA metrics calculator, or the YATTA inverse teleciner? You'd need to select a suitable decoder for .d2v files. By default, iirc, Mpegdec3 is selected, so to change this to dgmpgdec, start the Inverse Teleciner, choose "settings", the project settings tab, and dot in DGDecode. That should fix your problem.
It was the YATTA inverse teleciner. I did what you said and I have my video loaded.

When I read the "Manual by nmap" I get lost. I think it tells me things that aren't there?! Could you tell me what you did in Yatta that gave the fine sample? Is [this] (http://forum.doom9.org/showpost.php?p=1033248&postcount=6) part of it?

Terranigma
4th January 2008, 21:26
It was the YATTA inverse teleciner. I did what you said and I have my video loaded.

When I read the "Manual by nmap" I get lost. I think it tells me things that aren't there?! Could you tell me what you did in Yatta that gave the fine sample? Is [this] (http://forum.doom9.org/showpost.php?p=1033248&postcount=6) part of it?

It should be in the manual. :)
But instead of trying to find where exactly, step through a few frames to find frames that're interlaced (it's usually 3 progressive frames followed by 2 interlaced), and hit the switch tab (or set a shortcut in settings - key associations) to switch those to progressive frames. Now between those 5 frames, you should have a pattern of cccnn (The 2nd n being a dupe of the next consequential frame, and needs to be removed.) Look to your upper-left for what's in play, to see if it's cccnn. Now you can comfortably set up the pattern to restore the 2 interlaced frames, and discard the remaining dupe.
Right-click and choose Set Pattern. For Matches, set it to
cccnn
For Decimation, set it to.
kkkkd

Now whenever you'd like to apply this pattern, first look for 3 progressive frames, go to the first one, and hit the Try Pattern tab.

ZionDK
4th January 2008, 21:57
I'm not able to hit switch :(

http://img242.imageshack.us/img242/3085/66282399ax2.th.png (http://img220.imageshack.us/img220/9506/35081602ny8.png)

<-- EDIT -->
Changed project type to 1 and now it's hitable.

That YATTA is pure hell...

Terranigma
4th January 2008, 23:57
That YATTA is pure hell...
haha, yeah it is at first. :P

ZionDK
6th January 2008, 15:39
(...) step through a few frames to find frames that're interlaced (it's usually 3 progressive frames followed by 2 interlaced), and hit the switch tab (or set a shortcut in settings - key associations) to switch those to progressive frames.
Done!

Now between those 5 frames, you should have a pattern of cccnn (The 2nd n being a dupe of the next consequential frame, and needs to be removed.) Look to your upper-left for what's in play, to see if it's cccnn. Now you can comfortably set up the pattern to restore the 2 interlaced frames, and discard the remaining dupe.
Right-click and choose Set Pattern. For Matches, set it to
cccnn
For Decimation, set it to.
kkkkd

Now whenever you'd like to apply this pattern, first look for 3 progressive frames, go to the first one, and hit the Try Pattern tab.
It did match, but I don't understand how the pattern thingy works. I set the pattern as you say, but when I press the "Try Pattern" button, and it says "cccpp cccpp cccpp c (Pattern Test)" and I click Use Pattern, nothing happens.

http://img151.imageshack.us/img151/5212/35656950pi0.th.png (http://img151.imageshack.us/img151/5212/35656950pi0.png)

After I click Use Pattern, it goes back to cccpp ccccc ccccc c.

Terranigma
6th January 2008, 16:34
Oh, did I forget to mention that when you choose to "use pattern", the frame that you reside on will be the last frame taken into account? So you'd need to advance further until the pattern changes (usually around scene changes.)

ZionDK
6th January 2008, 17:15
Oh, did I forget to mention that when you choose to "use pattern", the frame that you reside on will be the last frame taken into account? So you'd need to advance further until the pattern changes (usually around scene changes.)
Got it.

When loading the avs YATTA creates in MeGUI I get this error window
http://img520.imageshack.us/img520/3777/errorwe9.th.png (http://img520.imageshack.us/img520/4606/errorty3.png)

The line is this one: FieldHint(ovr="C:\Documents and Settings\User\Skrivebord\test2.fh.txt")

The content of this textfile is
[YATTA V2]
SAVEDBY=YATTA - Version 6-129
LASTVIDEOPATH=C:\Documents and Settings\User\Skrivebord\template_encode-002.d2v
TYPE=1
ORDER=1
FRAME=0
FRAMECOUNT=180
MPEG2DECODER=DGDecode
WITHDECIMATION=-1
DISTANCE=5
DECIMATETYPE=0
VSETTING=3
POSTPATTERN=ooooo
MATCHPATTERN=cccnn
DROPPATTERN=kkkkd
FREEZEPATTERN=ooooo
NOPATTERN=0
RESIZER=1
POSTPROCESSOR=0
POSTTHRESHOLD=0
SHARPKERNEL=-1
TWOWAYKERNEL=0
XRES=640
YRES=480
X1=0
X2=0
Y1=0
Y2=0
ANAMORPHIC=0
BICUBIC_B=0.333333343267441
BICUBIC_C=0.333333343267441
PRETELECIDE2=-1
POSTTELECIDE2=-1
PREDECIMATE2=-1
POSTDECIMATE2=-1
POSTRESIZE2=-1
CUTSTART=-1
CUTEND=-1

[PRESETS]
0¤0¤"Default"¤""


[MATCHES]
c
c
c
n
n
c
c
c
n
n
c
c
c
n
n
c
c
c
n
n
c
c
c
n
n
c
c
c
n
n
c
c
c
n
n
c
c
c
n
n
c
c
c
n
n
c
c
c
n
n
c
c
c
n
n
c
c
c
c
c
c
c
c
c
c
n
n
c
c
c
n
n
c
c
c
n
n
c
c
c
n
n
c
c
c
n
n
c
c
c
n
n
c
c
c
n
n
c
c
c
n
n
c
c
c
n
n
c
c
c
n
n
c
c
c
n
n
c
c
c
n
n
c
c
c
n
n
c
c
c
n
n
c
c
c
n
n
c
c
c
n
n
c
c
c
n
n
c
c
c
n
n
c
c
c
n
n
c
c
c
n
n
c
c
c
n
n
c
c
c
n
n
c
c
c
n
n
c
c
c

[ORIGINALMATCHES]
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c

[POSTPROCESS]

[DECIMATE]
4
9
14
19
24
29
34
39
44
49
54
66
71
76
81
86
91
96
101
106
111
116
121
126
131
136
141
146
151
156
161
166
171
176

[NODECIMATE]

[FREEZE]
56,56,57

[SECTIONS]
0,0

Terranigma
6th January 2008, 17:42
That's because there's no file named test2.fh.txt. To create this file, open your project with yatta and choose Preview. 2 files should then, automatically be created, one for the field matches, and the other for the decimated frames, so one for .dec.txt and the other for .fh.txt.

ZionDK
6th January 2008, 17:51
Thanks.

Finally it's working, but I don't see any difference to the first sample I posted :( http://rapidshare.com/files/81747336/test2.mkv.html

Still the same artifacts.

Could it be caused by the video profile that I use (HQ-Slower)?

CruNcher
6th January 2008, 18:06
if it's somekind of block flickering (i didn't watch the samples yet) then i can tell you it's a low bitrate X264 quality problem (that's exisiting since day 1, and seemes then still not to be fixed) and you should up the bitrate then or use AQ to get rid of it for now ;)

ZionDK
6th January 2008, 18:24
It isn't. I use more bitrate than Terranigma.

Terranigma
6th January 2008, 19:16
It isn't. I use more bitrate than Terranigma.

Well I was thinking you were talking about the artifacts that was caused by deinterlacing. At least you know about ivtc now. :D
What you're talking about has to be done through filtering.

ZionDK
6th January 2008, 19:30
Well I was thinking you were talking about the artifacts that was caused by deinterlacing. At least you know about ivtc now. :D
Yep. Always good to learn.

What you're talking about has to be done through filtering.
What did you use to remove it?

Terranigma
6th January 2008, 19:59
give fft3d a try.

ZionDK
6th January 2008, 21:46
This is as good as it gets: http://rapidshare.com/files/81804399/template_encode.mkv.html

Did you only use fft3dfilter? If so, could you post the settings? (I know you probably won't but I had to ask).

Thanks for recommending fft3dfilter.

ZionDK
8th January 2008, 17:29
Did you only use fft3dfilter? If so, could you post the settings? (I know you probably won't but I had to ask).
Pretty please?

:o