digitalFAQ.com Forums [Archives]

digitalFAQ.com Forums [Archives] (http://www.digitalfaq.com/archives/)
-   Video Encoding and Conversion (http://www.digitalfaq.com/archives/encode/)
-   -   FFMPEG: Ffvfw settings to create KDVDs and KVCDs (http://www.digitalfaq.com/archives/encode/8019-ffmpeg-ffvfw-settings.html)

kwag 02-03-2004 03:16 PM

ffvfw settings to create KDVDs and KVCDs
 
First of all, if you don't have the KVCD "Notch" Matrix in ffvfw format, download it here: http://www.kvcd.net/kvcd-matrix-for-ffvfw.qmatrix

This first screenshot shows the settings to be used for making a KDVD:

http://www.digitalfaq.com/archives/i...2004/02/10.jpg

This second screenshot is for making a KVCD:

http://www.digitalfaq.com/archives/i...2004/02/11.jpg

All the following screenshots are common to both KVCD and KDVD.
Please note the field in red, which I left empty, so you fill in the correct value from the previous two screenshots, depending if you want to do a KVCD or a KDVD:

http://www.digitalfaq.com/archives/i...2004/02/12.jpg
http://www.digitalfaq.com/archives/i...2004/02/13.jpg
http://www.digitalfaq.com/archives/i...2004/02/14.jpg
http://www.digitalfaq.com/archives/i...2004/02/15.jpg
http://www.digitalfaq.com/archives/i...2004/02/16.jpg

The following optional screenshots, are to insert noise into the encoding. Use it to enhance visual quality, if the material requires it:

http://www.digitalfaq.com/archives/i...2004/02/17.jpg
http://www.digitalfaq.com/archives/i...2004/02/18.jpg

To do file prediction, you change the values of "Min quantizer" and Max quantizer". The higher the value (up to 31), the lower the file size.

Enjoy,
-kwag

rds_correia 02-03-2004 03:39 PM

Hi Kwag,
Just one question about GOP.
Since I live in PAL I should use GOP size 15 for KDVD and GOP size 24 for KVCD, right?
So, should I change my settings from "Minimux I Frame Interval 18" to 15 or I could just try it
with 18 since most standalones will still play it?
I mean, does it affect your KB/S calculations if I change it from 18 to 15?
Thanks, man.
I don't know what we would do without you around :)

kwag 02-03-2004 03:43 PM

Quote:

Originally Posted by rds_correia
Hi Kwag,
Just one question about GOP.
Since I live in PAL I should use GOP size 15 for KDVD and GOP size 24 for KVCD, right?

Yes. The settings are for NTSC, so make the appropiate changes.
Quote:

So, should I change my settings from "Minimux I Frame Interval 18" to 15 or I could just try it
with 18 since most standalones will still play it?
Change it.
Quote:

I mean, does it affect your KB/S calculations if I change it from 18 to 15?
No, I don't think so, but please try it, and then drag your mpeg over to bitrate viewer. You should see a VBV size of "20" for a KVCD and "112" for a KDVD.
Quote:

Thanks, man.
I don't know what we would do without you around :)
:lol:

-kwag

Hydeus 02-03-2004 04:40 PM

@Kwag
How did you discover that bitrate values are right :?: I mean, they are like completly from outer space :lol: why not few bits less or more ?

And secondary, did you try postprocessing mode in ffdshow ? It produces a litle blured image, but it cuts file size of about 10%

digitall.doc 02-03-2004 04:47 PM

Kwag:
you advise to change the values of "Min quantizer" and Max quantizer" to adjust the final file size: the bigger the number, the smaller the file. Do we increase both numbers at the same time (2:2 change to 3:3 and then 4:4 etc)?. Or first the Min quantizer?. And, do we have to change I, P and B Min/Max quantizers at the same time, or first I,...?.
Sorry, maybe too obvious questions.

... and, YES, I completely agree with rds_correia... YOU THE MAN :lol:
:wink:

digitall.doc 02-03-2004 04:50 PM

:oops: sorry, too late.
I read your answer in the loong thread, to change ALL quantizers at the same time.
Isn't it?. Make me know if understood you wrong.

kwag 02-03-2004 04:53 PM

Quote:

Originally Posted by Hydeus
@Kwag
How did you discover that bitrate values are right :?: I mean, they are like completly from outer space :lol: why not few bits less or more ?

By accident :!:
I was playing with the bitrate value, and I set it down to 1 by error, and when I started to encode, Vdub exploded. So I did a test with a value of about 32, and encoded a clip. Then I increased to 10000 and did another clip. After comparing the differences in bitrate viewer, I noticed the difference in VBV. So I did a simple math to scale the wanted VBV size, and BINGO, right on target :lol:
Quote:


And secondary, did you try postprocessing mode in ffdshow ? It produces a litle blured image, but it cuts file size of about 10%
Haven't tried it yet, but it would be about the same as using AviSynth, because most filters are already built-in.

-kwag

kwag 02-03-2004 04:54 PM

Quote:

Originally Posted by digitall.doc
:oops: sorry, too late.
I read your answer in the loong thread, to change ALL quantizers at the same time.
Isn't it?. Make me know if understood you wrong.

You are correct :D
Change all values at the same time ;)

-kwag

Hydeus 02-03-2004 05:09 PM

Quote:

Originally Posted by kwag
You can actually go up to 48KB ( a VBV value of 24 for KVCDs and VCDs ) which should be optimal.

... so , any corrections to the bitrate value for KVCD?
I know that this is from parallel thread, but IMO it's related to this thread.

kwag 02-03-2004 05:13 PM

Quote:

Originally Posted by Hydeus
Quote:

Originally Posted by kwag
You can actually go up to 48KB ( a VBV value of 24 for KVCDs and VCDs ) which should be optimal.

... so , any corrections to the bitrate value for KVCD?
I know that this is from parallel thread, but IMO it's related to this thread.

I should have said "Optimal range" :)
The "Standard" value is 40KB, which diplays "20" in Bitrate Viewer.
So first try the values I posted, and tweak from 20 to 24 ( 40KB to 48KB ).

-kwag

digitall.doc 02-03-2004 05:21 PM

... sorry me if being too "asking", but I'm so excited with so fast improvements in this nice codec... anyway, I think, looking at the "visits" numbers of these threads, I'm not the only one excited around here :lol: :lol: .
My question: any recommendation about scripting?. Are we using MA script for KVCD?, also for KDVD, or just resize?. In the other thread we talked about using blockbuster instead ffdshow noise. Incredible recommended (for KDVD I think) this parameters:
Code:

Blockbuster(method="noise",detail_min=1,detail_max=20,variance=1.0,seed=4326)
And we have also talked about using DCT filter.
Maybe it's still to early to talk about scripting, when we are still trying to adjust the codec.

digitall.doc 02-03-2004 05:25 PM

Quote:

Originally Posted by kwag
The "Standard" value is 40KB, which diplays "20" in Bitrate Viewer.
So first try the values I posted, and tweak from 20 to 24 ( 40KB to 48KB ).

I'm lost, which values are you talking about?, where are we to set them?.

Hydeus 02-03-2004 05:27 PM

For 24 set 1383 in bitrate. Do you agree Kwag? This is what BV displays. Is this affect a lot comlpiance with standalones ?

Dialhot 02-03-2004 05:27 PM

Quote:

Originally Posted by kwag
Quote:

So, should I change my settings from "Minimux I Frame Interval 18" to 15 or I could just try it
with 18 since most standalones will still play it?
Change it.

No, don't change, try !
I did all my KDVD till now with GOP=25 and all my three players play it very well.

kwag 02-03-2004 05:30 PM

Quote:

Originally Posted by digitall.doc
Quote:

Originally Posted by kwag
The "Standard" value is 40KB, which diplays "20" in Bitrate Viewer.
So first try the values I posted, and tweak from 20 to 24 ( 40KB to 48KB ) for KVCDs or VCDs.

I'm lost, which values are you talking about?, where are we to set them?.

Look at the top of this thread, where the value of CBR is set to 1147, which creates a VBV size of 20 (40KB).
So if you want a value of 48KB, do this:

(1147 / 20) * 24 = 1376.4

So round it to 1376 and that will give you a new VBV buffer size of 48KB (displayed as 24 in BitRate Viewer)

-kwag

Jellygoose 02-03-2004 05:43 PM

Wow, great kwag!

One question. If we change min. and max. quantization parameters at the same time, wouldn't that mean that each scene (slow and action) would be encoded with the exact same quantisizer? :roll:
Is that something we want? wouldn't it be way cooler to encode with a variable quantisizer? Just a thought...

btw: your samples actually speak for themselves. just curious though! :mrgreen:

kwag 02-03-2004 05:56 PM

Quote:

Originally Posted by Jellygoose
Wow, great kwag!

One question. If we change min. and max. quantization parameters at the same time, wouldn't that mean that each scene (slow and action) would be encoded with the exact same quantisizer? :roll:
Is that something we want? wouldn't it be way cooler to encode with a variable quantisizer? Just a thought...

Actually we want to encode with constant quantization, variable bitrate ( or constant quality/variable bitrate, if you want to see it that way :) )
Quote:


btw: your samples actually speak for themselves. just curious though! :mrgreen:
:mrgreen:

-kwag

Dialhot 02-03-2004 06:02 PM

I definitly have a problem with this codec :!:

All settings set as on the snapshots above (except for max quantizer in macrobloc that I can't change and is set to 31 and not 2 like on the snap).

:arrow: My Q curve it like a saw blade ! Values vary constantly from 0 to 2. The picture is very bad compared to the same sample made with CCE (and the file size is exactly the same) : tiny mosquito noise around edges and lot blocks in dark scenes (even with noise in ffvfw or in the script).

BTW, the sample was 53sec for a 90 min movie that is 1% sample. The file size is 16 Mb. So the final movie will be 1.6 GB without audio. ONLY TWO 90 MIN MOVIE ON THE DVD !

I drop this codec since the "Q curve" shape is not solved.

If someone have an idea...

kwag 02-03-2004 06:08 PM

Hi Phil,

Go to "Masking" option, and select "Luminance masking" and "Normalize adaptive quantization".
Now go back to "Quantization", and you can set Macroblocks to 2.
Then go back and deselect "Masking" options ;)

-kwag

Anerboda 02-03-2004 06:12 PM

Will this affect filesize or quality??

Anerboda

kwag 02-03-2004 06:15 PM

