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 VIDEO CODEC (http://www.digitalfaq.com/archives/encode/7913-ffmpeg-ffvfw-video.html)

kwag 02-03-2004 02:23 PM

Quote:

Originally Posted by incredible
NICE! By this I can now directly test the optimal qantisizing for encoding! Extreme coool!

And now you should see clearly a MUCH better quality on the walls :!:
The encoder was not optimized, because it was encoding with an erroneous VBV buffer size. So now look at the DCT blocks on the walls, and I'm sure they are equal (if not better?) that CCE ;)

-kwag

nicksteel 02-03-2004 02:27 PM

Quote:

Originally Posted by incredible
Did you also check in the left right corner of your task bar, that little FFvfw tab!! There you can see the graph while encoding and see how much the quantisation will take!!!

:?: Where exactly on which screen is this?

:D And Kwag, you made my day with the screen examples!

incredible 02-03-2004 02:27 PM

Ok, Kwag but your way in the last pics with that field where you put 10 and when changing than would give filesize differencies, .. won't work for me.

But what works is when changing the Qauntisation values from 2 to 3 in the I P and B frame quantisation section ... and that makes sense?!

incredible 02-03-2004 02:31 PM

DAMN!!!! 8O

I gonna post Pics right in the next few minutes!!

:D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D

When rising the quantizer in that high bitrate to 3 as min in the I P and B franes its still veryyyyyyyyyyyyy ggoooooood and I got for a 98min movie in PAL! means more FPS and more pixels! about 8360kbit on a 1% moviesample = Prediction Goodbye!

I didn't compared with CCE now but :arrow: AWESOME! And my lower speed issue went away in CBR!

Quote:

Originally Posted by nicksteel
:?: Where exactly on which screen is this?

Just very below to the right just left hand to the little watch in the desctop

rds_correia 02-03-2004 02:42 PM

@Nicksteel,
You can find it on the "statistics" settings of ffvfw.
Just choose show tray/graph.
Hurry man. Go run some tests with it :wink:
C ya

incredible 02-03-2004 03:01 PM

323 kb image size jpeg quality 50% ----- who cares, lets kick da bandwith! :wink:

Ok, here are the samples at PAL 25 FPS 704x576 overscan=2

1% Sample Filesize: 8.360 kb! Watch the avg bitrate in Bitrateviewer at 704x576/25fps! And thats a 1.85:1 movie.
Movie length about 95 mins, let it be more who cares if it wont get over 1300mb á 3 Movies on one DVD-R non-anamorphic.

Here it comes, first Bitrateviewer followed by the jpeg Pic (Quality 50%!!)

NEXT Step will be full CVD compilant 352x576 mpeg2 one movie to one CD using Notch! incl. 128kbit audio ... lets see!

http://www.digitalfaq.com/archives/error.gif

kwag 02-03-2004 03:09 PM

SWEEEEEEET Incredible :mrgreen:
:ole:
I'm with you 100%: Bye Bye file size prediction :rotf:

-kwag

Krassi 02-03-2004 03:17 PM

Great Result, Inc.
With or without filters :?:
I have to find a DVD thats clean enough for this comparison. Xmen II is too noisy :roll:

My experiences with Karl's latest settings are similar.
The bitrate peaks go up to 6500 while average is ~2000. This is just great 8)

incredible 02-03-2004 03:23 PM

Here's the script I used:
Code:

mpeg2source("G:\One_HOUR_Photo\photo.d2v")
Asharp(1,4)
BicubicResize(656,368,0,0.6,0,4,720,536)
STmedianFilter(3,3,0,0).TemporalSoften(2,5,8,15,2).undot()
MaJustSoften()
AddBorders(24,96,24,112)
DctFilterD(4)
DctFilter(1,1,1,1,1,1,0.5,0)
Slicer(1,15,2,2,0)

I used Also DCTfilterD(4) as the last values of the MA in the right korner below of the matrix won't get higher than 63! But on the other hand no merge/chroma/blur

Krassi 02-03-2004 03:28 PM

@inc: Thanks for the info.

@Kwag:
Changing the min/max quant. doesn't change filesize or average bitrate for me. I'll do some further tests, but there wasn't any difference between 2, 3 and 10.

kwag 02-03-2004 03:34 PM

Quote:

