Log in

View Full Version : 'Blocking' artifacts when using DivX 5.02, what causes them?


ArdenDag
15th December 2002, 07:35
I am encoding a 1 CD rip of Princess Mononoke (again) just for kicks, I have the R1 NTSC disc.

I used b-frames and GMC on for the Pro features.
I am using the following script for a 2 pass encode with 589 Kbps and a 128 Kbps VBR MP3:

LoadPlugin("C:\PROGRA~1\GORDIA~1\mpeg2dec.dll")
LoadPlugin("C:\PROGRA~1\GORDIA~1\decomb.dll")
LoadPlugin("C:\PROGRA~1\GORDIA~1\Convolution3D.dll")

mpeg2source("C:\Documents and Settings\Arden\Desktop\Princess Mononoke.d2v")

Telecide(guide=1,chroma=true,post=true)
Decimate(mode=2,quality=3,cycle=5)

crop(0,4,720,468)

BiCubicResize(512,272,0,0.75)

Convolution3d(preset="animeHQ")

Tweak(sat=1.4)

I noticed the macroblocks only in high motion scenes and only when really paying attention to the video, are they less noticable when GMC is turned off? I don't want to let my computer run another 24 hour encoding job unless it'll be worth my time :)

Yes, I intend to keep this at 1 disc (700 MB) so don't bother telling me to up the bitrate :)

Just a quick question, heh. Link is a clip from my encode, about half way through you'll really notice the blocks ;) Also, I think I tweaked the saturation a bit high, but that's my taste :)

I assume this'll be the best I can do for the limitations I've set.

Princess Mononoke Clip (http://mywebpages.comcast.net/daghlian/PMClip.avi)

Suzahara
15th December 2002, 08:26
Well, I'm sorry to say this, but the bitrate is most likely your problem. 589kbps just isn't enough. For a good divx file, you need at least 1000kbps of bitrate. The other culprit might be leftover noise, but as I remember, Mononoke is a fairly clean source. GKnot says .111 Bits/Pixel*Frame, which is a very low number. But the problem is (as I'm sorry to say again) your low bitrate.

BTW, the clip link doesn't work.

DJ Bobo
15th December 2002, 11:20
@ ArdenDag
You did a big big mistake! I have the Princess Mononoke R1 DVD and it's completely progressive! you don't need Decomb or IVTC or what so ever, just enable "Forced FILM" in DVD2AVI and that's it!

Second, GMC should be avoided until a new version of DivX comes out, because it produces strange artifacts.

Third, the DVD has such good picture, you don't need filtering at all. At max, you'll need TemporalSmoother(1). You don't need convolution or tweak or whatsoever.

Fourth, 512x272 is a little bit too much for 590kbps. You better go down to 432x240. I encoded my DVD to that resolution, but nevertheless, I got a quantizer of 4,4 using B-frames. So it's quite far from saturation even at that resolution.

BTW, the link (still) doesn't work...

[EDIT]
Just for information, this is the script I used:

loadplugin("...\mpeg2dec.dll")
mpeg2source("...\pm.d2v")
crop(...)
BicubicResize(432,240,0,0.5)
TemporalSmoother(1)

When I playback, I use MAX post processing for completely artifact free picture.

NB: I encoded the credits separately at a fixed quantizer of 31 to save space for the main movie.

ArdenDag
15th December 2002, 14:30
Thanks for the replies :)

I fixed the link, it was capitalization problems, *sigh*, I thought I put it all lower case when I uploaded, but the ftp program kept the case.

@DJ bobo

I was weary about using force film because DVD2AVI did 'blurb' NTSC 1% every so often while previewing, I just wanted to make sure :)

I will give that a try, heh

ArdenDag
15th December 2002, 16:08
@DJ bobo

I force filmed it, checked the .d2v project with VDub and noticed small mismatched fields every so often, so it isn't perfect to force film it, it seems.

The movie is almost all progressive, though, so I doubt I'll notice these problems when playing it through.

The main difference in these two is that this will require a lot less time to encode ;)

Script I'm using for this next test is here:

LoadPlugin("C:\PROGRA~1\GORDIA~1\mpeg2dec.dll")

mpeg2source("C:\Documents and Settings\Arden\Desktop\Princess Mononoke Progressive (Forced Film).d2v")

crop(0,4,720,468)

