Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

Domains: forum.doom9.org / forum.doom9.net / forum.doom9.se

 

Go Back   Doom9's Forum > Capturing and Editing Video > DV
Register FAQ Today's Posts Search

Reply
 
Thread Tools Search this Thread
Old 18th June 2003, 07:31   #1  |  Link
Bugsy
Registered User
 
Join Date: May 2003
Location: Norway
Posts: 21
Using Avisynt and CCE for DV-AVI

I tried posting this in the Avisynth usage forum, but I guess this forum is the correct one...
I mainly use different Avisynth filters, and their default settings to convert my DV-AVI (PAL) to DVD. I use CCE 2.66 (at max DVD bitrate settings, avg 6000, min 500, max 9000) with the following Avisynth script:

LoadPlugin("c:\windows\system32\Convolution3D.dll")
AviSource("c:\testfil1.avi")
convertToYUY2()
Convolution3D(preset="movieLQ")
DoubleWeave().SelectOdd()

I turn off all other filtering in CCE, and set 'Quantizer characteristics (flat part priority)' to 16. I am changing 'Quantize Matrice setting' to 'mb 1 interlaced DV' (thanks to mikeathome).

I'm getting fairly good results from these settings, it fixes the upper field first bug in CCE, and best of all good speed!

Is the Convolution3D(preset="movieLQ") and 'mb 1 interlaced DV' matrice a good pair....?
Are there any other settings/filters I should use to get even better results?

I have tested this script with the MSharpen() filter, but that filter corrupts my .m2v file...? (atleast Sonic MyDVD will not accept this file).

I hope the DV conversion guide will be made: http://www.avisynth.org/index.php?pa...vertingDVtoDVD

Bugsy
Bugsy is offline   Reply With Quote
Old 18th June 2003, 14:10   #2  |  Link
ulfschack
Registered User
 
