PDA

View Full Version : Jagged edges in Anime divx


Egrimm
27th September 2002, 13:55
Hey.. I just created this anime divx (demo here: http://home.planet.nl/~keijs171/solbianca-demo.avi)

Now when you see the girl standing on the beach or whatever, notice her arms have jagged edges. Is there any way to fix this?

This was my first NTSC rip, so I assume it has something to do with that. I did not use Forced FILM or IVTC because somehow that wouldn't result in a correct file :(

jggimi
27th September 2002, 15:39
It appears, looking at individual frames from around frame numbers 350-360, where there is some movement, that there are interlace artifacts in every frame. From that alone, it appears that the content was not Telecined. I may be wrong.

Here's the procedure I use, try it and see if it works for you:[list=1] Preview in dvd2avi. If it's FILM/Progressive, I use Force FILM to IVTC, and proceed as per Doom9's guides.
If not, I will make sure that Field Operations are set to None (Force FILM turned off).
I will select a scene with movement using the [ and ] buttons, and save a small test .d2v file.
I will open that .d2v in Gknot, and use the > button to move through the scene, frame by frame.
If all frames show interlace artifacts, I will use either Fast or Field deinterlace, and do no IVTC at all.
If the scene switches back and forth between interlaced and non-interlaced, I will start with Gknot's IVTC (DeComb, with defaults).
I'll test either de-interlacing or IVTC using this small test project, by previewing the .avs file that Gknot creates.
I may change the .avs script, in order to improve my perception of the output.
Once satisfied, I will go back and create a complete project in dvd2avi, and proceed as I have decided.[/list=1]{EDIT} Content which appears to switch back and forth between interlaced and non-interlaced has been Telecined. See www.doom9.org/synch.htm for more details. Also, I typically preview the .avs file in Virtual Dub or Nandub, where I can scroll forward frame-by-frame with the arrow keys.

DJ Bobo
27th September 2002, 16:46
@ Egrimm
This *seems* to be a PIONEER-DVD, because I've some Pioneer DVDs which has exactly the same points around edges and stuff. This is normal, don't worry about it. I think it's some special purpose feature of an encoder of theirs. This has nothing to do with interlacing, and I won't call this jaggies.
As for the frame rate, I assume this is real 29,97fps progressive stream. So no need for IVTC or Force Film or deinterlacing or what so ever here.
As for the interlacing in the walking scene, this is *FAKE* interlacing, well it's not interlacing at all, it's motion blur done with lines instead of... blurring! :D
So all is right with your AVI.

Just a small hint: push the audio bitrate a bit, it sounds awfull. Take 160k for example. And may be you should lower the resolution a bit, I don't think you're encoding only 2 episodes per CD aren't you?
I would suggest going down to 512x384 for example.

Egrimm
27th September 2002, 16:58
DJ Bobo > nice avatar ;)

I don't have a Pioneer DVD player, it's an AOpen...

I did what jggimi said, and got these results:
With fast deinterlace it gave me an error (error in log file or something like that).
With field deinterlace it gave an acceptable result (still a little jaggy but less than with IVTC).

Thanks guys ;)

[edit]
I'm making 4 episodes per CD... maybe I should lower that to 3 and up the sound quality a little though.

[edit2]
Omg hard to imagine some1 being so stupid ^^ The original DVD had some jagged edges as well...

jggimi
27th September 2002, 17:23
@Egrimm:

Fast deinterlace requires Gknot 0.26.1.

@DJ:

Those looked like interlace artifacts after resizing, but you may be right. (I did say I may be wrong, didn't I?)

DJ Bobo
27th September 2002, 17:42
@ Egrimm
Thanks! :D
I ment, the DVD itself is done by Pioneer may be, I don't mean the DVD player ;)
Because I have some Pioneer DVDs that have also such points around edges! this has nothing to do with interlacing or jaggies! This is nothing you can really fix, you can reduce it though using filters like SmartSmoother, but this is very time consuming.
And as said this is real 29,97fps, no place for IVTC or Force Film here.
Still that walking scene is quite irritating, well may be you can try

Telecide()

alone, without decimate, since it reconstructs the wall in the background (this way you don't become blends)
Are all scrolling scenes like that, or only this one?
If yes, it seems that the fields are inverted, but it's originally 29,97fps progressive.

[EDIT]
@ jggimi
You may be right about them being interlaced, that particular scene is indeed quite irritating.

Egrimm
27th September 2002, 17:49
You're right, the DVD is made by Pioneer...

Where should I put this Telecide() ? In the avs file?

DJ Bobo
27th September 2002, 17:54
@ Egrimm
Yes you put the Telecide() command on the AVS. You may post your AVS if you want more details.

Egrimm
27th September 2002, 17:58
#
# Created with Gordian Knot
#
# http://thewef.nav.to
#
# PLUGINS
# get them from http://users.win.be/dividee
LoadPlugin("C:\PROGRA~1\GORDIA~1\mpeg2dec.dll")
#LoadPlugin("C:\PROGRA~1\GORDIA~1\decomb.dll")
#LoadPlugin("C:\PROGRA~1\GORDIA~1\InverseTelecine.dll")
#LoadPlugin("C:\PROGRA~1\GORDIA~1\Avisynth_Spatial.dll")
#LoadPlugin("C:\PROGRA~1\GORDIA~1\GreedyHMA.dll")
LoadPlugin("C:\WINDOWS\System32\vobsub.dll")
#LoadPlugin("C:\PROGRA~1\GORDIA~1\SimpleResize.dll")
#
# SOURCE
mpeg2source("D:\dvd-temp\ep1\ep1.d2v")
#
# TRIM
trim(0,52065)
#
# IVTC
#Telecide()
#Decimate(cycle=5)
# or use
#InverseTelecine(40,10,15)
#GreedyHMA(1,0,4,0,0,0,0,0)
#
# DEINTERLACING (1)
#FieldDeinterlace()
#
# CROPPING
crop(9,0,701,478)
#
# DEINTERLACING (2)
VerticalReduceBy2
# or maybe
#GreedyHMA(1,0,0,0,0,0,0,0)
#
#
# DENOISING: choose one combination (or none)
# 1) little noise (fast)
#TemporalSmoother(2,1)
#
# 2) medium noise (slow)
#SpatialSoftenMMX(1,4,6,false,false,4,4,6,8)
#TemporalSmoother(2)
#
# 3) heavy noise (very slow, you have been warned)
#SpatialSoftenMMX(2,4,6,false,false,4,4,6,8)
#TemporalSmoother(3)
#SpatialSoftenMMX(1,4,6,false,false,4,4,6,8)
#
# SUBTITLES
VobSub("D:\dvd-temp\ep1\subs\vts_01_0")
#
# RESIZING
BicubicResize(640,480,0,0.5)
#
# BORDERS
#AddBorders(left,top,right,bottom)
#
# COMPRESSIBILITY CHECK
# !!!!Snip Size now has to be 14 for use in GKnot!
#SelectRangeEvery(280,14)
#
# FOOL CCEnc
#ResampleAudio(44100)


I suppose I have to remove the # in front of Telecide()... :)

DJ Bobo
27th September 2002, 18:05
Well, the compact form of it would be:

LoadPlugin("C:\PROGRA~1\GORDIA~1\mpeg2dec.dll")
LoadPlugin("C:\WINDOWS\System32\vobsub.dll")
LoadPlugin("C:\PROGRA~1\GORDIA~1\decomb.dll")
mpeg2source("D:\dvd-temp\ep1\ep1.d2v")
trim(0,52065)
Telecide()
crop(10,0,700,478) <- I corrected this, values should be divisible by2
BicubicResize(640,480,0,0.5) <- better use 512,384 for less compression artifacts
VobSub("D:\dvd-temp\ep1\subs\vts_01_0") <- better AFTER resizing!

I removed the "verticalreduceby2" line since it reduces quality drastically.
And you better keep the subtitles switchable, so you better remove the vobsub lines and rip the subs separately. This will give you better image quality. But this is your choice of course.

jggimi
27th September 2002, 19:43
With some content that's been Telecined, I've had very good luck with:

Telecide(guide=1,post=false)
Decimate(cycle=5)

Just to see if this is an issue of fields, rather than of actual interlacing, you might try:

Telecide(post=false)

which will reassemble frames without doing any de-interlacing. If it works, you'll both save a lot of processing time and end up with more detailed images.

If you try Telecide alone, see see if you get duplicated frames. If so, then you could try adding the Decimate line.

In all cases, preview your .avs file with vdub, so you can scroll through frame-by-frame.

Good luck!

Egrimm
27th September 2002, 22:40
Well, since the episodes are in Japanese I figured I always want the subtitles in there ..

Hm, you say that line has to go, might I ask what it does then? ^^

I couldn't find the fast deinterlace anywhere in my file, where is that line?

I'll try the new settings monday, then I get back (I'm not at my computer this weekend).

Once again thanks for all your help :)