BiCubicResize(512,272,0,0.5)Simple eh?

ArdenDag
15th December 2002, 16:51
With no smoothing filter, the result was horrid... and I repeat, horrid :)

I actually think my first encode (clip link in first thread) is decent, I was just wondering if disabling GMC would have affected it for the better.

DJ Bobo
15th December 2002, 17:14
Hmm... seems like there is 2 different R1 releases. I have the canadian one, I guess you have the US-one.
On my DVD, there is one single time, where it shows NTSC, where it switches between the miramax introduction and the Ghibli picture, and then it remains FILM til the end.

As about your first rip, you used that convolution thing which improves compressibility greatly and I guess, it blurs quite much and shows you a very digital picture. May be that's why it looks better to you (although it's not better, because less detailed :D)

Anyway, 512x272 remains too much for a 1-CD rip of Mononoke Hime (the movie is just too long)
I'll try to download your clip in a few hours...
Until then, here is a screenshot from my rip for you to compare: (it's a keyframe, frame no.3502)

ArdenDag
15th December 2002, 17:17
screenshots don't show me much (I'm assuming it's attached, so I have to wait for a mod to approve it ;) ) as it's the movement scenes which are problematic.

If you get a chance to d/l my clip give a shout out telling me how it looked anyway ;)

Suzahara
15th December 2002, 19:35
This clip is an obvious lack of bitrate for a movie of this length and resolution. You definitely need to reduce it. Use GKnot to find a good res (e.g. with a Bits/Pixel*Frame near .25). I hardly ever have strange artifacts with GMC and I use it all the time. Blockiness is usually more the effect of the combination of high res with low bitrate, as is this case probably with this. And on the matter of force film, you can use this (if you really want the speed increase), but ivtc is probably better in the long run. If you do use force film, I would do a quick check for interlace and if in doubt, just put fielddeinterlace() or something in there to get the rest out.

ArdenDag
15th December 2002, 19:39
Originally posted by Suzahara
This clip is an obvious lack of bitrate for a movie of this length and resolution. You definitely need to reduce it. Funny, I thought I mentioned that I needed it to be a 1 CD rip at 700 MB? :D

I guess you answered my question, though, GMC shouldn't be causing any problems. I'll keep this clip as is, as I think it's the best quality I'll get for the filesize I want.

EDIT: BTW, here is the same frame from my encode (the already compressed .avi output frame from VDub, saved as 100% quality JPEG)

This is why single frames have no bearing for me

http://mywebpages.comcast.net/daghlian/pmframe.jpg

DJ Bobo
15th December 2002, 19:48
I just downloaded your clip, it has more artifacting than my version, and the surfaces dance a lot. On my version, there is almost no dancing.
I used the above script, default DivX5 settings, only bidirectional encoding (no GMC, no Q-Pel) and averaging period as the half of the entire number of frames. As said all other things kept as is.

I encoded the credits separately with quality based 0% so I saved a lot of space for the main movie and was able to use 148kbps true VBR MP3 (not ABR), keeping the video bitrate by 592kbps.

My version doesn't look perfect, but better than your version :D

[EDIT]
Just took a look at your screenshot, you forgot to crop 2 more pixels at the left.

ArdenDag
15th December 2002, 19:52
@DJ Bobo

I assume, also, that that 'extra' quality gain might be because of the resolution I encoded at, I could probably gain back what I lost by going down to 416x224. I will not use Force Film, I would rather use:

Telecide(guide=1,post=false)
Decimate(quality=3,mode=2,cycle=5)

Just my preference

EDIT: hehe, I cropped the 2 pixels at the right when I saved the picture, there's actually 2 pixels of black on both sides ;) I just did cropping on the top and bottom when I encoded

EDIT 2: hmm, you said you made the averaging period half the total number of frames, that would cause less of the 'it's time to save bitrate, so let's switch the bitrate mid-action, mid-scene' that I've noticed. But is it safe? Say the first half of the movie takes up a lot of the bitrate on an encode, the other half would be sorely crippled because of the lack of bitrate left to keep the same average bitrate... am I making sense? :)

4 edits is just 4 too many :D

Suzahara
15th December 2002, 20:25
Originally posted by ArdenDag
Funny, I thought I mentioned that I needed it to be a 1 CD rip at 700 MB? :D