Join Date: Oct 2001
Location: Sweden
Posts: 418
Is C3D interlace-aware? Is it 2.5x or 2.0x version of avisynth?. I have strong doubts about support for interlacing in avisynth filters (I'm not quite up to date on C3D though). Thats why i separate fields to two streams before doing any temporal operations on my DV avis.

Do you yourself think the result is more blurred than you would like it to be?

Mb1's interlaced_DV is the one I've been using for quite a while. I never made any in-depth comparisons myself. I just kinda trust that guy

The preset MovieLQ seems a bit steep though. If any you should use MovieHQ. Me, I don't use noise filters at all when having 6000 kbps to play with. SVDC and DivX is a different matter entirely.

cheers
ulfschack is offline   Reply With Quote
Old 18th June 2003, 17:14   #3  |  Link
Wilbert
Super Moderator
 
Join Date: Nov 2001
Location: Netherlands
Posts: 6,388
Quote:
Is C3D interlace-aware?
No.

Try something like

Quote:
LoadPlugin("c:\windows\system32\Convolution3D.dll")
AviSource("c:\testfil1.avi")
SeparateFields()
convertToYUY2()
Convolution3D(preset="movieLQ")
Weave()
I'm not sure why you are using DoubleWeave().SelectOdd(), because it does the following:
original clip: b1t1 b2t2 b3t3 ...
doubleweave: b1t1 t1b2 b2t2 t2b3 ...
doubleweave.selectodd: t1b2 t2b3 t3b4 ...
So, it combines fields from different frames.
Wilbert is offline   Reply With Quote
Old 18th June 2003, 20:08   #4  |  Link
bb
Moderator
 
bb's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 2,665
Quote:
Originally posted by Wilbert
I'm not sure why you are using DoubleWeave().SelectOdd(), because it does the following:
original clip: b1t1 b2t2 b3t3 ...
doubleweave: b1t1 t1b2 b2t2 t2b3 ...
doubleweave.selectodd: t1b2 t2b3 t3b4 ...
So, it combines fields from different frames.
Yes, but because DV is usually bff, and CCE always encodes tff, this clears the situation. It's even better than using CCE's "Upper field first" flag.

Regarding Convolution3D: you should always use it on fields, not frames, if you have to deal with interlaced sources, else you partially destroy the interlace structure. Due to its nature, Convolution3D performs better on progressive sources, because the lines in interlaced fields are less correlated in the vertical direction.

"movieLQ" is not that aggressive; I'd say you can safely use it. You may want to try the same parameters as the "movieLQ" preset, but use the full-1 matrix (1 instead of 0 as the first parameter) to get even better results.

If there's much noise in the video (because of low light), you can try Convolution3D(1, 16, 32, 16, 24, 2.8, 0)

@ulfschack:
The video gets better using Convolution3D, even at 6000 kbps average bitrate. Don't believe it? Try!

bb
bb is offline   Reply With Quote
Old 19th June 2003, 05:46   #5  |  Link
troy
Registered User
 
Join Date: Apr 2003
Posts: 84
put all together.

So is the general concensus that this is the best script. Would DoubleWeave().SelectOdd() for the last line of the script be the same as changing the field order flag in restream or pulldown.exe. after the file is encoded.

Also if I am using avisynth 2.08 with type 1 avi why do I need to put in convertToYUY2() in my script


LoadPlugin("c:\windows\system32\Convolution3D.dll")
AviSource("c:\testfil1.avi")
SeparateFields()
convertToYUY2()
Convolution3D(preset="movieLQ")
Weave()
DoubleWeave().SelectOdd()
troy is offline   Reply With Quote
Old 19th June 2003, 09:10   #6  |  Link
Wilbert
Super Moderator
 
Join Date: Nov 2001
Location: Netherlands
Posts: 6,388
Quote:
Yes, but because DV is usually bff, and CCE always encodes tff, this clears the situation. It's even better than using CCE's "Upper field first" flag.
I never worked with CCE, but shouldn't you feed it with "t1b1 t2b2 t3b3" then? Or better the ReverseFieldDominance plugin of Simon Walters.

Quote:
Also if I am using avisynth 2.08 with type 1 avi why do I need to put in convertToYUY2() in my script
You only need that if your source is not YUY2. In case you don't know, you can check that by using the following script

AviSource("c:\testfil1.avi").Info
Wilbert is offline   Reply With Quote
Old 19th June 2003, 09:33   #7  |  Link
Bugsy
Registered User
 
Join Date: May 2003
Location: Norway
Posts: 21
Thanks for your response, a lot of good input here!

@bb
Quote:
"movieLQ" is not that aggressive; I'd say you can safely use it. You may want to try the same parameters as the "movieLQ" preset, but use the full-1 matrix (1 instead of 0 as the first parameter) to get even better results.
I will try this for my next test.

I was not aware Convolution3D performs better on progressive sources, so I'll change my script according to this.

I'm using Avisynth 2.51, and have to change to YUY2 to get CCE to accept the file....

I feel I'm getting close, and I'll post my results and script when I have tested this.

Bugsy
Bugsy is offline   Reply With Quote
Old 19th June 2003, 09:40   #8  |  Link
bb
Moderator
 
bb's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 2,665
Wilbert,

Simon Walters ReverseFieldDominance does the same thing as CCE's "Upper field first" flag, except that it can shift in both directions. So this is the method of swapping fields, and I'm not certain if this should have been named "reverse field dominance", because I would understand this as the other approach (dropping one field and recombining the fields).

Strictly speaking you're right that the fields get recombined differently using DoubleWeave().SelectOdd(), but that doesn't matter because for interlaced sources we have to deal with fields, not frames. And this way you don't lose one line at the top and double another at the bottom, which means loss of information (although this won't bee very noticable).

See http://forum.doom9.org/showthread.ph...0&pagenumber=2
for an extensive discussion, especially Donald Graft's post (the first on page 2).

bb
bb is offline   Reply With Quote
Old 19th June 2003, 10:14   #9  |  Link
ulfschack
Registered User
 
Join Date: Oct 2001
Location: Sweden
Posts: 418
With all due respect to all the "heavies" here, you seem to be missing a vital point in temporal filtering of fields in 50 fps streams. Namely that you're not comparing pixels on the same position. If you divide it into two (25 fps) by SelectOdd/Even, on the other hand, an arbitrary pixel will have the same spatial coordinates in two consecutive frames/fields/pictures (or whatever is the right word here).

Hope you get my point

@BB. Yes you (even I) migt think it looks better, but are you sure that it's also closer to the original? (I for one like to have it that way and usually tire rather quickly at "cool new looks".

cheers
ulfschack is offline   Reply With Quote
Old 19th June 2003, 13:03   #10  |  Link
troy
Registered User
 
Join Date: Apr 2003
Posts: 84
ULF, what script would you suggest.

I tried this script

LoadPlugin("d:c3d\Convolution3D.dll")
directshowsource("D:\test.avi")
SeparateFields()
Convolution3D(preset="movieHQ")
Weave()
DoubleWeave().SelectOdd()
resampleaudio(44100)

