digitalFAQ.com Forums [Archives]

digitalFAQ.com Forums [Archives] (http://www.digitalfaq.com/archives/)
-   Video Encoding and Conversion (http://www.digitalfaq.com/archives/encode/)
-   -   KVCD: Bitrate to get better results than the standard matrix? (http://www.digitalfaq.com/archives/encode/6886-kvcd-bitrate-better.html)

MrTibs 11-27-2003 12:52 AM

KVCD: Bitrate to get better results than the standard matrix?
 
I often encode with a CQ at a 100. Is there a bitrate where I would get better results with the standard matrix? Or, is your matrix always going to give me better results.

FYI, KVCD can produce great results with a rip and for clean sources but on some of my noisy sources...not so good.

(I don't mind a 2 cd encode for some movies. It seems that my analog captures compress poorly so a single CD encode just doens't look good enough.)

Edit: I miss typed. What I ment to convey is that on MY very noisy sources, the 1 CD encoding results are not very good (due to the bitrate required for the noise). The problem is not KVCD but rather the source. So, my question was aimed at the issue of video quality when compression was not an issue. Sorry, Kwag I didn't mean to type what I did. :oops:

Dialhot 11-27-2003 04:23 AM

Re: Question for Kwag
 
Quote:

Originally Posted by MrTibs
FYI, KVCD can produce great results with a rip and for clean sources but on some of my noisy sources...not so good.

That's the purpose of the scripts in fact. Did you see that thread talking about resizing by half, denoising and then restore the orignal size ? It seems that gives wonderful results on analog captures as your.

(I do not find it but I'm sure some can point it to you).

incredible 11-27-2003 04:41 AM

Here it is ;-)
http://www.kvcd.net/forum/viewtopic.php?t=6863

BUT!
The main purpose by doing this ONE-HALF-Filter-ONE was that the filters can perform better on lower resolutions - also you don't have to set them that heavy which also lets you preserve more details. And by the way in case of Dust Filters like Pixiedust() it rises up the speed.

BUT! Anyhow ... we do loose pixelinformations by resizing to half thats a fact ... well you won't recognise it that much on TV but ... it hurts to our High-Resolution emotions ;-)

So ... in case of captures and all streams which will be recognised as Fieldbased you can do the following:

Avisource(........)
SeparateFields().Bicubicresize(xxxx, 1/2 yyy)
YourFilterSettingsHere()
Weave()

What does this mean? Nomen est Omen so the fields will be separated and you will obtain (in case of 704x576 capture) a 704x288 stream which runs at 50fps !!
There we also got that ONE HALF ONE Effect ... for better filtering results!
And the Weave() command will re-assemble the fields again so it results again as a 704x576 25fps stream.

I do it on every capture (no matter if REALLY interlaced or just progressive) and I also did it on some bad/noisy DVD sources.

But watch out if applying Temporal filtering! In such a case you should use the "interleave" method.

In case of Peachsmoother (if you remember my script) you still should use the "Seperate Fields" method as it is recommended by the author himself at doom9.org

Boulder 11-27-2003 04:51 AM

Here's an easy way to interlaced filtering, no matter if you use spatial or temporal filters:

Code:

AVISource()
UnFoldFieldsVertical(flip=true)
#All filters here#
#Resizing here#
FoldFieldsVertical(flip=true)
AddBorders()

Here are the two functions you need:

Code:

# JDL_UnfoldFieldsVertical
#
#  Separates the fields in a clip and stacks them vertically.
#  Regardless of field order, even fields are on top.
#
# PARAMETERS:
#  flip - pass true to flip the bottom field vertically;
#          useful when dealing with spatial filters
#          (default: false)
#
function UnfoldFieldsVertical(clip c, bool "flip")
{
    flip = default(flip, false)
    oldParity = c.GetParity()
    c.AssumeTFF().SeparateFields().AssumeFrameBased()
    top = SelectEven()
    bottom = SelectOdd()
    StackVertical(top, flip ? bottom.FlipVertical()
    \                      : bottom)
    return (c.FrameCount() == 0)
    \      ? c
    \      : SetParity(oldParity)
}


# JDL_FoldFieldsVertical
#
#  Folds fields from a clip that resulted from calling
#  JDL_UnfoldFieldsVertical.
#
# PARAMETERS:
#  flip - pass true if the bottom field was flipped vertically with
#            JDL_UnfoldFieldsVertical
#          (default: false)
#
function FoldFieldsVertical(clip c, bool "flip")
{
    assert(c.Height() % 2 == 0, "JDL_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
    Interleave(evens, odds).AssumeFieldBased().AssumeTFF().Weave()
    return (c.FrameCount() == 0)
    \      ? c
    \      : SetParity(oldParity)
}

You can save the functions in your Avisynth plugins folder (for example with the name foldfields.avsi) so you don't have to add all those lines in your script every time. Just remember to use the extension .avsi .

If you're worried about losing too much pixel information with the 1-½-1 thing, try 704x576 -> 480x576 -> 704x576.

MrTibs 11-28-2003 09:40 AM

Thanks guys.

I'll try the scripts this weekend (where does the time go?).

I'm hooked on PixieDust but it has a bug on noisy souces that causes the fast moving parts of the frame to break up (macro blocks). For a while I thought this was due to my encoding process but you can actually see it in Vdub before the encoding (with Huffy as a source).

Increadible's script has worked wonders on my MJpeg encodes so I'm sure his and Boulder's will prove to be quite good here.

Thanks again, I'll let you know how it all turns out.

MrTibs 12-02-2003 12:01 AM

OK, first thanks again for the pointers.

I did know about increadible's One-half-one methods but I had captured at 352x480 so I was a little limited with my source.

I had been experimenting with a modifcation of incredable's script that used StackVertical but Boulder's script produced better results due to the parity check. The script allowed me to achieve a CQ of 77 for a movie 114 minutes long and nearly full screen. (I do a semi-full screen-to-wide-screen conversion to increase compression.)

The remaining challenge are the low lit scenes. The normal to bright scenes look fantastic but the dark ones are covered in macro blocks. Is this a place for blockbuster or what would you guys suggest?

@Dialhot
I got a taste of what KVCD can do even at lower CQ's with the one and only rip I did. The results are truly amazing so my hopes for my noisy captures has gone up too. You are probably right that I should continue to plug away until I can fit an entire movie onto a single CD. I have poked around and found some of your script examples so I'll be trying those next.


Any suggestions for the low lit scenes?

incredible 12-02-2003 02:19 AM

Quote:

Originally Posted by MrTibs
OK, first thanks again for the pointers.

I did know about increadible's One-half-one methods but I had captured at 352x480 so I was a little limited with my source.

Watch out! By separating the fields on a 352x480 stream and therefore obtaining a 352x240 @ 50FPS for filtering, Peachsmoother does behave totally different (as it seems to me) on 352x288(240)! It seems that the author implementated a "safe"-filtering brake so the filter performs worse on that size. If you already capture at 352x480 the Framedata is less enough and you don't need to separate the fields. Well I also will try this week Boulders recommendation of UnFold/FoldFieldsVertical but anyhow peachsmoother seems working worse on resolutions less than 352x576(480).
Quote:

The remaining challenge are the low lit scenes. The normal to bright scenes look fantastic but the dark ones are covered in macro blocks. Is this a place for blockbuster or what would you guys suggest?
What are your min/max Bitratesettings you encode with?
And .... yes Blockbuster(xxxx) "can" do little wonders on that scenes you mention so you have to try and use the settings of Blockbuster DialHot set at the end of his Avi scripts.


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