Quote:

Originally Posted by Anerboda
Will this affect filesize or quality??

Anerboda

I haven't really tried comparing with and without those options.
Still more options to play with. :)
But with the quality and space we're currently getting, I'm a VERY happy camper :drink: :lol:

-kwag

Jellygoose 02-03-2004 06:23 PM

Alright it's 22 minutes after midnight here, but after the sample I have just encoded I'm gonna have a goodnight beer. 8)

Edit: I see I don't have anymore in the freezer. Gotta take one out of the fridge then. :mrgreen: (just joking, i'm not an alcoholic)

Dialhot 02-03-2004 06:25 PM

Quote:

Originally Posted by kwag
Hi Phil,

Go to "Masking" option, and select "Luminance masking" and "Normalize adaptive quantization".
Now go back to "Quantization", and you can set Macroblocks to 2.
Then go back and deselect "Masking" options ;)

Okay, I try that right now.

Meanwhile I checked the sample you post in the top of this thread. It is actually as bad as mine ! :-(

One more time am I the only one that see the mosquitos (arround the title at the begining) ? The blocks (on the wall just above the same title, on the wall above Val Kilmer shoulder at sec #6, on the blue wall on the right of Carrie Ann Moss sec #8 and the most awfull, the brownish area on the right, under the "thing" where AMEE is writen, sec #9) ? The ants on the faces (Carrie Ann Moss, very last second of the sample).

I was fearing my sample was to complicate but I see that it is the codec that is not so powerfull.

(note : I use the same sample for all my testings since I started KVCD).

EDIT: Okay, my quantizer is set to 2/2 also for macroblocks now. But same result : the Q curve is a real saw blade. Average just dropped from 1.05 to 0.96 but max is still 2 and min 0.
I never had a linear (or near linear) Q curve with this codec, whatever the sample I encode (PAL and NTSC).

kwag 02-03-2004 06:38 PM

Hi Phil,

I want you to try something. Because the DCT precision in this CODEC is only 8 bits, change ALL values on the INTER portion (right side) of the matrix to "16" (the standard values for MPEG inter values).
So now the "KVCD Notch Matrix" will work only on the INTRA part.
Your encoding speed will now be lower (more frequencies are now being encoded), but the quality and MAX bitrate should be higher.
Tell me your results :!:

-kwag

Dialhot 02-03-2004 06:52 PM

Quote:

Originally Posted by kwag
Hi Phil,

I want you to try something. Because the DCT precision in this CODEC is only 8 bits, change ALL values on the INTER portion (right side) of the matrix to "16" (the standard values for MPEG inter values).
So now the "KVCD Notch Matrix" will work only on the INTRA part.
Your encoding speed will now be lower (more frequencies are now being encoded), but the quality and MAX bitrate should be higher.
Tell me your results :!:

Perhaps not tonight : I slept 4h last night, and not more the two nights before. And that not that is so late (1am insteed of 3:30 yesterday ;-)) but... I don't even understand what you are telling to me :lol:
I guess is the alarm that tells me "go to bed" :-)