Originally Posted by Krassi
@Kwag:
Changing the min/max quant. doesn't change filesize or average bitrate for me. I'll do some further tests, but there wasn't any difference between 2, 3 and 10.

It has to 8O
For example, start with all values set to 2.
If file is too large, change them ALL to 3. Etc, etc.
The higher the numbers, the lower the file size.
Works for me :!:

-kwag

Krassi 02-03-2004 03:40 PM

Quote:

Originally Posted by kwag
If file is too large, change them ALL to 3. Etc, etc.
The higher the numbers, the lower the file size.
Works for me :!:

Yep, you're right. I missed "All" :roll:
I thought that min would be a minimum and max a maximum. So you have to change both. Do you know why this makes sence :?:

incredible 02-03-2004 03:43 PM

@ Krassi
Quantisation means in ffvfw "Q" mode, means the quality, :arrow: the more you quantize the more the pic gets worse.

The max quantize Values of I P and B is just ignored by teh encoder, min Qantize is what counts, do look during encoding at the graph as I explained above and you can see that the quantizer while encoding stays almost constant at the min value you did set in the quantize options! And will be the same then in Bitrateviewer!

Now at 352x576 the encoder behaves a bit different!! and not that efficient Like at bigger image sizes!
I did lower the min quantizers back to the better value of 2! (I P B) but on the other hand I can go to 2510kbit CBR (= VBV 44) (lower values will let suffer the image! and we should keep in mind that 352x576 will be scaled 2xtimes in its with afterwards!)

Heres the report on 352x576 at still 15 GOP!: Final size on 1% sample is 6.164 incl. Audio would fit nice on one CDr80. Next step will be 480x576!

http://www.digitalfaq.com/archives/error.gif

Krassi 02-03-2004 03:48 PM

Quote:

Originally Posted by incredible
@ Krassi
Quantisation means in ffvfw "Q" mode, means the quality, :arrow: the more you quantize the more the pic gets worse.

The max quantize Values of I P and B is just ignored by teh encoder, min Qantize is what counts, do look during encoding at the graph as I explained above and you can see that the quantizer while encoding stays almost constant at the min value you did set in the quantize options! And will be the same then in Bitrateviewer!

Okay, got it now. Thanks.

digitall.doc 02-03-2004 03:54 PM

@incredible:
will we need a different CBR kbps value for each resolution?. Do you advise 2510 for 352x576 res.

incredible 02-03-2004 03:56 PM

In my workout now its the mixture of min Qantize and the kbit value in CBR!

But till now I do not recommend nothing as these are my first successes and Im doing on 480x576 now.

kwag 02-03-2004 03:57 PM

Quote:

Originally Posted by digitall.doc
@incredible:
will we need a different CBR kbps value for each resolution?. Do you advise 2510 for 352x576 res.

I'll answer that.
*** NO ***
The CBR bitrate value controls the size of the VBV buffer size.
Leave the values that I posted on the procedure to make KVCDs or KDVDs.

Edit: Correction. You can actually go up to 48KB ( a VBV value of 24 for KVCDs and VCDs ) which should be optimal.

-kwag

incredible 02-03-2004 03:59 PM

Kwag! In my case it controls the VBV Buffer size AND the value of avg bitrate! And in my samples it makes sense as only adjusting the min quantizer wont give effective results as the baviour of resulting filesizes got a too wide range in just one step of quantize value :!:

kwag 02-03-2004 04:01 PM

Cross posting/editing :lol:

incredible 02-03-2004 04:04 PM

Strange! When doing 352x576 I could rise a bit the endsize/Quality by screwing at the CBR but now at 480x576 the final size is FIX!

incredible 02-03-2004 04:16 PM

BTW: At all my last samples I did NOT add noise! just the script and their diff. resizers acording to final resolution!

Here now 480x576 at 1164CBR and again the better quantize value of 2!
So its not FIX by this:"yes" the screwing on the CBR Bitrate does compensate a bit. But you have to screw a lot and thats risky.

As you see Kwag I choosed the same quantizer as in case of 352x576 but had to lower the CBR to archive almost the same final size of these 1% at 480x576 compared to the 352x576 sample above.

Final size on 1% is 6.464kbit

(as I understood right Kwag, the VBV 20 below in the screen stand for a real double value like VBV40 in TmpgENc??)

http://www.digitalfaq.com/archives/error.gif

