digitalFAQ.com Forums [Archives]

digitalFAQ.com Forums [Archives] (http://www.digitalfaq.com/archives/)
-   Video Encoding and Conversion (http://www.digitalfaq.com/archives/encode/)
-   -   Combing effect converting DV video to DVD? (http://www.digitalfaq.com/archives/encode/9785-combing-effect-converting.html)

Bleeder 05-22-2004 02:45 AM

Combing effect converting DV video to DVD?
 
Hi,

I have a KDVD template with audio part and those without audio as well for TMPGenc but there's a problem every time I try to make a KDVD from my home videos. I use PAL standard since I am from Europe. I use Pinnacle studio 9 for making and cutting a movie and leaving it in original DV format(full size and uncompressed). Then I use TMPGenc to make a PAL KDVD but I always get the combed video. Like interlaced video problems or whatever it is. Whenever there is movement in the video, there is the "combing" effect. On the cut and finished DV file or on the very original DV, there is no such problem. So something happens during conversion to KDVD that makes the video interlaced or deinterlaced or whatever it is that makes it annoyingly combed.

Otherwise the quality, sound and size would be great but the darn combing is ruining my day.

No mater which of "interlace" or "non interlaced" in the TMPGenc I use.

Any clues as to how to make KDVD that will not have this problem?
Anyone successfuly turning DV from digital camcorder into KDVDs using TMPGenc?

I read some older posts but nothing that would realy answer my question as to how to do this in practise was found.

I would really appreciate some help.
Thanks!

Dialhot 05-22-2004 07:51 AM

Re: I have "combing" effect when turning DV video
 
[quote="Bleeder"
No mater which of "interlace" or "non interlaced" in the TMPGenc I use.[quote]
1/ never use internal deinterlacer of tmpgenc. If you need one, use an avisynth script

2/ did you try to encode in mpeg2 interlaced ?

Bleeder 05-22-2004 08:19 AM

Hi,

basically I have the uncompressed DV video(mainconcept 2.04 codec) with PCM sound and several KDVD templates I got from P2P programs and this site.

For instance I have a template called KDVD Full D1 PAL that it says creates a MPEG2file and this template also has sound included. Video bitrate is set at 5000max, at 25fps, (720*576), 37.8 Mb MAX/min and sound at 48.000hz ,192 kbps, 2ch. I like the fact that this template has sound taken care. Otherwise the same problem happens with a template without sound-the usual full D1 KDVD template so it is not this template that's causing the problem.

When I import the DV (Mainconcept 2.04 codec) video after selecting this template, I have in the TMPGenc the following options as default:

-interlaced
-bottom field first(field B)
-4:3 625 PAL (704*576)

If I use this I get the combed video. If I put it on TV via TV out it's not completely horrible but visible in fast movements and annoying.

I also tried changing the
-interlaced
to
-non interlace

but I get the same result :?

I have MPEGenc version 2.58.44.152

Is there a simple way within the TMPGenc settings to take care of this? Or a special template?

Avisynth? I don't know how to use this yet since I just download the templates from the net and I'm a noob. Is it likely that I could fix this using Avisynth?

Otherwise I also get the same problems making SKVCD-obviously MPEG2 is problematic for me.

If I create MPEG1 there's no problem with combing but I guess combing is not a problem with MPEG1 anyway?

So in short. How can I-a noob with these things make MPEG2 that will not have this problem? I'm sure there are plenty guys out there trying to put their home DVs into KDVD and it would really be helpful if this issue was solved or a template made for it...

I appreciate the time you're taking to help everyone and me.

Dialhot 05-22-2004 09:38 AM

Quote:

Originally Posted by Bleeder
For instance I have a template called KDVD Full D1 PAL that it says creates a MPEG2file and this template also has sound included.

I don't now where you found it but there is NO official tempalte that include it. So this is a modifed one and no one can tell what else was modified :!:

Quote:

Otherwise the same problem happens with a template without sound-the usual full D1 KDVD template so it is not this template that's causing the problem.
None of the template encode in interlaced. FYI.

Quote:

I also tried changing the
-interlaced
to
-non interlace
Where ? In the source or the destination ???

Quote:

but I get the same result :?
Do you resieze your video whle encodign or does the source the same res than the destination ?

Quote:

Is there a simple way within the TMPGenc settings to take care of this?
NO ! You will need a script !

Quote:

Is it likely that I could fix this using Avisynth?
It will be far easier / better / convenient.

Quote:

If I create MPEG1 there's no problem with combing but I guess combing is not a problem with MPEG1 anyway?
That is strange because because mpeg1 is progressive only.

Quote:

So in short. How can I-a noob with these things make MPEG2 that will not have this problem? I'm sure there are plenty guys out there trying to put their home DVs into KDVD and it would really be helpful if this issue was solved or a template made for it...
They use scripts...

Bleeder 05-22-2004 09:58 AM

-I found it on DC++

-I use te template downloaded from this site and it's the same.
I set the interlace or non interlace in the source.

Can it be set in the destination? This would probably fix it if it was possible to set for the destination.

-resolution stays the same. It says at the source 704*576

I will also take a look at how avisynth works. Is there a speciddic thing you know of in sdvance I should do with avisynth specifficaly for this problem?

I now remembered that I also set once to non interlace in the expert settings-for MPEG which I assume is for destination?

I will also try that again.

Dialhot 05-22-2004 01:14 PM

Quote:

Originally Posted by Bleeder
-I found it on DC++

That is a p2p software and there is nothing good to take on such underground place. As you can see, even the sligtest KVCD template is (a little) crappy.

Quote:

-I use te template downloaded from this site and it's the same.
I set the interlace or non interlace in the source.
You have to put interlaced in BOTH source AND target.

Quote:

Can it be set in the destination? This would probably fix it if it was possible to set for the destination.
Yes it is, in the first tab of tmpeng settings, while you can change it for source in the second tab.

Quote:

-resolution stays the same. It says at the source 704*576
Okay. Because resizing in interlaced mode need special work that tmpgenc can't do by itlsef !

Quote:

I will also take a look at how avisynth works. Is there a speciddic thing you know of in sdvance I should do with avisynth specifficaly for this problem?
First learn how to use a script, then ask for help from Incredible :-)

Quote:

I now remembered that I also set once to non interlace in the expert settings-for MPEG which I assume is for destination?
I will also try that again.
If in the first tab, Yes it is.

Bleeder 05-23-2004 01:32 AM

FIXED!
 
:P

Hey. For some strange reason, the roblem stopped after a while and running some other apps like watching a divx movie,,,. and I also uograded to latest version of TMPGenc...

Anyway it just started working OK. And sometimes you just need to reboot the machine to get it to it's senses-yes even XPs,..

And now it works flawlessly! KDVDs, SKVCDs,.. with sound in one single move with that template. Sound is of good quality too. So it's realy a good template.

I can send them to you if you want to have a llook at them and maybe post them here as well. It's realy great for noobs like me and many people are just that. :D

The quality is great. About 40 minutes of highest quality video with sound took 1.3 Gigabytes. So basically it's about 2 hours of top quality with sound on one DVD. Even half D1 is still great.

Anyways, anyone interested in these templates can mail me at:

kmecka@primorska.com

Thanks again for all your tips and the time.

kwag 05-23-2004 01:37 AM

Re: FIXED!
 
Quote:

Originally Posted by Bleeder
So basically it's about 2 hours of top quality with sound on one DVD. Even half D1 is still great.

Sorry Bleeder, but that's WAY below our standards :D
We usually put ~10 hours on one DVD at half D-1, and about ~6+ hours at 704x480 on one DVD.
So 2 hours on one DVD is really very low, and that's NOT KDVD :!:

-kwag

Bleeder 05-23-2004 01:47 AM

Whoa! 8O Most guys I know are thrilled with prospects of 2 hours.

Where exactly can I download the appropriate template from this site?

I mean for noobs. Like the kind you just throw into TMPGenc? Or is such user friendlyness dispised ammong you pros? :)
Do you guys have those on this site? It would help "slow" folks like me a lot.


Which template would be best for DV? 6 hours of full D1 sounds very nice :twisted:

At the same time-to cut things short:
Obciously your templates would require separate sound editing.
I take the Wav out with Virtualdub and do what with it?
Which program and to which format do I put it in?

Do I attach it to video in TMPGenc during conversion to KDVD or afterwards in the end?

OK I tried again your templates on a 217 Mb uncompressed sample (1 munite approx). If I use your KDVD template it is 34.1 Mb large(I only had to shange settings in TMPG to 4:3 display because in default it was 16:9).

If I use the template with sound it makes 4:3 by default(and in general other video settings including bitrate are same as your template) and I get 36.9Mb but with sound.

Anyway:
this is the template

object TMPEGConfigFile
MPEG.Text = ''
MPEG.WizardCategoryName = ''
MPEG.WizardSubFormatName = ''
MPEG.WizardCaption = ''
MPEG.WizardDescription = ''
MPEG.WizardTargetMedia = MPEGConfig_TargetMediaType_Unknown
MPEG.WizardAutoCalcVideoBitRate = False
MPEG.WizardAutoChooseList.EnableVideoSize = False
MPEG.WizardAutoChooseList.VideoSize = <>
MPEG.WizardAutoChooseList.EnableVideoGOP = False
MPEG.WizardAutoChooseList.VideoGOP = <>
MPEG.OutputStreamType = MPEG_OutputStreamType_System_VideoAudio
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 = 576
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_Interlace
MPEG.Video.VideoEncodeMode_ReadOnly = False
MPEG.Video.FrameRate = 3
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.MinAvgBitRate = 0
MPEG.Video.MinAvgBitRate_ReadOnly = False
MPEG.Video.CBR_BitRate = 7000000
MPEG.Video.VBR_MultipassVBRAlgorithm = MPEGVideoEncoder_MultipassVBRAlgorithm_MultipassCQ
MPEG.Video.VBR_AvgBitRate = 7000000
MPEG.Video.VBR_MaxBitRate = 8000000
MPEG.Video.VBR_MinBitRate = 2000000
MPEG.Video.VBR_MaxPassCount = 2
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 = 20
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 = False
MPEG.Video.GOP_I_FrameCount = 1
MPEG.Video.GOP_I_FrameCount_ReadOnly = False
MPEG.Video.GOP_P_FrameCount = 5823
MPEG.Video.GOP_P_FrameCount_ReadOnly = False
MPEG.Video.GOP_B_FrameCount = 3
MPEG.Video.GOP_B_FrameCount_ReadOnly = False
MPEG.Video.GOP_BitStreamForEdit = True
MPEG.Video.GOP_BitStreamForEdit_ReadOnly = False
MPEG.Video.GOP_MaxFrameCount = 15
MPEG.Video.GOP_MaxFrameCount_ReadOnly = False
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 = 1
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_Normal
MPEG.Video.MotionSearch_AlwaysHalfPel = True
MPEG.Video.UseFloatDCT = True
MPEG.Video.QuantizeMode = True
MPEG.Video.QuantizeModeVal_Intra = 0
MPEG.Video.QuantizeModeVal_NonIntra = 0
MPEG.Video.YUVBasicYCbCr = True
MPEG.Video.QuantizeMatrix_Intra = {
081013161A1B1D221013161A1B1D222513161A1B1D22252616 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.EnableCommentText = False
MPEG.System.CommentText = ''
end

Bleeder 05-23-2004 02:40 AM

By the way, I can also paste the NTSC templates with sound and also for KVCD and SKVCD if you like.

Pleaso comment this template and if this one can be improved to get more video on.

Anyway, what's the best thing to do :?:

Dialhot 05-23-2004 08:47 AM

Re: FIXED!
 
Quote:

Originally Posted by kwag
So 2 hours on one DVD is really very low, and that's NOT

In fact, that is nothing more than standard DVD.
Read on your DVD-R box : 4.7GB or 120 min.

incredible 05-23-2004 09:00 AM

I only "overflew" this Thread and a suggestion is:

DV Home Videos are always "Bottom Filed first" and interlaced.
So in TmpgEnc you have to choose "interlaced" and bottom filed first" and encoding at mpeg2 as its the only one which supports interlaced encoding.

And ... You wont get good results if encoding interlaced sources in an interlaced mode when using very low avg bitartes are used, even in case of kDVD Templates. As interlaced encodings generally need MUCH MORE Bitrate.. cause of fieldbased encoding. If you dont respect that ... fast moving parts/Scenes will end up block very fast! ;-)

My recommandeation: Use avisynth on your source and choose a good deinterlacer like DgBob() etc. and set it to fieldorder Bottomfield first when it performs the deinterlacing job!
Then you can encode at lower bitrates and gain from kVCD templates.

Dialhot 05-23-2004 09:15 AM

Quote:

Originally Posted by Bleeder
Where exactly can I download the appropriate template from this site?

http://www.kvcd.net/dvd-models.html

Note : to reach our limits you will need to use a script. Without that the limit is more 6 hours in 1/2 DVD and 4 hours in full-frame.

Quote:

Obciously your templates would require separate sound editing.
That's not the templates, and that's not a requirement. That is OUR choice to claim for a separate audio process in order to obtain the best quality.
Audio processing is possible with tmpgenc but the quality is way below. But if you want to activate it, you can load the template and simply chose "ES(audio+video)" insteed of "ES(video)" in the main window of tmpgenc. And of course you have to provide an audio source.

Quote:

I take the Wav out with Virtualdub and do what with it?
Which program and to which format do I put it in?
besweet or headac3che.
Go there : http://www.kvcd.net/forum/viewtopic.php?t=2553

Quote:

Do I attach it to video in TMPGenc during conversion to KDVD or afterwards in the end?
DVD need to be authored. Authoring tools handle better the audio and the video appart. So you don't have to mux them. Just keep your video file (m2v) and audio file (mp2 or ac3) and feed the authoring program with that.

Wich tool do you use to author your DVD ?

Quote:

If I use the template with sound it makes 4:3 by default(and in general other video settings including bitrate are same as your template) and I get 36.9Mb but with sound.
Size is irrelevant. Compare QUALITY.

Quote:

MPEG.Video.CQ_Quality = 70
MPEG.Video.CQ_Quality_P = 0
MPEG.Video.CQ_Quality_B = 20
This template use a B-spoilage of 20. I used to do that a long time ago because it seems to give smaller files. But in fact the quality in the movement suffer a lot from that and I didn't see this in the first place.

Quote:

MPEG.Video.GOP_B_FrameCount = 3
THREE B-frame ? Plus a B-spoilage.... Whaow... I have to see that once in my life.

Quote:

MPEG.Video.MotionSearchSpeed = MPEGVideoEncoder_MotionSearchSpeed_Normal
MPEGVideoEncoder_MotionSearchSpeed_Slow is a lot better in quality, and MPEGVideoEncoder_MotionSearchSpeed_Motion_Estimate is a lot faster for the same quality than "normal".

Quote:

MPEG.Video.QuantizeMode = True
MPEG.Video.QuantizeModeVal_Intra = 0
MPEG.Video.QuantizeModeVal_NonIntra = 0
The guy that modifies this template really knew NOTHING to what he was doing. He activates the "soften block noise feature" (that is REALLY bad) but... let the parameters to 0 ! That means that you are losing time doing something that do... nothing.

Quote:

MPEG.Video.YUVBasicYCbCr = True
Here again, that is a complete NONSENSE :-(
Outputting in real YCbCr leads to nothing but a bigger file with no gain at all.

Quote:

MPEG.Video.QuantizeMatrix_Intra = {
081013161A1B1D221013161A1B1D222513161A1B1D22252616 1A1B1F24252628
1A1B1D24272628301B1D22252628303A1D22252628303A4522 252628303A454F}
This is perhaps the old KVCD matrix but not the last KVCD-Notch.

:arrow: are you sure this is not a MVCD template ?

Quote:

MPEG.Audio.BitRate = 192000
Audio is done at 192 where external tool will give you excellent quality with 128. You are loosing space.

Do you know the name of the guy that pretend that THIS is KDVD template ?

incredible 05-23-2004 09:28 AM

Quote:

Originally Posted by Dialhot
:arrow: are you sure this is not a MVCD template ?

To be answered by a person who knows that: NO :!:
:lol:

Well in the state MVCD Templates are now! : ... slow at M.estim. is choosen and NO soften Blocknoise!
Related to the used Matrix above ... I cant give a statement as it is shown as HEX Values.

So that one above "could" be the first MVCD Template (which I dont know), but I shurely assume that this is a "selfmade" stunt Template from someone else.

A gain from Rocs and my templates is for example that they only need standard Gops to archive same good quality (1-4-2 PAL , 1-5-2 NTSC), that was one purpose for archiving max. compatibility with sensible "totally in love with standard" Standalone Players.

Bleeder 05-23-2004 09:33 AM

Thanks for your detailed answer.

I don't have a clue about who the author is nor how old it is. And since I'm a noob I didn't have a clue about this being a usual DVD.. :x

It's a good thing that I asked you guys to help. Maybe this even is a MVCD since the Rar file I downloaded also had some MVCD stuff in it,..

Do you think you could edit a template on your site also for DVs? Or recommend to me what to do?

Also for Avisynth. What would be the recommendations for home DV?
For the best quality/size ratio? Or has someone already made a good script for this?

About authoring. What's the best program for this?
I will compress video and sound separately and feed ithe authoring video and sound separately.

Boulder 05-23-2004 09:40 AM

You may want to check out the optimal script for DVD sources in the 'Optimal scripts' forum. Also see SansGrip's Avisynth basics guide.

For deinterlacing, I suggest KernelDeint(order=0,threshold=5,sharp=true) as the source is probably pure interlaced video. Place this line right after the line which loads your source.

You'll find all the plugins you need at http://www.avisynth.org/warpenterprises . You'll also need Avisynth 2.5x, which can be found at http://www.avisynth.org .

Bleeder 05-23-2004 10:36 AM

How is this script ? http://www.kvcd.net/forum/viewtopic....4081d4ed1bb00b


And what exactly do I need to do?
Di I put that entire text into a text file and rename it's ending to avs?
Fo I open it with TMPGenc?

I', kinda confused but I think I will understand this soon.
I downloaded all the filters and extracted them to plugin folder of avisynth 2.08.

I'm kinda stuck now not knowihng how to realy proceed.
Can someone tell me what exactly to paste (for instance from the script in the link above) into a text file?

Also is that even for PAL? If not, what needs to be changed and where.. :?:

Boulder 05-23-2004 10:52 AM

I suggest you check some of the guides on the forum. They'll walk you through the process and you'll probably learn a lot better that way.

The most important thing is to ditch AVS2.08 and download 2.5x (2.54 is the latest official version). Remove all the 2.0x plugins from your plugins folder and download the 2.5-compatible ones.

Bleeder 05-23-2004 12:07 PM

OK thanks.


By the way, in the meantime I am trying KWAGs template for KDVDs from this site and I added the audio part from the template I had but changed the bitrate to 128from 192 to see what happens and will compare then.


I have now created the following script -

# Gener
Sourcefile="D:\New Folder\Untitled.avi"

avisource(Sourcefile)

SmoothDeinterlace(tff=false, doublerate=true, blend=false)

converttoyv12()

Blockbuster(method="noise",detail_min=1,detail_max =3,variance=0.1,seed=1)
Convolution3D(1, 6, 12, 6, 8, 2.8, 0)

GripCrop(544, 480, overscan=2, source_anamorphic=false)
GripSize(resizer="LanczosResize")
Undot()
TemporalSoften(2,7,7,3,2)
DCTFilter(1,1,1,1,1,1,0.5,0)

What do I do in Virtualdub with this script? Or anywhere for that matter?

Boulder 05-23-2004 12:38 PM

That's Dialhot's optimal AVI script v4, or at least a part of it.

Search this board for the download link for GripFit (includes GripCrop,GripSize and GripBorders) ..sorry, can't be more specific as I don't remember where it is. I suppose incredible's got it on his webspace.

BlindPP is included in MPEG2DEC3.dll.

I suggest you replace the SmoothDeinterlacer line with the KernelDeint line I gave earlier. It's faster and should give a sharper picture as well, it's also recommended as the best one of pure interlaced video content.

Dialhot 05-23-2004 12:42 PM

Gripcrop is for resizing and you don't need it there. But FYI it is included ina filter called "gripfit". Do a research on the forum with "gripfit AND rar".

The same you don't need blindpp as it is for deblocking MPEG4 comrpessed source, that you don't have here. It is included in mpeg2de3.dll.

In fact you used my script for Divx but your source is far better than this and you should use the script optimal for DVD sources (see optimal script section of the forum.

Bleeder 05-23-2004 12:57 PM

Ok, do you think you could just post the script I should use here?
I saw the one that is optimal for clean DV video but just to be sure-could you paste the contents of the script I should use just so I don't screw everything up and lose anoter few hours and even more of your time with noob like problems? :oops:

Also, I read the guide and If I understand correctly:

1.I use TMPGenc and the template to get the KDVD video.
2.I use Virtualdub and the script (pointing to this KDVD video)?
3.Should I put audio into MP2 or AC3?

4.I will use DVDlab to author in the end.

The first three I stil don't quite get. :evil:

incredible 05-23-2004 01:03 PM

Quote:

SmoothDeinterlace(tff=false, doublerate=true, blend=false)
With only this you end up in a full fieldrate stream! Means FPS*2 ! 8O

Do apply behind that a "selectodd()" or a "selecteven()" depending on which results better.

BTW: DgBob() is faster and better, do take the needed values from its readme file which comes with the filter!

Bleeder 05-23-2004 01:19 PM

Well, since the script above is not the best one, can someone please please paste an appropriate script here. It does not need to include deinterlacing since combing was a strange error that disapeared now.

So basically I would need a good answer to my previous post. :)

Dialhot 05-23-2004 02:08 PM

Quote:

Originally Posted by Bleeder
So basically I would need a good answer to my previous post. :)

As you don't need any deinterlacing, use the optimal script for DVD source called "MA script" that you can find there :

http://www.kvcd.net/forum/viewtopic.php?t=3483

Bleeder 05-23-2004 05:30 PM

Is the following script OK?

Quote:

LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\MPEG2Dec3.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\GripFit_YV12.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\STMedianFilter.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\asharp.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\unfilter.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\undot.dll")

Mpeg2Source("D:\New Folder\Untitled 44")

undot()
asharp(1, 4)
GripCrop(720, 576)
GripSize(resizer="BicubicResize")
STMedianFilter(3, 3, 1, 1 )
MergeChroma(blur(1.5))
MergeLuma(blur(0.1))


ScriptClip(" nf = YDifferenceToNext()" +chr(13)+ "unfilter( -(fmin(round(nf)*2, 100)), -(fmin(round(nf)*2, 100)) ).TemporalSoften( fmin( round(2/nf), 6), round(1/nf) , round(3/nf) , 1, 1) ")



function fmin( int f1, int f2) {
return ( f1<f2 ) ? f1 : f2
}


But now Virtualdub says it can't open MPEG2 source.
Even if I set another KDVD video or even AVI?
What do I need to do now?

What am I missing.
Also if I was to set that it is to crop to let's say 544*480 what would that mean quality wise, size wise,..?

Also would it be better to use LanczosResize instead of bicubic?

Also I still don't know whether to turn ausio to MP2 or AC3. Which is better bang for the buck-size?

Dialhot 05-23-2004 05:45 PM

Quote:

Originally Posted by Bleeder
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\MPEG2Dec3.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\GripFit_YV12.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\STMedianFilter.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\asharp.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\unfilter.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\undot.dll")

Note : with avs2.5 you can remove all these lines. As soon as the dll is in the "plugins" directory, it will be automatically loaded.

Quote:

GripCrop(720, 576)
GripSize(resizer="BicubicResize")
YOu don't need these 2 lines as you don't have to resize the source.
BTW you missed the third line taht can be removed appart form these two ones : Gripborders !

Else, your script is okay according to me.

Quote:

But now Virtualdub says it can't open MPEG2 source.
Even if I set another KDVD video or even AVI?
What do I need to do now?
Your srouce is not a mpeg2 source but a DV file !
You must use "Directshowsource("nameofthefile.avi").killaudio() " insteed of mpeg2source.

Quote:

Also if I was to set that it is to crop to let's say 544*480 what would that mean quality wise, size wise,..?
You will obtain something taht is not DVD compliant. Start to make compliants ones and then you will ask yourself about the opportunity to play with the standard.

Quote:

Also would it be better to use LanczosResize instead of bicubic?
Not in your case. Lanczos gives sharper picture but bigger file; In your script you already have "asharp" that deals with the sharpness. No need to do it twice.

Quote:

Also I still don't know whether to turn ausio to MP2 or AC3. Which is better bang for the buck-size?
All people aren't english natives so if you can use standard words to ask your question I'll probably be abble to understand it ;-)

Bleeder 05-24-2004 02:02 AM

OK

I ment which of the two (AC3 or MP2) is a better choice considering quality/size? And compatibility.

Another noob question. Do I use the script to open an AVI file or a m2v file previously created by TMPGenc with a template?

Do I open the script in Virtualdub or TMPGenc?
I am now running it in TMPGenc while using KWAGs KDVD template. Is that OK?

So in short:
What is the order of things

1
2
.
.
.




:?:

Dialhot 05-24-2004 04:06 AM

Quote:

Originally Posted by Bleeder
I ment which of the two (AC3 or MP2) is a better choice considering quality/size? And compatibility.

if you need to do 5.1, use ac3. Even if MP2 can be done in 5.1 this not recommanded for quality and compatibility.

For 2.0 the two are equivalent IMHO but there are few good ac3 encoder while software to produce great mp2 are free...

Quote:

Another noob question. Do I use the script to open an AVI file or a m2v file previously created by TMPGenc with a template?
It seem you missed something : the script is the source you will provide to tmpgenc. You use it to open the DV avi, do some filtering (like deinterlace) and resize if needed. Then tmpgenc takes the output of this script and encode it into mpeg.

Quote:

I am now running it in TMPGenc while using KWAGs KDVD template. Is that OK?
Yes it is.

Bleeder 05-24-2004 06:25 AM

OK, I ran the same DV video (about 42 minutes long and 8.3GB large and is a dark video of mainly internal footage with my DV camcorder) that in the beginning I ran with the first template (the one that's ot even supposed ti be a KDVD according to KWAG) also with KWAG's KDVD template (only changed 16:9 to 4:3 in TMPGenc).

With the first template (posted on page 1 of this thread) that also covered sound (192kbps) the file size was 976 Mbs.

Afterwards I changed video part in that first template with the data from KWAG's template and changed the audio part to 128 kbps from 192 kbps and size was down to 926 Mb. that seemed a bit strange to me since I expected a bigger difference. It's like only the audio made the difference.
And in both I used noise reduction option in TMPGenc.

Now I ran the following script with KWAGs original unchanged KDVD template (no sound but changed 16:9 to 4:3)

Quote:

Directshowsource("D:\New Folder\Video2").killaudio()

converttoyv12()

undot()
asharp(1, 4)

STMedianFilter(3, 3, 1, 1 )
MergeChroma(blur(1.5))
MergeLuma(blur(0.1))


ScriptClip(" nf = YDifferenceToNext()" +chr(13)+ "unfilter( -(fmin(round(nf)*2, 100)), -(fmin(round(nf)*2, 100)) ).TemporalSoften( fmin( round(2/nf), 6), round(1/nf) , round(3/nf) , 1, 1) ")



function fmin( int f1, int f2) {
return ( f1<f2 ) ? f1 : f2
}
I get a video with 812 Mb and I stripped the WMV from original and turned it to MP2 (128 kbps) with Headach3e and the size is 39 Mb

So combined it is 851Mb. How do I improve this further?

I have not combined video and audio yet. Is this something I do in DVDlab?

Also I wish the image would be a bit sharper. What do I change in the script?

Boulder 05-24-2004 06:46 AM

Do not do any filtering with TMPGEnc's internal filters!

You'll get a sharper image if you remove the MergeLuma line.

Isn't your source material interlaced? You're treating it as if it were progressive.

You'll have to use the file size prediction methods if you wish to obtain a certain file size. CQMatic is a good tool for that, see it's own forum for more details and guides.

Bleeder 05-24-2004 07:25 AM

OK, I will remove the Luna part.
My DV is interlaced but the KDVD does not have combing. TMPGenc treats or encodes it as interlaced doesn't it?

If I was to include a deinterlace part wouldn't that only reduce quality?

What do you recommend I do?
The source file is interlaced. it's a DV file in Mainconcept DV 2.04 codec.
When I play this file there is no combing.

And in the KDVD there is also no combing.

What to do?

Boulder 05-24-2004 07:46 AM

If you got the bitrate to spare, encode as interlaced.

However, if you use that script with interlaced sources, you're asking for trouble.

See this thread for using the MA script with interlaced material (and keeping it interlaced):

http://www.kvcd.net/forum/viewtopic....er=asc&start=0

Deinterlacing doesn't necessarily mean lower quality. Interlaced material is very bitrate-hungry and turns into a blocky monster if it's not fed with enough bits. Progressive material doesn't need that much bits but motion is not as smooth and shapness suffers a bit as well.

EDIT: I also recommend that you change the ScriptClip part to this:

Code:

ScriptClip(" nf = YDifferenceToNext()" +chr(13)+ "unfilter( -(fmin(round(nf)*2, 100)), -(fmin(round(nf)*2, 100)) ).TemporalSoften( fmin( round(2/nf), 6), round(1/nf) , round(3/nf) , 1, 2)  ")

Bleeder 05-24-2004 09:05 AM

OK,

do you think you could paste the entire script I should use?
Cause there are several variants there and I would like try the best one with deinterlacing but for DV and I don't know what if any of that resizing there applies to me,.. there is talk of VHS source quality there,.. so I'm not sure what to use.

Do you think I could get an entire appropriate script pasted here?

Boulder 05-24-2004 09:40 AM

This one keeps it interlaced so you should encode as interlaced, bottom field first:

Code:

AVISource("path\clip.avi") # or DirectShowSource, if AVISource doesn't work

GripCrop(Your_GripCrop_Parameters_Here)

UnFoldFieldsVertical(flip=true)

undot()
asharp(1, 4)
GripSize(resizer="BicubicResize")
STMedianFilter(3, 3, 1, 1 )
MergeChroma(blur(1.5))
MergeLuma(blur(0.1))

ScriptClip(" nf = YDifferenceToNext()" +chr(13)+ "unfilter( -(fmin(round(nf)*2, 100)), -(fmin(round(nf)*2, 100)) ).TemporalSoften( fmin( round(2/nf), 6), round(1/nf) , round(3/nf) , 1, 2)  ")

FoldFieldsVertical(flip=true)

GripBorders()

function fmin( int f1, int f2) {
  return ( f1<f2 ) ? f1 : f2
}
 
function SetParity(clip c, bool parity)
{
    return parity ? c.AssumeTFF() : c.AssumeBFF()
}

function UnfoldFieldsVertical(clip c, bool "flip")
{
    flip = default(flip, false)
    oldParity = c.GetParity()
    c = c.AssumeTFF().SeparateFields().AssumeFrameBased()
    top = c.SelectEven()
    bottom = c.SelectOdd()
    c = StackVertical(top, flip ? bottom.FlipVertical()
    \                          : bottom)
    return c.SetParity(oldParity)
}

function FoldFieldsVertical(clip c, bool "flip")
{
    assert(c.Height() % 2 == 0, "FoldFieldsVertical: unexpected frame height")
    flip = default(flip, false)
    oldParity = c.GetParity()
    originalHeight = c.Height() / 2
    evens = c.Crop(0, 0, c.Width(), originalHeight)
    odds = c.Crop(0, originalHeight, c.Width(), originalHeight)
    odds = flip ? odds.FlipVertical() : odds
    c = Interleave(evens, odds).AssumeFieldBased().AssumeTFF().Weave()
    return c.SetParity(oldParity)
}

This one returns a progressive clip, encode as progressive:

Code:

AVISource("path\clip.avi") # or DirectShowSource if AVISource doesn't work
KernelDeint(order=0,sharp=true,threshold=5)

GripCrop(Your_GripCrop_Parameters_Here)

undot()
asharp(1, 4)
GripSize(resizer="BicubicResize")
STMedianFilter(3, 3, 1, 1 )
MergeChroma(blur(1.5))
MergeLuma(blur(0.1))

ScriptClip(" nf = YDifferenceToNext()" +chr(13)+ "unfilter( -(fmin(round(nf)*2, 100)), -(fmin(round(nf)*2, 100)) ).TemporalSoften( fmin( round(2/nf), 6), round(1/nf) , round(3/nf) , 1, 2)  ")

GripBorders()

function fmin( int f1, int f2) {
  return ( f1<f2 ) ? f1 : f2
}

I assume here that your clip is bottom field first, hence the parameter order=0 in KernelDeint.

Remove the MergeLuma line for some more sharpness, you'll also get a slightly sharper video if you use LanczosResize as the GripSize resizer.

Bleeder 05-24-2004 10:05 AM

My video is bottom first.

But when I try to open either script of the two posted I get :
Undot supports only YUY2 color...

EDIT:

Is this OK?
Quote:

AVISource("D:\New Folder\Untitled.avi")
KernelDeint(order=0,sharp=true,threshold=5)

converttoyv12()


undot()
asharp(1, 4)

STMedianFilter(3, 3, 1, 1 )
MergeChroma(blur(1.5))


ScriptClip(" nf = YDifferenceToNext()" +chr(13)+ "unfilter( -(fmin(round(nf)*2, 100)), -(fmin(round(nf)*2, 100)) ).TemporalSoften( fmin( round(2/nf), 6), round(1/nf) , round(3/nf) , 1, 2) ")


function fmin( int f1, int f2) {
return ( f1<f2 ) ? f1 : f2
}
Also: When you say treat as progressive-what does that mean?
That I set TMPGenc as non-interlace in the TMPGencoder's menues?

Boulder 05-24-2004 10:23 AM

UnDot should support both YUY2 and YV12 material. You can check the colorspace with this script:

AVISource("path\clip.avi")
Info()

See what the preview window shows in VirtualDub.

Your script looks ok, you're not doing any resizing? You might want to use overscan blocks for better quality.

EDIT: Yes, basically progressive means non-interlaced.

Bleeder 05-24-2004 10:35 AM

The script I pasted works, it didn't work prior to adding "convert to YV12"

It works now and the file sizes of samples area already smaller than with previous scripts.

Quality seems not to have been harmed.

The weird part is that no matter if I treat it as progressive or not (even switching from non interlace as a source and interlaced as destination and vice versa,.. or both non interlaced or both interlaced) in TMPGenc, there's no visible difference between the videos
:wink:

Boulder 05-24-2004 10:38 AM

There's usually no visible difference even if you encode progressive material as interlaced, the file size may get bigger though.

Bleeder 05-24-2004 10:44 AM

Thanks for your realy extensive help with the scripts. This one seems very good both in terms of sicze and quality. It's also sharp enough.

I will use it as progressive. I also recommend it to others.

I have some questions about merging audio with video though.
With which program can I merge them? m2v and MP2?

The reason is that while I will keep my videos on DVDs made by DVDlab, some friends don't have standalone players and would like to save videos from DVDs to normally watch them from their hard disks so I would also like to be able to burn them in usual format on RWs for them to copy them onto their HDs. Like simple video files.

At the same time-I tried DVDlab a bit earlier and strangely it didn't put any audio into the clips. I imported video and audio in and put both ito that timeline...

What's the deal there? Any special things to set for it to actually put both into a file? I also burnt it onto a DVD+RW and no sound.

Also on the HD in the folder i speccified for DVDlab the TS Audio folder was empty while TS video contained data.



:?:


All times are GMT -5. The time now is 08:22 PM  —  vBulletin © Jelsoft Enterprises Ltd

Site design, images and content © 2002-2026 The Digital FAQ, www.digitalFAQ.com
Forum Software by vBulletin · Copyright © 2026 Jelsoft Enterprises Ltd.