I guess you answered my question, though, GMC shouldn't be causing any problems. I'll keep this clip as is, as I think it's the best quality I'll get for the filesize I want.

EDIT: BTW, here is the same frame from my encode (the already compressed .avi output frame from VDub, saved as 100% quality JPEG)

This is why single frames have no bearing for me

http://mywebpages.comcast.net/daghlian/pmframe.jpg

I meant to reduce the resolution :D

ArdenDag
15th December 2002, 20:44
I mean to do another encoding at 416x224, this time I will use LanczosResize instead of BiCubic 0,0.75, as I think LanczosResize might give me a slightly better picture :)

I'm the man who loves (and this is a term a lot of people read too much into... lol) sharp and crisp images, so I prefer that resize to 0,0.5 bicubic :)

LoadPlugin("C:\PROGRA~1\GORDIA~1\mpeg2dec.dll")
LoadPlugin("C:\PROGRA~1\GORDIA~1\decomb.dll")
LoadPlugin("C:\PROGRA~1\GORDIA~1\Convolution3D.dll")

mpeg2source("C:\Documents and Settings\Arden\Desktop\Princess Mononoke.d2v")

Telecide(guide=1,post=false)
Decimate(mode=2,quality=3,cycle=5)

crop(0,4,720,468)

LanczosResize(416,224)

Convolution3d(preset="animeHQ")

Tweak(sat=1.3)I'll also encode the credits seperately this time, for that extra few bits (which might just seem precious ;) ) for this. 5 minutes is 5 minutes, I guess :D (Even though for this movie it's only 4%, a 4% gain of quality is 612 kbps, noticable? probably :D )

I'll disable GMC, and, barring response from DJ Bobo concerning the averaging period, I might tweak it a bit :D

ArdenDag
15th December 2002, 21:03
Off topic a bit, but...

Why is it that like 80-90% of the avatars I see (on almost all message boards I frequent) are from anime? ;)

Suzahara
16th December 2002, 01:00
Originally posted by ArdenDag
Off topic a bit, but...

Why is it that like 80-90% of the avatars I see (on almost all message boards I frequent) are from anime? ;)

Because anime otaku are almost all computer geeks too. And you find computer geeks on forums. So therefore, a lot of anime otaku on forums as well. And anime otaku love anime images so they put an anime avatar. This includes me :)

ArdenDag
16th December 2002, 06:15
and me...

woo, a little drunk from our work christmas party... where's DJ bobo? I want a response to my question about the averaging period :)

Fox Mulder
16th December 2002, 07:00
"The only parameter you can safely change is RC averaging period, This represent the number of frame the RC algorithm will take in account to match the requested bitrate. Do not go under 100 frames even for shorter clip, the idea is to have the RC averaging period long as the half of the length of the clip you encode. The RC, specially in 2 pass mode, will allow more temporal variation of the bitrate and thus have a better handling of the fast motion scene."

Taken from Gej's DivX Encoding Guidelines @
http://www.divx.com/support/guides/guide.php?gid=1

ArdenDag
16th December 2002, 15:58
Thanks :)

?¿öM¿?
17th December 2002, 16:13
Just wanted to point out that using LanczosResize at such a low bitrate is going to give you a nasty end product, you are probably better of using BicubicResize(x,y,z,0.5) like DJ Bobo. Lanczos will try to preserve to much detail and create noise, though anime doesn't usually have very much detail anyway. However, I have only encoded one anime and it looked terrible so I am probably better off being ignored...

ArdenDag
17th December 2002, 20:01
Anime doesn't have much detailUmm, ok, I'll let that one slide for now :D

I'm fine with what I got, the lower resolution looked similar to my first encode, if I had the filespace I would upload a clip from this, too, I only have 25 MB *shrug*

DJ Bobo
17th December 2002, 21:28
@ ??????? :D
I'll try to explain a bit about the detail level of Anime.
You may be right about most series (what is produced for weekly TV airing), but the movies and the so called OVA have generally a higher detail level, especially the movies, they reach sometimes some super high detail level, you'll just love what you see ... here is a screenshot for you:

ArdenDag
18th December 2002, 03:10
I can't say this any better:

Miyazaki is god of anime :D

?¿öM¿?
20th December 2002, 06:02
@DJ Bobo

I stand corrected, that is an obscene amount of detail.:o