and analyzed the resulting m2v in bitrate viewer and my resulting video is now tff. Is this correct.
troy is offline   Reply With Quote
Old 19th June 2003, 13:36   #11  |  Link
ulfschack
Registered User
 
Join Date: Oct 2001
Location: Sweden
Posts: 418
First of let me just say that I know next to nothing about field order and dominance, but I've over the years come to realize that if it you do it wrong there's no question about it because it's so obvious. I mean I don't believe that there's a way of doing this tff-bff-even-odd-dominance-stuff in different ways and just get slight improvements. It's either right or wrong. And if it is wrong, I just run it through pulldown.exe to set it right again. I think "Restream" is another freeware that does it for you.

As for the avisynth script I'm at work and have my standard script @home so forgive typos. Here's roughly what I do.


LoadPlugin("d:\c3d\Convolution3D.dll")
avisource("D:\test.avi")
fps50=SeparateFields()
even=selectEven(fps50).Convolution3D(preset="movieHQ")
odd=selectOdd(fps50).Convolution3D(preset="movieHQ")
interleave(even,odd).weave() #possibly swap Even and Odd
resampleaudio(44100) #only necessary for certain versions of CCE


You might wanna add an AssumeFrameBased or a ConvertToYUY2 at the start depending on various circumstances. Don't be afraid to use the parameters bb recommended tho. See what you like best

cheers
ulfschack is offline   Reply With Quote
Old 19th June 2003, 16:34   #12  |  Link
troy
Registered User
 
Join Date: Apr 2003
Posts: 84
sorry for being a nube but if my source is ntsc would I use fps(60).

Also Ulf. You probably forgot but you yourself said that you can not use this filter in your script in more than one instance in another thread. Anybody have any suggestions.
troy is offline   Reply With Quote
Old 19th June 2003, 16:38   #13  |  Link
troy
Registered User
 
Join Date: Apr 2003
Posts: 84
sorry again ulf but you were talking about dust and not c3d. I am gonna try what you suggested and see if it will work.
troy is offline   Reply With Quote
Old 19th June 2003, 16:49   #14  |  Link
troy
Registered User
 
Join Date: Apr 2003
Posts: 84
Well it at least works. About comparing quality this will have to wait.
troy is offline   Reply With Quote
Old 19th June 2003, 19:11   #15  |  Link
bb
Moderator
 
bb's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 2,665
Quote:
Originally posted by ulfschack
Namely that you're not comparing pixels on the same position. If you divide it into two (25 fps) by SelectOdd/Even, on the other hand, an arbitrary pixel will have the same spatial coordinates in two consecutive frames/fields/pictures (or whatever is the right word here).
That's what I referred to when I wrote "the lines in interlaced fields are less correlated in the vertical direction" in my post above.

Quote:
@BB. Yes you (even I) migt think it looks better, but are you sure that it's also closer to the original? (I for one like to have it that way and usually tire rather quickly at "cool new looks".
cheers
Don't know for sure; you'd have to do a test series and calculate the differences or the PSNR. What I can tell for sure is that Convolution3D increases compressibility by reducing noise, and, if you ask me, also increases quality, at least in critical situations (low light shots). Noisy sources tend to create blocks or mosquito noise in the MPEG-2 video, and that's what I dislike.

Unlike other noise removers Convolution3D averages a large number of the pixels that can be assumed to correlate the most: the direct neighbours in time and space. Up to 26 neighbour pixels are used to build an average with the current pixel, so noise is removed efficiently while keeping the "real" pixel values at a maximum.

Just yesterday I had low-light shot to encode (a progressive DV source), and I did a quick-and-dirty conversion using CCE VBR Q40. Later I did another encode using Convolution3D, again using CCE @ VBR Q40, and the result was *much* better.

Well, you have to decide which method you like best. In the end it's a matter of taste.

bb
bb is offline   Reply With Quote
Old 23rd June 2003, 14:37   #16  |  Link
Bugsy
Registered User
 
Join Date: May 2003
Location: Norway
Posts: 21
I have tested both Convolution3D settings in this script:

LoadPlugin("c:\windows\system32\Convolution3D.dll")
AviSource("c:\testfil1.avi")
SeparateFields()
convertToYUY2()
# Convolution3D(1, 16, 32, 16, 24, 2.8, 0) #For noisy DV
Convolution3D (1, 6, 10, 6, 8, 2.8, 0) #For good DV source
Weave()
DoubleWeave().SelectOdd()