BTW, I have to remove what I said just above : I set all values to 3, the sample size drop to 11 (insteed of 17) and with this size, CCE is... hum... I didn't even try to reach that value with it actually :-)

See ya tomorrow.

incredible 02-03-2004 07:04 PM

Quote:

Originally Posted by Phil
Okay, my quantizer is set to 2/2 also for macroblocks now

I'm not able to change somethin in "Macroblocks"! Its grayed out 8O

But Phil, ... look at these samples:
http://www.kvcd.net/forum/viewtopic....=asc&start=285

I first thought only on high CBR bitrate an high min quantizers the Curve will be constant, but my last one cd encoding sample on "The Core" showed thats a "settings" thing and I gonna find out how.

Also read there as I explained something about thats not important to archive a "constant" Q curve .... also a quote of Kika where he explains that Bitrateviewer thing.


Good night man! :)

Dialhot 02-03-2004 07:29 PM

Quote:

Originally Posted by incredible
I'm not able to change somethin in "Macroblocks"! Its grayed out 8O

See 3 or 4 post above this one, Kwag told me how to "ungray" the setting.

Quote:

Also read there as I explained something about thats not important to archive a "constant" Q curve .... also a quote of Kika where he explains that Bitrateviewer thing.
For sure. But I still don't understand WHY everyone has constant Q and not me. That means that there is something we miss in this codec and it a big issue to understand what !

Quote:

Good night man! :)
Just after this last test : I manage to deeply reduce the blocks in plain areas !

Remove all noise (in ffvfw or in the script), go in Motion Estimation tab and check all "Chroma" box. Change the shape of EPZS and ME diamond to "default".
And a little gift : the encoding speed raises while the file size decreases :-)

I'll do more test tomorrow. Bye.

vhelp 02-03-2004 09:10 PM

Kwag pal..

Very interesting thread.. 8)

Quote:

Note 2:
The produced .mpg file must be demuxed, and then run PULLDOWN.EXE on the file. This is for progressive sources.
Also, you must use DVDPatcher to patch the first header of the file to some bitrate, like 8,000Kbps. The encoded MPEG file reports a bitrate over the DVD standard, and DVD authoring programs won't import the file.
That's all you have to do. I imported my file into TMPGEnc DVD author, after this process, and worked like a charm
- - Request - -

