View Full Version : Anime with 3:2 in intro
GrandDK
5th January 2009, 16:32
Im doing an encode of an Anime where the intro has a 3:2 Pattern and the rest is progressive.
I used TFM().TDecimate() to get rid of that but is unsure if i have to specify the frames where this should be used or does it has no impact on the progressive frames?
i also thought it needed some touch up as the picture was kinda blurry. But i have one problem i think is caused by Sharpening. They seem to loose some charistica especially the mouth and nose seems to loose some details due to that. Is there something i can do to prevent that? also with the settings there seems to come a bit of noise i can't really figure out what is causing it.
my commandline
mpeg2source("\VIDEO_TS\VTS_02_1_ep1.d2v",info=3)
TFM().TDecimate()
gradfun2db()
Toon(0.3)
SharpAAMCmod()
WarpSharp(10, 10, 120, -0.6)
LSFmod(30)
Spline36resize(720,480,4,0,-3,-0)
I have upconverted the screens to better show what i mean.
I have though lowered the settings a tad down from the original settings used for this screenshot.
http://img.phyrefile.com/granddk/2009/01/04/upconvertedsource2.png
http://img.phyrefile.com/granddk/2009/01/04/upconvertedencode2.png
with the settings above i get this result:
http://img.phyrefile.com/granddk/2009/01/04/encode4.png
Hope there is some that can help me with this problem :)
manono
5th January 2009, 19:27
Welcome to the forum,
Im doing an encode of an Anime where the intro has a 3:2 Pattern and the rest is progressive.
Make the D2V using "Honor Pulldown Flags" and:
TFM(D2V="c:\oursource.d2v")
TDecimate()
Spline36resize(720,480,4,0,-3,-0)
I don't know if this is the cause of your problem, but you should do all your cropping by at least Mod2 pixels. Cropping an odd number may lead to blurring. You'll notice (assuming YUV video) that you're not allowed to do it this way:
Crop(4,0,-3,0)
Spline6Resize(720,480)
And my opinion is that you're filter happy. Is the source really that bad? But then, I don't know what "charistica" is.
GrandDK
5th January 2009, 19:48
Welcome to the forum,
Make the D2V using "Honor Pulldown Flags" and:
TFM(D2V="c:\oursource.d2v")
TDecimate()
I don't know if this is the cause of your problem, but you should do all your cropping by at least Mod2 pixels. Cropping an odd number may lead to blurring. You'll notice (assuming YUV video) that you're not allowed to do it this way:
Crop(4,0,-3,0)
Spline6Resize(720,480)
And my opinion is that you're filter happy. Is the source really that bad? But then, I don't know what "charistica" is.
i can try but shouldn't do that much with only 1 px. and i know i can't do it otherwhise that was why i used it in spline. will overcrop it by 1 to see if that helps.
Well i have never before really been into using filters but found those filters to give me the optimal result with minimal downsides.
sorry my english is not the best i meant charistic. The only thing i did in the source picture was resizing it to 1440x960 still with the side borders cropped. I thought it was pretty bad don't know if i expect to much as i usually only mess around in HD anyways thanks for your answer will test it out when i come home.
Nightshiver
5th January 2009, 22:21
Can you post a sample of untouched video please?
thetoof
5th January 2009, 23:00
1 - I doubt that Elfen Lied is 30p... so straight up ivtc could work for you (though as Nightshiver said, a sample of a 30p section with a lot of motion would be good)
2 - The loss of detail you see is because of over-warpsharpening : sharpaamcmod already uses warpsharp and you adding more afterwards
3 - most of your sharpening settings can be done in a single call, as sharpaamcmod uses everything you've used (toon, warpsharp and lsf)
4 - You can even do IVTC + edge sharpening in a single line with animeivtc(mode=1,aa=4,thin=x, dark=x, sharp=x)
thin = warpsharp
dark = toon's strength
sharp = lsf's strength
Last thing, as manono said, you source seem quite good shouldn't require that much filtering. Or at least not with strong settings or multiple calls of the same filters.
GrandDK
6th January 2009, 00:59
here is a sample of the intro where there is a 3:2 pattern: http://www.mediafire.com/?xjmzgsbysn3
1 - It's a NTSC disc DGIndex tells me it's interlaced and is 29.970 FPS but the episode it self is only containing progressive frames that i'm sure of.
2+3 - Thank you so much for that i have edited my commandline to reflect the new knowledge given :)
4 - I tried with AnimeIVTC but thought it was somewhat Jerky in the frames through the intro (might just be me) will do a second check as i also had all the sharpening filters enabled also.
As you can see in the upconverted source screen all the lines have this kinda fog around them it's doesn't look intended if you know what i mean i wanted more darken lines and smooth lines. :)
EDIT: seems i can't get this command to work
TFM(D2V="c:\oursource.d2v")
TDecimate()
Says Invalid argument to function "TFM"
TFM(D2V="C:\Downloads\Elfen.Lied.Complete\ELFEN_LIED_COLLECTION_DISC_1\VIDEO_TS\Episode.1.d2v")
TDecimate()
Crop(4,0,-4,-0)
Spline36resize(720,480)
manono
6th January 2009, 03:06
Your source looks fine to me. Me, I wouldn't filter it at all, but I know how anime guys like to fiddle around with everything under the sun.
TFM(D2V="E:\Test\Test.d2v")
TDecimate()
works here. Did you double-check your paths? Is the D2V really named "Episode.1.d2v"? That form of TFM is how you handle a mix of hard telecine and soft telecine. It treats the soft telecined parts as if they were Force Filmed, and only IVTCs the hard telecined parts. It's faster that way, as compared to IVTCing the entire thing.
Also, I don't think I'd Crop and Resize it. Maybe just Crop and AddBorders. I don't see anything even needing cropping at the top. I guess you're just doing that to keep the AR after removing the black along the left side. Unless there's some black at the top elsewhere in the video. This is for reencoded DVD, isn't it? If for some other format then ignore this last paragraph.
It's a NTSC disc DGIndex tells me it's interlaced and is 29.970 FPS
It's saying 29.97 because you have it set for Honor Pulldown Flags. If you set DGIndex's Field Operation for Forced Film, it'll tell you it's 23.976fps. The episodes themselves (not the opening) say Film/Progressive, don't they?
GrandDK
6th January 2009, 04:23
yes i just made that to make sure i had made it with honor pulldown. but it still gives me that error. i have it writtin in exactly as i wrote above.
i haven't cropped anything at the top only left & right side. i took them away because it didn't seem to mess to much with the AR but can remove it to see if there is any quality penalty by resizing.
and yes from the NTSC DVD collection.
Exactly it's only intro at 29.97.
Still can't figure out why your script can't work is there maybe a filter i need for doing the command that manner?
thetoof
6th January 2009, 04:49
do you actually specify a clip to filter?
usually there should be a mpeg2source call before tfm...
manono
6th January 2009, 05:02
haven't cropped anything at the top only left & right side.
Sorry, my mistake. Don't know what I was thinking there. Then if you're cropping the right and left sides and resizing to 720x480, you're changing the aspect ratio, making people and things slightly fat. Maybe you know that and are doing it on purpose, but I still think if you want to crop the sides, I'd add them back with an AddBorders. That way you avoid a resize which, no matter how good the resizer, degrades the image slightly.
And pay attention to what thetoof said. Is there an MPEG2Source line at the top of the script. And a DGDecode.dll, either explicitly loaded or residing in your AviSynth Plugins folder?
Edit later: I was just thinking. Is your TIVTC up to date?
kemuri-_9
6th January 2009, 06:54
and yes from the NTSC DVD collection.
Exactly it's only intro at 29.97.
as this appears to be from the ADV Films US release (i have the dvds too),
the entire stream is 29.97 as there is a visible duplicate within sets of 5 frames all along the stream.
that is, except for the scrolling ending credits which is overlayed on at 29.97...
but yes, there's no combing outside of the opening (minus the actual credits scrolling in the ending)...
so you can get away with only decimating the actual episode as it doesn't require field matching like the opening.
ivtc'ing the ending creates a small jerk in the credits despite the background video no longer having dups,
but how you want to handle the ending exactly is up to you.
Nightshiver
6th January 2009, 13:34
Even if you set "Force Film" in DGIndex, there is still interlacing, making me think it is hybrid or hard telecined.
GrandDK
6th January 2009, 13:34
@ manono Yes i was aware of that i actually just thought it was junk as it didn't seem to screw up the ar. But i have noticed now after some time looking at uncropped source vs. cropped/resized that the image does indeed get more blurry because of the resize so i wont crop/resize it.
Im not home atm so can't check the filters but have tried adding mpeg2source.TFM(d2v="blablabla.d2v") didn't work might be that a filter is outdated will check for that :)
@ kemuri-_9 ohh i only thought it was in the intro that it was 29.970. it didn't look like the ep i am experimenting with. had no credits or atleast they must be very short as i haven't seen them. then will double check that also.
@Nightshiver I also thought that and tried with AnimeIVTC(mode=6) but didn't seem as good as TFM().TDecimate()
I'm now only using Gradfun2db(1.5) to get rid of some banding/blocks.
thetoof
6th January 2009, 20:14
The "blurriness" of the image after resizing depends a lot on the resizer used. You could try spline64resize or even automttap3 by *mp4 (http://forum.doom9.org/showthread.php?p=1211873#post1211873) guy which is quite sharp and prevents ringing.
mpeg2source("blablabla.d2v")
tfm(d2v="blablabla.d2v")
The credits could be in a separate .vob, which may be why you didn't notice them.
What didn't seem as good as plain tfm + decimate? (sample, details, etc.)
GrandDK
6th January 2009, 20:25
This is the commandline i used.
AnimeIVTC(mode=6, omode=1, precision=3, aa=2) didn't seem as good as tfm + decimate. am at work now will post a sample when i come home.
But can it really be right that the video was made with such small borders on the sides? because i don't want to remove them if they are intended, it's another story if it's just junk as i really get bugged by the lines i can't stop starring at them if you know what i mean hehe.
Nightshiver
6th January 2009, 21:40
Did you also try mode=5? You can use either 5 or 6 for hybrid video.
GrandDK
6th January 2009, 22:31
I would believe i did had some troubles though with AnimeIVTC as i started playing around with mode=3 with istart1 etc. (very confusing btw) so i'm not 100 % affirmative that i used that correctly.
thetoof
6th January 2009, 23:25
Yeah, sorry about that. You'll only have to specify the end frame of each section in the source clip and the rest will be done internally in 1.07.
GrandDK
7th January 2009, 00:16
sounds great will make it a bit easier as the only possible way i could see it be done was like this "Istart1=0, Iend1=2, pstart1=3, pend1=5 etc. just curious is there a command for telling it that it should only touch 2 frames every 3 frames is there a command for that?
i did it like this estart1=0, eend1=2771, pstart1=2772, pend1= 34577 was that incorrect?
Edit:
@ thetoof
mpeg2source("blablabla.d2v")
tfm(d2v="blablabla.d2v")
That worked :) will try an encode with that setting
thetoof
7th January 2009, 01:30
You've got the i/e/p settings wrong.
Little recap:
-Based on the sample, the opening is simply hard telecined
-Based on what kemuri-_9 said, the episode is not properly telecined, but there is a duplicate frame that should be decimated
-Based on what kemuri-_9 said, the credits are interlaced on top of telecined, meaning that simple ivtc will introduce jerks
Solution:
Apply regular IVTC to the opening and the episode (since no frames are combed, tfm will not act on the episode and it will simply be decimated)
IVTC the credits (jerks) or deinterlace them for VBR or CFR encode
If you want to use AnimeIVTC (which is only one of the many options available)
AnimeIVTC(mode=3, estart1=0, eend1=last frame of ep, istart1=1st frame of ending credits, iend1=last frame)
You'll need estart/end2 if there's any telecined section after the credits.
The pstart/endx are for progressive credits on top of a telecined background, which is not what you have. They are not meant for progressive sections (this is dealt with by treating the clip as hybrid (mix of 24t and 30p, but not 30p overlayed on 24t))
GrandDK
7th January 2009, 17:49
So TFM.Tdecimate for the intro+episode and deinterlace+AnimIVTC mode 3 for end credits would be the best way to go i would figure would i need to specify anything other than istart1 and iend1? as the credits is in a vob for itself.
i'm going to do the episodes with ordered chapters so i can save space so if i want to cut out the intro would that be done like this?
trim(0,2710).mpeg2source("blablabla.d2v")
trim(0,2710).tfm(d2v="blablabla.d2v")
or just add it underneath?
And thank you for the explanation :D
manono
7th January 2009, 18:48
would that be done like this?
No. Maybe:
mpeg2source("blablabla.d2v")
tfm(d2v="blablabla.d2v")
trim(2711,0)
Did you ever say what you're making here? Is this for a DVD? If not, what? Forgive me if I missed it. What the output format is helps determine how this thing is treated.
GrandDK
7th January 2009, 18:55
No. Maybe:
mpeg2source("blablabla.d2v")
tfm(d2v="blablabla.d2v")
trim(2711,0)
Did you ever say what you're making here? Is this for a DVD? If not, what? Forgive me if I missed it. What the output format is helps determine how this thing is treated.
I did it's from the NTSC DVD collection :)
what's the reason for putting the last frame first and the first frame last with the trim command?
manono
7th January 2009, 19:35
Trim doesn't define what's being cut out, but what's being kept.
I did it's from the NTSC DVD collection
I know that. I asked what you're making with the DVD - another DVD, an AVI, what? The reason it matters is if making a DVD, you can make the episodes 23.976fps (if that's what they're supposed to be) and encode the end credits separately as interlaced 29.97fps. Then rejoin them at the authoring stage using Muxman. I do that all the time. If you're making an XviD AVI you wouldn't do it that way.
GrandDK
7th January 2009, 19:46
Trim doesn't define what's being cut out, but what's being kept.
I know that. I asked what you're making with the DVD - another DVD, an AVI, what? The reason it matters is if making a DVD, you can make the episodes 23.976fps (if that's what they're supposed to be) and encode the end credits separately as interlaced 29.97fps. Then rejoin them at the authoring stage using Muxman. I do that all the time. If you're making an XviD AVI you wouldn't do it that way.
ohh sorry i misunderstood.
I'm making x264 encodes to mkv with ordered chapters. so that mean i shouldn't touch the credits then or just deinterlace?
manono
7th January 2009, 21:20
Oh, an MKV. I don't know anything about that. Someone else can confirm if it can be VFR so you can just deinterlace the end credits to 29.97fps while the rest is 23.976, or if it all has to be the same framerate.
Nightshiver
7th January 2009, 21:48
Did you try the animeivtc line thetoof gave you?
GrandDK
7th January 2009, 22:15
Did you try the animeivtc line thetoof gave you?
Not yet still at work will do a test when i come home and post the results.
thetoof
7th January 2009, 23:33
Yes, mkv can be vfr and you can deinterlace the credits @ 29.97 and have the episode @ 23.976 (which is exactly what is done by the code line I gave)
If you want to be sure that you don't decimate 30p sections (and therefore introduce jerks if there are some), you can treat your clip as hybrid (mode=6).
GrandDK
8th January 2009, 00:06
Yes, mkv can be vfr and you can deinterlace the credits @ 29.97 and have the episode @ 23.976 (which is exactly what is done by the code line I gave)
If you want to be sure that you don't decimate 30p sections (and therefore introduce jerks if there are some), you can treat your clip as hybrid (mode=6).
i thought i would make it easier for myself by encoding the intro by itself. with TFM
Then the episode with TDecimate.
and as the end credits is in a file for it self i can just deinterlace it. just have to learn how to make the ordered chapter file now hehe will do some test encodes now and post my results for future refference :D
thetoof
8th January 2009, 00:10
Sure, you can do that! You could even bob the credits to retain the full 60fps motion and link the files using the wonderful chapter capabilities of mkv.
Make sure to run tfm+tdecimate on the op and tdecimate (maybe in hybrid mode just to be sure) on the episode to ivtc properly.
kemuri-_9
8th January 2009, 00:19
Sure, you can do that! You could even bob the credits to retain the full 60fps motion and link the files using the wonderful chapter capabilities of mkv.
not all players support linking to segmented files.
afaik cross platform players do not, as it's a huge security issue which no one on linux wants...
no one on windows cares though since windows itself is a security issue, which is why haali's mkv splitter can handle linking to different files within segments.
thetoof
8th January 2009, 01:17
Hmm, though I don't know a lot about linux, you do have a point.
GrandDK
8th January 2009, 15:46
I have succesfully encoded the intro by it's own with TFM and TDecimate. Looks good with no judder.
the episode is encoded with TDecimate and is also jud free. :)
i was wrong about end credits being in a file by it's own as the file also includes the last 2-3 min of the episode :( so extra work with audio cutting damn.
was also messing around with ordered chapters or at least tried to the only guide i could find was in my opinion extremely confusing well more reading ahead of me just wanted to give an update :)
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.