I find Convolution3D (1, 6, 10, 6, 8, 2.8, 0) the best as this setting is more like the original DV-AVI.
When it comes to fieldorder in CCE, this script produces a perfect result.
I have also compared this result to a conversion done with TMPEGEnc (Wizard DVD high quality). TMPEGEnc takes 4- 5 times as long to convert the same file, and with the same quality (in my opinion)!
I use 'Quantizer characteristics (flat part priority)' = 16 for my test.
Will 'Quantizer characteristics (flat part priority)' = 40 produce a better result (3 pass)?
I have done a lot of reading, and a lot of testing, but no result is nowhere near this, but I am still looking for settings to further enhance the result. CCE settings or other Avisynth filters/settings, so keep on posting!

Bugsy
Bugsy is offline   Reply With Quote
Old 24th June 2003, 18:53   #17  |  Link
bb
Moderator
 
bb's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 2,665
Quote:
Originally posted by Bugsy

I use 'Quantizer characteristics (flat part priority)' = 16 for my test.
Will 'Quantizer characteristics (flat part priority)' = 40 produce a better result (3 pass)?
My '40' setting referred to the one-pass quantizer value - just in case you misunderstood.

The 'Quantizer characteristics (flat part priority)' gives more bitrate to complicated scenes if lowered, and distributes the bitrate more evenly if increased. The default of 16 is a good all-purpose value, and you should increase it only if you use a high bitrate and experience banding in dark, slow scenes.

bb
bb is offline   Reply With Quote
Old 25th June 2003, 09:23   #18  |  Link
Bugsy
Registered User
 
Join Date: May 2003
Location: Norway
Posts: 21
Thanks bb for clearing that up.

Have you any experience with the 'peachsmoother' or 'TomsMoComp'?

Bugsy
Bugsy is offline   Reply With Quote
Old 25th June 2003, 09:34   #19  |  Link
ulfschack
Registered User
 
Join Date: Oct 2001
Location: Sweden
Posts: 418
Sorry for my seeming indifferent to your comments. This is not my purpose, but rather a consequence of an unfortunate crossing of my ADSL modem and a lightning bolt.

@bb I hear you, and think I agree too. Low light scenes would prolly need a good filtering. I'd like to perform some test on avisynth 2.5x to see if the new "conditional"-feature coud be of help in selective filtering (dark scenes only), but just thought I'd throw the question your way in case you'd allready dabbled with it. Editing in Avisynth with trim is not my favourite pastime.

Just out of curiosity, bb ... do you think your progressive DV cam produces better material for TV viewing (than compared to interlaced ... if you ever had the expirence, that is). Reason I ask is that prog DV used to be a wet dream of mine. Mainly for not having to concern myself with the hassels of interlacing, but also purely based on hearsay that the quality should be somuch better. However watching progressive (in fact deinterlaced) DV in my TV I'm pretty sure that the fluentness of pannings created by a 50 fps interlaced stream is more to my liking. Progressive DV sort of gives me the same feeling as sitting to close up front in the movie theatre. Any support from you in this?

@Bugsy, Try my script too (splitting streams) while your at it so that readers of this thread can get something out of our bickering, would you ?

@Troy, Yes I would really like for Steady to have a look-see at this bug, cause his filter is certainly among the top contenders as far as I'm concerned.

cheers
ulfschack is offline   Reply With Quote
Old 25th June 2003, 10:50   #20  |  Link
Bugsy
Registered User
 
Join Date: May 2003
Location: Norway
Posts: 21
@ulfschack
Quote:
@Bugsy, Try my script too (splitting streams) while your at it so that readers of this thread can get something out of our bickering, would you ?
I'll test this script tonight (I'm at work right now):

LoadPlugin("c:\windows\system32\Convolution3D.dll")
AviSource("c:\testfil1.avi")
convertToYUY2() #Convolution3D.dll only supports this
fps50=SeparateFields()# The 'ulfschack' method
even=selectEven(fps50).Convolution3D (1, 6, 10, 6, 8, 2.8, 0) #bb Convolution3D setting
odd=selectOdd(fps50).Convolution3D (1, 6, 10, 6, 8, 2.8, 0) #bb Convolution3D setting
# Convolution3D(1, 16, 32, 16, 24, 2.8, 0) # Alternative for noisy DV
# Convolution3D (1, 6, 10, 6, 8, 2.8, 0) # For good DV source, by bb
interleave(even,odd).weave()
DoubleWeave().SelectOdd() # For fixing the CCE upper field bug

If someone else would like to test this I'm very interested in the results!!!!!

Bugsy
Bugsy is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 19:43.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.