:idea: :idea: Can you sticky this on the first page of THIS thread (and the other one,
which seems to be related) on that one's first page also ??
.
.
I had a hard time figuring out how to mux (still haven't done the mux yet)
but now that I do, I can't wait to try it :P
.
.
I've ben messing w/ this (finally got it figure out w/ MPEG-2 encoding) no
thanks to anyone here :( ..but.. .. .. I'm getting there anyways. Yeah, I've
ben doing my Star Wars AtackClones (Yoda scene :P ) and I'm making a
bit of progress. I followed your first steps (on page 1) and then after
reading Dialhot's, I got it down minus 2mb - - so that was a good
step in the right direction (I think) congrats to you and Dial and others here
and other thread on this ffVFW toy :P

-vhelp

vhelp 02-03-2004 09:16 PM

- - Request - -

can you make a quicky Matrix .txt file (or whatever fomat ffVFW requres) (left pan and right pan (both)) and post it on first page of thread so that we
can D/L it, instead of having to type it all in ?? ??

I'm still using the defualt matrix, and I'm already going blind. Thanks.
-vhelp

kwag 02-03-2004 09:35 PM

Quote:

Originally Posted by vhelp
- - Request - -

:idea: :idea: Can you sticky this on the first page of THIS thread (and the other one,
which seems to be related) on that one's first page also ??

Done :!:

-kwag

kwag 02-03-2004 09:36 PM

Quote:

Originally Posted by vhelp
- - Request - -

can you make a quicky Matrix .txt file (or whatever fomat ffVFW requres) (left pan and right pan (both)) and post it on first page of thread so that we
can D/L it, instead of having to type it all in ?? ??

Done (first post in this thread) :!:

Now you have A LOT of reading to catch up ;)

-kwag

vhelp 02-03-2004 09:43 PM

Reading, you say ??

..hehe, that's all I've ben doing, but I did skip a few pages. (much faster
when I'm surfing at work :P )

Listen, I did some testing, using MPEG2VCR. When I first try to open my
.mpg (avi wrapper) file in Bitrateviewer (or TMPG's tools) they won't open
for MUXing. I decided (since I don't have DVDpatcher) to try MPEG2VCR
for a test run. The clip muxed pretty fast, but there seems to be some
hesitation. I'm sure that my next step would be to do a real MUX job. But,
why do I need to do a 2nd MUX 8O - so, I'll try and find a good muxing app,
perhaps bbMPEG. Listen, if you're using bbMPEG, are you using the DVD
settings, or MPEG-2 settings ??

Wait..

Are you first muxing out your video/audio and then muxing them back
together, and then DVDpatching it, and Pulldown'ing it.

hmm...

Maybe you should cook up a A-Z receipee, so us dummy's can follow in as
shorter time 8O

Thanks for putting up w/ me :P
-vhelp

Krassi 02-04-2004 04:36 AM

Quote:

Originally Posted by Dialhot
Remove all noise (in ffvfw or in the script), go in tab and check all "Chroma" box. Change the shape of EPZS and ME diamond to "default".
And a little gift : the encoding speed raises while the file size decreases :-)

Hi Phil,
i've just had a look at the help file and there is an info about Chroma:
Code:

Warning: chroma doesn't work with b frames currently
Don't know if this is still applies.

EDIT: @All:
Have you already tried SATD with a higher diamond :?:

Hydeus 02-04-2004 04:52 AM

Quote:

Originally Posted by Krassi
Have you already tried SATD with a higher diamond :?:

Yes. Speed down, quality equal (a litle beter, but hardly noticable), so ther's no point to use it. SAD gives great results.
But I've used SATD with adaptive size 2 and 3. Dont know what will be with others diamonds.

To Phil and anybody intrested
With all this settings try MPEG1 instead of 2. 50% slower, but results ... 8)

Dialhot 02-04-2004 06:38 AM

Quote:

Originally Posted by Hydeus
With all this settings try MPEG1 instead of 2. 50% slower, but results ... 8)

We are doing KDVD...

Hydeus 02-04-2004 06:42 AM

I know :)
But for KVCD (as in the title also), you always say that MPEG1 is beter. This is my point.

Dialhot 02-04-2004 07:04 AM

Quote:

Originally Posted by Hydeus
(as in the title also)

Lol. Okay, I'll read the titles before answering next time :-P

kwag 02-04-2004 09:12 AM

Quote:

Originally Posted by Hydeus
To Phil and anybody intrested
With all this settings try MPEG1 instead of 2. 50% slower, but results ... 8)

Already tried it. Results not as good as MPEG-2.

-kwag

kwag 02-04-2004 09:13 AM

Quote:

Originally Posted by Hydeus
But for KVCD (as in the title also), you always say that MPEG1 is beter. This is my point.

But not with this CODEC. At least for the moment.

-kwag

Hydeus 02-04-2004 09:41 AM

With (S)VCD resolution and the same file size, I bet on MPEG1, even without notch matrixes. I've made MPEG2 test with settings you propose, and they're great, almost pure. But try MPEG1 on small resolutions and you'll se difference. I don't se this "color stairs" effect (with MPEG2 also hardly noticable), and I don't use any noise filter, only ffdshow postprocessed source. Plus there is less mosquito noise.

As always - my eyes are subjective 8)


All times are GMT -5. The time now is 06:23 PM  —  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.