Anerboda 02-03-2004 04:25 PM

So, I got to get this straight: do we have to change both the min and max Quantizer to be the same value or can we have different values in the min and max settings??

Anerboda

incredible 02-03-2004 04:26 PM

I always have quantize max to 25 or even 30 and I ONLY change at the min quantizer from 2 to 3 depends on the final wanted filesize and resolution!

The max value in all my cases did cause nothing as the CBR encode refers to the min Quatize value. You can se that in the FFvfw Graph which you can open during encoding below right at your desctop left hand to the little watch!

Anerboda 02-03-2004 04:29 PM

Quote:

Originally Posted by incredible
I always have quantize max to 25 or even 30 and I ONLY change at the min quantizer from 2 to 3 depends on the final wanted filesize and resolution!

The max value in all my cases did cause nothing as the CBR encode refers to the min Quatize value. You can se that in the FFvfw Graph which you can open during encoding below right at your desctop left hand to the little watch!

But then the Q-level won't be linear, but perhaps it doesn't have to be??

incredible 02-03-2004 04:41 PM

At my KDVD sample 704x576 where I set that high bitrate the Q Level was Linear, but in case of OneCD encodings it isn't as I lower the CBR Bitrate at least to get the right VBV.

Linear Q curve is luxury and means nothing, you just should keep the Q curve about 3 or better below. And thats only a numeral value, only your eyes will tell you the truth.

DO open a TmpgENc CQ encoding and there also even at high CQ Values the Q curve won't be linear.

On the other hand as I said that often: Bitrateviewer and also its Q curve is not a garant for real viewable quality!

Let me quote KIKA from his GOP DCT/ Matrix Guide:

Quote:

Originally Posted by Kika
The force of expression of the q-level with the popular Bitrateviewer is to be enjoyed with caution. Because a high level means only that a block contained many same values after quantization, and which also could mean a result of a perfect interaction of quantization and RLE coding!!! And that again means that in such a case highly one quantized, the image quality however on the highest possible level was! Since however hardly someone really understands, what has it with the q-level actually on itself, I leave rather the fingers of interpretation attempts.

(Googles translation engine just used)

Means: If You encode crap and after reassembling the stream when the player again uses the matrix to descramble and the SAME crap comes out, the result is a 1:1 copy of that crap = "....could mean a result of a perfect interaction of quantization and RLE coding" and means a good Q value in Bitrateviewer. (If I understood KIKA in his guide right)

Anerboda 02-03-2004 04:48 PM

But do you gain anything by not keeping the same min and max values?

incredible 02-03-2004 04:51 PM

These are my first encodings on CBR mode in ffvfw and so as I said I do not recommend anything ;-) It was just set and I did let it run and as my logic told me that only the min value of quantize makes sense to modify (I figured that out in the ffvfw graph!), so now that was it what I actually did ;-)

Anerboda 02-03-2004 04:54 PM

Ok, thanks.

I guess more testing will be done, I don't think we're finished yet :D

Anerboda

incredible 02-03-2004 04:58 PM

We just just figured out "how to drive that car" but we still don't now which type of gas is the best and how fast it could drive then! :D :lol:

kwag 02-03-2004 05:00 PM

Quote:

Originally Posted by Anerboda
I don't think we're finished yet :D

I'm not :mrgreen:
I'm trying to find a way to encode with 9 bits precision, but that's probably impossible at this moment :)

-kwag

kwag 02-03-2004 05:02 PM

Quote:

Originally Posted by incredible
We just just figured out "how to drive that car" but we still don't now which type of gas is the best and how fast it could drive then! :D :lol:

But we've come from a "Go Kart" to a Porche in a matter of hours :mrgreen: :rotf:
:driveby:

-kwag

Hydeus 02-03-2004 05:03 PM

Quote:

Originally Posted by kwag
I'm trying to find a way to encode with 9 bits precision, but that's probably impossible at this moment :)

And what will be benefit of this?? Yes, yes .. I'm newbie :)

kwag 02-03-2004 05:12 PM

Quote:

Originally Posted by Hydeus
Quote:

Originally Posted by kwag
I'm trying to find a way to encode with 9 bits precision, but that's probably impossible at this moment :)

And what will be benefit of this?? Yes, yes .. I'm newbie :)

Higher quality on bitrates above ~4Mbps.