jggimi
27th September 2002, 22:58
VerticleReduceBy2 = Gknot's "Fast Deinterlace"

Putting the subtitles after resizing improves the clarity and readability of the text.

manono
28th September 2002, 04:36
Hi-

...I figured I always want the subtitles in there ..

Dj Bobo meant to keep the subs separate, and not hard coded onto the video. They'll be played when the video is run. He's right (as always) about that allowing for better quality video, but you might not be quite ready for OCRing the subs. But if you're curious about the process, then you might want to check out Doom9's Subtitle Guides (http://www.doom9.org/subtitle_guides.htm).

DJ Bobo
28th September 2002, 11:42
Thanks for the explanation manono.

I just wanna explain a little more... he seems to have already ripped the subtitles using VobSub (so no need for OCR here)

So, Egrimm, just rename the subtitle files to the name of the AVI, and VobSub will load them automatically with your AVI while playing.
If your AVI is solbianca.avi, rename the subtitle files to solbianca.sub & solbianca.idx and put them of course in the same directory as the AVI.
As said, this will save bitrate for the video itself, as no complicated subtitles have to be encoded (subtitles are indeed very hard to compress for any encoder), and the subtitles will be perfectly readable like on the DVD (no flaws because of encoding or whatsoever, not like in fansubs, where the subs get sometimes pixelated ;))

Egrimm
28th September 2002, 12:34
I see your point, but this would require people who watch my eps to have vobsub installed, wouldn't it? Would it work with any player?

I have OCR'ed subtitles before but I didn't quite like the results of that (it wouldn't recognise all characters correctly).

DJ Bobo
28th September 2002, 16:54
Yes, people must have VobSub installed. This is no problem, just include vobsub on your CD.

jggimi
28th September 2002, 17:07
The only part of Vobsub they'll need to install is DirectVobSub; which keeps it small and simple.

neuron2
29th September 2002, 15:16
Apply SeparateFields() and step through the bad section. You'll see why that combing is there!

Best to apply FieldDeinterlace(full=false,blend=false) so that the bad frames gets fixed without affecting the good frames.

jggimi
29th September 2002, 16:01
Thanks for the SeparateFields() tip, Don!

Egrimm
30th September 2002, 12:07
Just saw you guys (or at least jggimi) made a guide on this, thanks!! Going to read it right now ;)

jggimi
30th September 2002, 14:33
I was only one of many. Hakko504 and Manono did most of the work, and Doom9 made some final changes, plus, many suggestions for improvements came from others.

For those who want the link:

http://www.doom9.org/ivtc-tut.htm

DJ Bobo
30th September 2002, 15:34
Now where is my ultra super outstanding hyperbolic magnificent ivtc(44,11,95) setting gone?! I don't see it anywhere in the guide :D
And my u.s.o.h.m secured ivtc(44,11,95) + fieldeinterlace() setting? I don't see it neither :D :D

manono
30th September 2002, 15:57
Hi-

Am I mistaken, or wasn't that Awatef's setting?;) And quoting from the tutorial:

For Anime in particular, IVTC2.2 has its adherents. It only handles undoing the Telecining for NTSC DVDs and doesn’t
have a Deinterlacer built into it. But what it does, it does very well.
That was especially for you DJ Bobo.:)

DJ Bobo
30th September 2002, 16:16
@ manono
:D well, I began it all, awatef just optimized a little bit at the end :D