digitalFAQ.com Forums [Archives]

digitalFAQ.com Forums [Archives] (http://www.digitalfaq.com/archives/)
-   Avisynth Scripting (http://www.digitalfaq.com/archives/avisynth/)
-   -   Avisynth: Cartoons, shorten the GOP to 12 frames (PAL) or 15 (NTSC) ? (http://www.digitalfaq.com/archives/avisynth/3362-avisynth-cartoons-shorten.html)

Icarus3000 04-24-2003 11:39 AM

Avisynth: Cartoons, shorten the GOP to 12 frames (PAL) or 15 (NTSC) ?
 
I know this was brought up in antoher thread, but I am still confused by:



Quote:

For Anime/Cartoon material:
Same as DVD clean material, but shorten the GOP to 12 frames (PAL) or 15 (NTSC)
Can I still encode at 29.97 fps (NTSC), or should I change that to 15 fps?

A few other somewhat related questions:

I know the templates are set for 24 fps, but I always encode at 29.97 fps (mostly because phrases like "inverse telecine" and "3:2 pulldown" confuse the heck out of me!)

If I'm encoding at 30 fps should I also set my "sampler" length to 30 or can I leave it at 24?

Am I missing out on something by encoding at 30 fps rather than 24?

Thanks,
Icarus

digitalize 04-25-2003 08:34 AM

When you run dvd2avi, if it shows FILM 95% or more, encode the video at 23.97 by setting dvd2avi to do FORCE FILM. This will help you save space since there is less information per second being encoded. If it is below 95%, and you use force film(encode at 23.97), you may run into audio sync issues.

Icarus3000 04-25-2003 10:16 AM

I don't usually use DVD2AVI as most of the encoding I do is from VHS captures, or Satellite TV captures.

What frame rate should I use for animation/cartoons:

15 fps
24 fps
30 fps

??

Thanks,
Icarus

TooTall 04-25-2003 09:58 PM

The KVCD/KDVD templates are perfect for movie but for cartoons/anime you only need to do the following, use Inverse Telecide built into TMPEG; and set it so that the GOP reads from top to bottom 1-12-2-1-18. That is the setting I use.

TKS 04-28-2003 09:41 PM

odd little thing!!
 
I had some animation material that gave me the runaround the other day.. I used dvd2avi on it and tested it and it said that it was FILM. I let it play for a bit to make sure most of this anime was FILM and to my surprise it jumped between FILM and NTSC sometimes. It gave TMGENC a hard time becuase after doing some test samples.. I found that i had to throw some deinterlacing into the mix, but dvd2avi didnt tell me that it was interlaced, but their was clearly elements of combing goin on.
Anyways.. to stop boring ya'll :) I had no audio/video sync probs.. But TMPGENC couldnt finish encoding this anime because i kept getting Illegal floating point errors all the time.. Would the FILM/NTSC jumping around cause these errors?

tks

Icarus3000 04-29-2003 08:22 AM

Too Tall:

I "partially" followed your advice, which may be why my results weren't perfect.

Since it is NTSC, I set the GOP to:

1-5283-2-1-15

(as per the "optimal scripts" thread)

But I didn't do "inverse telecide", and encoded at 29.97 fps.

The results were OK, but there were quite a few "ghost" images on rapid movement (it's just a children's cartoon for my daughter, but I'd still like to get it right!).

Questions:

If I check "inverse telecide" in TMPGenc, should I encode at:

23.97 fps
24 fps
29.97 fps?

I captured the cartoon in DV AVI by passing a satelite signal through my SONY mini-DV camera, so the .avi is 720x480 @ 29.97 fps.

This has worked out great for other TV and VHS captures, but this cartoon is giving me a hard time!

Many thanks,
Icarus

kwag 04-29-2003 11:20 AM

HI Icarus3000,

Add the following lines to your script after your source line to perform inverse telecine:

Code:

Telecide()
Decimate()

Encode at 23.976fps.
Make sure you load the "decomb.dll" in your script.

-kwag

Icarus3000 04-29-2003 11:30 AM

Thanks Kwag! I will try that when I get home tonight.

One more question:

If I add telecide/decimate to my avisynth script, do I ALSO need to select "Inverse Telecine" in TMPGenc, or is including it in the scrpt sufficient?

Thanks,
Icarus

TooTall 04-29-2003 06:46 PM

You want to encode at 23.976 fps (29.97 internal) with 3:2 pulldown if you use Telecide and Decimate.

Decimate changes it from 29.97 to 23.976
Telecide attempts to remove the lines from an interlaced file.

Hope this helps.


by the way...
kwag you rock man!!!

kwag 04-29-2003 09:07 PM

Quote:

Originally Posted by TooTall

by the way...
kwag you rock man!!!

Thanks TT :)

Icarus3000 04-29-2003 09:25 PM

Excuse my ignorance, but I think I almost have it!

In TMPGenc, I need to select:

"3:2 Pulldown"

and encode at 23.97;

and include

telecide()
decimate()

in my Avisynth script?

What if I do all that WITHOUT selecting "3:2 Pulldown"?

Thanks,
Icarus

EDIT - Now I am more confused than ever! I don't see a "23.976 (29.976 internal)" option in TMPGenc! Please help!

TooTall 04-30-2003 05:41 AM

The XX fps (XX fps internal) are listed above the XX fps.

You can also load the default KDVD template and just make changes to the GOP.

Icarus3000 04-30-2003 07:24 AM

Too Tall:

I see many XX fps (XX Internal) options (the closest I see is 14.985 fps (29.97 internal)), but no specific 23.97 (29.97) option. What version of TMPGenc are you using? I'm using 5.1049.157.

Thanks,
Icarus

TooTall 05-02-2003 09:15 PM

I'm using 2.54.36.134

TooTall 05-02-2003 09:31 PM

I hope this helps you. This is probably the best setting to use for anime

First the unofficial KDVD (NTSC) anime template.
Quote:

object TMPEGConfigFile
MPEG.Text = ''
MPEG.WizardCategoryName = ''
MPEG.WizardSubFormatName = ''
MPEG.WizardCaption = ''
MPEG.WizardDescription = ''
MPEG.OutputStreamType = MPEG_OutputStreamType_VideoOnly
MPEG.OutputStreamType_ReadOnly = False
MPEG.Video.StreamType = MPEGVideoEncoder_StreamType_MPEG2
MPEG.Video.StreamType_ReadOnly = False
MPEG.Video.Width = 720
MPEG.Video.Width_ReadOnly = False
MPEG.Video.Height = 480
MPEG.Video.Height_ReadOnly = False
MPEG.Video.YUVFormat = 1
MPEG.Video.YUVFormat_ReadOnly = False
MPEG.Video.DC_prec = 2
MPEG.Video.DC_prec_ReadOnly = False
MPEG.Video.VideoEncodeMode = MPEGVideoEncoder_VideoEncodeMode_Auto_Inv32Pulldow n
MPEG.Video.VideoEncodeMode_ReadOnly = False
MPEG.Video.FrameRate = 4
MPEG.Video.FrameRate_ReadOnly = False
MPEG.Video.AspectRatio = 2
MPEG.Video.AspectRatio_ReadOnly = False
MPEG.Video.RateControlMode = MPEGVideoEncoder_RateControlMode_CQ
MPEG.Video.RateControlMode_ReadOnly = False
MPEG.Video.MaxBitRate = 0
MPEG.Video.MaxBitRate_ReadOnly = False
MPEG.Video.MinBitRate = 0
MPEG.Video.MinBitRate_ReadOnly = False
MPEG.Video.CBR_BitRate = 7000000
MPEG.Video.VBR_MultipassVBRAlgorithm = MPEGVideoEncoder_MultipassVBRAlgorithm_2PASS
MPEG.Video.VBR_AvgBitRate = 7000000
MPEG.Video.VBR_MaxBitRate = 8000000
MPEG.Video.VBR_MinBitRate = 2000000
MPEG.Video.VBR_MaxPassCount = 0
MPEG.Video.VBR_Quality_P = 0
MPEG.Video.VBR_Quality_B = 20
MPEG.Video.VBR_EnablePadding = False
MPEG.Video.MVBR_MaxBitRate = 8000000
MPEG.Video.MVBR_MinBitRate = 2000000
MPEG.Video.MVBR_Quality_P = 0
MPEG.Video.MVBR_Quality_B = 20
MPEG.Video.MVBR_EnablePadding = False
MPEG.Video.AVBR_Quality = 50
MPEG.Video.AVBR_MaxBitRate = 8000000
MPEG.Video.AVBR_MinBitRate = 2000000
MPEG.Video.AVBR_EnablePadding = False
MPEG.Video.CQ_Quality = 70
MPEG.Video.CQ_Quality_P = 0
MPEG.Video.CQ_Quality_B = 0
MPEG.Video.CQ_MaxBitRate = 5000000
MPEG.Video.CQ_MinBitRate = 300000
MPEG.Video.CQ_EnablePadding = True
MPEG.Video.VBVBufferSize = 229376
MPEG.Video.VBVBufferSize_ReadOnly = False
MPEG.Video.GOP_SeqHeaderInterval = 1
MPEG.Video.GOP_SeqHeaderInterval_ReadOnly = True
MPEG.Video.GOP_I_FrameCount = 1
MPEG.Video.GOP_I_FrameCount_ReadOnly = True
MPEG.Video.GOP_P_FrameCount = 5
MPEG.Video.GOP_P_FrameCount_ReadOnly = True
MPEG.Video.GOP_B_FrameCount = 2
MPEG.Video.GOP_B_FrameCount_ReadOnly = True
MPEG.Video.GOP_BitStreamForEdit = False
MPEG.Video.GOP_BitStreamForEdit_ReadOnly = False
MPEG.Video.GOP_MaxFrameCount = 18
MPEG.Video.GOP_MaxFrameCount_ReadOnly = True
MPEG.Video.QuantizeMatrix_Intra_ReadOnly = False
MPEG.Video.QuantizeMatrix_NonIntra_ReadOnly = False
MPEG.Video.Profile = 4
MPEG.Video.Profile_ReadOnly = False
MPEG.Video.Level = 8
MPEG.Video.Level_ReadOnly = False
MPEG.Video.VideoFormat = 2
MPEG.Video.VideoFormat_ReadOnly = False
MPEG.Video.DisplayWidth = 0
MPEG.Video.DisplayWidth_ReadOnly = False
MPEG.Video.DisplayHeight = 0
MPEG.Video.DisplayHeight_ReadOnly = False
MPEG.Video.MotionSearchSpeed = MPEGVideoEncoder_MotionSearchSpeed_HighCQ
MPEG.Video.MotionSearch_AlwaysHalfPel = True
MPEG.Video.UseFloatDCT = True
MPEG.Video.QuantizeMode = False
MPEG.Video.QuantizeModeVal_Intra = 0
MPEG.Video.QuantizeModeVal_NonIntra = 0
MPEG.Video.YUVBasicYCbCr = False
MPEG.Video.QuantizeMatrix_Intra = {
08090C161A1B1D22090A0E1A1B1D22250C0E121B1D22252616 1A1B1F24252628
1A1B1D24272628301B1D22252628303A1D22252628303A4522 252628303A454F}
MPEG.Video.QuantizeMatrix_NonIntra = {
10121416181A1C1E121416181A1C1E201416181A1C1E202216 181A1E20202224
181A1C20222224261A1C1E20222426281C1E202224262A2A1E 20222426282A2C}
MPEG.Audio.StreamType = MPEGAudioEncoder_StreamType_MPEG1_Layer2
MPEG.Audio.StreamType_ReadOnly = False
MPEG.Audio.SamplingFrequency = 48000
MPEG.Audio.SamplingFrequency_ReadOnly = False
MPEG.Audio.ChannelMode = 0
MPEG.Audio.ChannelMode_ReadOnly = False
MPEG.Audio.CantUseMono = False
MPEG.Audio.BitRate = 192000
MPEG.Audio.BitRate_ReadOnly = False
MPEG.Audio.CalcCRC = False
MPEG.Audio.CalcCRC_ReadOnly = False
MPEG.Audio.OriginalFlag = False
MPEG.Audio.OriginalFlag_ReadOnly = False
MPEG.Audio.CopyrightFlag = False
MPEG.Audio.CopyrightFlag_ReadOnly = False
MPEG.Audio.PrivateFlag = False
MPEG.Audio.PrivateFlag_ReadOnly = False
MPEG.Audio.EmphasisType = 0
MPEG.Audio.EmphasisType_ReadOnly = False
MPEG.System.StreamType = MPEGSystemEncoder_StreamType_MPEG2_Program
MPEG.System.StreamType_ReadOnly = False
MPEG.System.CommentText = ''
MPEG.System.EnableCommentText = False
end
And second the unofficial filter selection (or what I use anyway)
Quote:

LoadPlugin("C:\filters\MPEG2Dec.dll")
#LoadPlugin("C:\filters\Convolution3D.dll")
LoadPlugin("C:\filters\STMedianFilter.dll")
#LoadPlugin("C:\filters\GripFit_preview.dll")
LoadPlugin("C:\filters\DustV5.dll")
LoadPlugin("C:\filters\UnFilter.dll")
LoadPlugin("C:\filters\LegalClip.dll")

Mpeg2Source("C:\Temp\video.d2v")
LegalClip()
#GripCrop(704, 480, overscan=2, source_anamorphic=false)
#GripSize(resizer="LanczosResize")
STMedianFilter(10, 50, 0, 0, 10, 50)
#SpaceDust() #for some animes only
UnFilter(50, 50)
TemporalSmoother(1, 2)
MergeChroma(blur(1.58))
MergeLuma(blur(0.2))
#Convolution3D(preset="animeHQ") #for some animes only
#GripBorders()
LegalClip()
Make a copy of any template then and name it what ever you want. Then open it in notepad and copy the template in the first box above and then just save it.

Icarus3000 05-04-2003 03:07 PM

Thanks for your help.

I think some of the confusion comes from the fact that I am trying to make an MPEG-1 KVCD, not a KDVD.

In any case, after much trial and error, I decided to use:

telecide()
decimate()

Encode at 23.97
WITHOUT 3:2 Pulldown

Results came out great!

Will try to work on modifying the KDVD ANIME template for KVCD.

Thanks again,
Icarus

Rassilon 05-28-2003 02:43 AM

Cartoon How To?
 
A while back I captured a cartoon movie at 352x288 and then just burned the resulting MPEG onto a VCD using VCDEasy with reasonable results. The image is about as good as the VHS source that I got it off (A little blurry but no artifacting effects). Since then I have been scouring the forums here looking for anyone that has written a "how to capture and burn Cartoon PAL VCD's". Is there anyone out there that can steer me in the right direction please?

Also, what can I do with the above MPEG file that I have got to clean it up and reburn it to a VCD?

Thanks.

kwag 05-28-2003 02:51 AM

Hi Rassilon,

Just use the "current script" posted, and lower the GOP to 12 frames. That should give you excelent quality and good compression.

-kwag

Anerboda 05-28-2003 03:14 AM

Quote:

Originally Posted by kwag
Hi Rassilon,

Just use the "current script" posted, and lower the GOP to 12 frames. That should give you excelent quality and good compression.

-kwag

Why are we supposed to use a GOP of 12 frames for cartoons? What would happen if we just use the current optimal script with a GOP of 25(for PAL)?

Just trying to learn more :D I've allready learnt a lot by reading all the threads on this great site (maybe the best on the entire net regarding videoconversion) with all you great and friendly people :D

Anerboda

kwag 05-28-2003 09:24 AM

Quote:

Originally Posted by Anerboda

Why are we supposed to use a GOP of 12 frames for cartoons? What would happen if we just use the current optimal script with a GOP of 25(for PAL)?

Not for cartoons :!: The cartoons and anime have very sharp edges, and artifacts are more visible with longer GOPs. That's why they look better with shorter GOPs, at the expense of some compression loss.

-kwag


All times are GMT -5. The time now is 09:51 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.