-kwag

incredible 02-03-2004 05:43 PM

Next Step a full action flashing long Movie at 480x576

"The Core" 130mins!, ... very hard to get good result:

Min Quantizers I=3, P=3, B=4, 84 Frames within a GOP! CBR 1165, 1B Frame (yes it decreased filesize), noise added via ffvfw.

And a little extra Unfilter(-8,-8 ) below the MA Command in my script.
... that little unsharpen the movie does make wonder according to an acceptable quantisation on THAT kind of movie.
Merge/Chroma/Luma Blur would do it also but I don't had that command now in mind and I was just too lazy to look in the orig MA ;-))))

8O We're still at mpeg2 one CDencoding ;-)

690kbit AVG Bitrate!!

Look at the Q curve, it seems the encoder after some Frames does get calm ;-)


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

Hydeus 02-04-2004 04:41 AM

I'm starting to be lost in posts :)

Two questions to Incredible:
1st few post ago by Dialhot
Quote:

Originally Posted by Dialhot
WHO actually set the matrix in bbmpeg ?
:arrow: If I follow you correctly, if you do not do that, all the KVCD muxed with bbmpeg will be unscramble with the wrong key :!:

2nd
Quote:

Originally Posted by Incredible
Min Quantizers I=3, P=3, B=4, 84 Frames within a GOP! CBR 1165, 1B Frame (yes it decreased filesize), noise added via ffvfw.

And what will be with no B frames at all?

Krassi 02-04-2004 05:23 AM

I've done 3 screenshots.
Some details:
DVB-Capture mpeg2, small adapted MA-script, q=4 (all).
1 min. equals 18.283 KB.

Bitrate
Pic1
Pic2

In the last picture on the top right corner you can see some blocks. However, TMPGEnc's image is alot worse :roll:

EDIT: The screenshots above had SADT, adaptive 3. The following is done with "normal" settings:
Pic3

EDIT2: Converted image links to normal links to clean up thread.

Dialhot 02-04-2004 05:44 AM

CAN ANYONE TELL ME WHY ME Q CURVE ISN'T CONSTANT :?: :?:

Krassi have a perfect line, Inc have a "near constant" curve and mine is like the yellow line of Krassi snapshot !

Whatever the settings I put (I even set to 100% all the paremeters in Rate control and put "0" for "Max Quantizer difference"

This sucks ! :-(

Note: Inc and all, still snapshots are worthless. They only permit to see if there is macro blocks default. But all other defaults have a temporal aspect (dancing block, ants, mosquitos).

What are we doing there ? Photo or video ? You can have perfect (or awfull) stills but awfull (or good) video.

The last sample of Kwag is a perfect example of what I want to say. I'm sorry to say that but it was very bad !
(see my post in the other thread talking about ffvfw).

Krassi 02-04-2004 05:52 AM

Quote:

Originally Posted by Dialhot
Krassi have a perfect line, Inc have a "near constant" curve and mine is like the yellow line of Krassi snapshot !

Maybe the registry settings are damaged. Have you tried a reinstall? If i remember well you have already installed the latest build, right :?:

Dialhot 02-04-2004 06:00 AM

Quote:

Originally Posted by Krassi
if i remember well you have already installed the latest build, right :?:

Yes. And I will have to purge manually the register because I already uninstall/reinstall a lot with no real results. I was using ffdshow since months, that can be tied.

Note for Krassi: don't miss the ep. 10-11 tomorrow ;-)

rds_correia 02-04-2004 06:30 AM

Quote:

Originally Posted by Dialhot
CAN ANYONE TELL ME WHY ME Q CURVE ISN'T CONSTANT :?: :?:

Krassi have a perfect line, Inc have a "near constant" curve and mine is like the yellow line of Krassi snapshot !

Hi guys,
Sorry to say but I have the same problem that Phil has about the Q curve not being constant.
Mine is looking like krassi's yellow one too...
Anyway I am having very good encoding results with ffvfw's settings posted on the other
thread, apart from this Q curve prob.
Has anyone noticed that speed decreased since we changed to constant bitrate?
Maybe not much on some PCs but I went from 17 hours encoding to 22 hours
encoding a 115 minutes movie.
Yep my pc is needing new brains :oops:
I'll be seeing u guys tonight.


All times are GMT -5. The time now is 11:28 AM  —  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.