digitalFAQ.com Forums [Archives]

digitalFAQ.com Forums [Archives] (http://www.digitalfaq.com/archives/)
-   Video Encoding and Conversion (http://www.digitalfaq.com/archives/encode/)
-   -   FFMPEG vs FFVFW vs Mencoder ? (http://www.digitalfaq.com/archives/encode/8159-ffmpeg-vs-ffvfw.html)

bilu 04-11-2004 06:44 AM

Quote:

Originally Posted by rds_correia
Is this the way it was meant to be?
Or is it just temporary until they fix ratecontrol?

Seems it's not temporary. So let's forget about minrate.

http://sourceforge.net/mailarchive/m...msg_id=6860343


Bilu

digitall.doc 04-12-2004 11:23 AM

I tried without minrate (already posted in your other thread). But I'm concerned about the minimum bitrate valleys we will get without a minrate limit...
I suppose you already tested with several minrate values, and always bad, isn't it?
BTW bilu, your last link to sourceforge maillist is not working. Could you sum up what was said there?

bilu 04-12-2004 12:18 PM

Quote:

From: Erik Slagter <erik@ol...>
Re: ffmpeg MPEG-2 encoder: subjective opinions?
2003-12-31 01:45

> > Like strict DVD compliant rate control ;-)
> > It still doesn't work if I set the min_rate to 1500, like it should
> > IMHO.
> where did it say thats needed? (and no i dont need a link to some dvd rip
> guides but some authorative docs instead or at least something writen by
> someone who had seen the real docs)
> the problem with minrate is simply that we dont know what it means, or more
> precissely the mpeg2 standard doesnt
> the input rate to the vbv buffer isnt clearly defined if theres a minrate>0
> but != maxrate
> for minrate=maxrate (CBR) its obvious, the vbv input is minrate=maxrate
> and for minrate=0 its clear too, the rate is maxrate until the buffer is full,
> then 0, thats what the standard says, but in the remaining cases the input
> rate isnt defined excect that its between minrate and maxrate, the problem is
> that the encoder MUST use the same rate as the decoder otherwise the whole
> ratecontrol (vbv) compliance wont work, maybe the rate can be freely choosen
> by the encoder but that would require some non trivial tricks on the decoder
> side to figure this rate out so it seems unlikely, anyway, is there some open
> source mpeg1/2 encoder around which supports minrate?

Thank you for your informative answer.

Intuition says the definition of min_rate and max_rate is obvious, but
apparently that's not the way the mpeg committee sees it.

I am pretty naive on this matter, but wouldn't it be possible to simply
have the encoder generate frames of ~ min_rate when the buffer is
getting full?
Bilu

digitall.doc 04-12-2004 01:12 PM

Thanx.
I see that it won't be just a problem in low bitrate encoded films with low maxrate. Any film, encoded with any vbitrate and maxrate value, can have an scene where bitrate can drop to virtually 0.
Don't know if it will be a problem... :?

bilu 04-12-2004 01:32 PM

What's strange is that if Michael is right, then there is no such thing as minrate in any DVD-compliant encoder. So how does CCE work? And TMPGEnc?

Could it be a muxing problem you had? :?


Bilu

rds_correia 04-12-2004 02:14 PM

No way bilu.
Either my players is a very crapy one or there really should exist a thing such as minrate.
Mine don't go below 200 and 100 respectively.
They are cheap things bought in the supermarket (out of $bucks$).
One (200Kbit) I don't even know the brand cause the brand-plate unglued and was probably swalowed by the
vacum cleaner and the other one is a Mustek V520 (100kbit).
I know I posted the nameless one's name in the past here at the forum.
I'm just not sure where...
Cheers

bilu 04-12-2004 03:25 PM

And can you set minrates in CCE and TMPGEnc ? 8O

Bilu

digitall.doc 04-12-2004 04:20 PM

bilu,
I don't know if I understand your question, but I think you already know the answer.
Yes, in both encoders, TMPGEnc and CCE, you can set a minimum bitrate value.
Anyway, Michael's question was:
Quote:

is there some open source mpeg1/2 encoder around which supports minrate?
and that's not the case of either encoders.

rds_correia 04-12-2004 04:29 PM

Okay,
I don't know what's on his mind when he (Michael) wrote that.
I'm assuming he's been FFmpeg's developer since the begining.
If so he must know why he created vrc_minrate flag, for sure :evil:
Unless it does come from libavcodec source code and so it comes with the "package".
Otherwise I'm stumped with what he wrote.
Anyway we've seen similar problems with FFvfw disregarding the maxrate flag...
I think libavcodec is great business but it's still a long way from becoming usable in our encodings.
Or maybe I'm just wrong, here.
Cheers

bilu 04-12-2004 05:02 PM

libavcodec has gained MPEG-2 encoding only in the latest versions, it has been mainly used for MPEG-4 encoding.

They probably don't know enough about VBV to implement minrate properly :?

Proposal: let's find out what TMPGEnc and mpeg2enc use and tell them ;)


Bilu

vmesquita 04-12-2004 05:26 PM

IF you check here:

There's nothing about a Min Rate... In fact I never heard of a min rate for DVD specs. :roll:

kwag 04-12-2004 05:53 PM

Quote:

Originally Posted by vmesquita
IF you check here:

Here: :?: Here :!: Where :?: :lol:
I think you forgot the link vmesquita :hihi:
You were probably refering to here: ;)
http://www.dvddemystified.com/dvdfaq.html

-kwag

bilu 04-13-2004 12:35 PM

I found a way to lower the quantizers on high-bitrates:

vfdct=1:ibias=-256:pbias=-256

you can replace vfdct=1 with 2 or 6, just not 3 (mmx) because it can't handle negative *bias values.

But then you have another problem: it doesn't work in high-contrast areas (anime and film) with the Notch matrix.

I found out that only vfdct=3 (mmx) works well with the notch matrix.
Tested both progressive and interlaced encodes.

And vfdct=3:ibias=0:pbias=0 is nowhere near as good as *bias=-256.
Quantizers lower a lot while it still keeps the average bitrate.

EDIT: Seems it only happens if lmin < 1.75 :)

EDIT2: Confirmed. And if you set lmin=1.75 the quantizer will never go below 2. But instead of getting max quant 28 in that stream I get max quant 7.28 without using lmax at all :)

EDIT3: lmin is not the problem, but vqmin. lmin=1:mbqmin=1:vqmin=2 works fine.

Bilu

vmesquita 04-13-2004 01:06 PM

Quote:

Originally Posted by kwag
I think you forgot the link vmesquita :hihi:
You were probably refering to here: ;)
http://www.dvddemystified.com/dvdfaq.html

Yes... I copied the link but never pasted. :lol: :lol: :lol: :lol:

digitall.doc 04-13-2004 04:29 PM

Quote:

Originally Posted by bilu
EDIT: Seems it only happens if lmin < 1.75 :)

EDIT2: Confirmed. And if you set lmin=1.75 the quantizer will never go below 2. But instead of getting max quant 28 in that stream I get max quant 7.28 without using lmax at all :)

EDIT3: lmin is not the problem, but vqmin. lmin=1:mbqmin=1:vqmin=2 works fine.

bilu,
Ok, quantizers go down, but how does it look?. Does it improve visually?.
And you say that "the problem" is solved when setting vqmin=2. Are you referring to the problem of mmx not handling negative *bias values, the problem of high-contrast areas with notch-matrix, or the problem of notch-matrix just working well with mmx?.

bilu 04-13-2004 06:44 PM

Quote:

Originally Posted by digitall.doc
Ok, quantizers go down, but how does it look?. Does it improve visually?.

It didn't improve, I was doing crap :?

But using vfdct=1:pbias=-256:ibias=144 I get similar size and quality to the notch matrix, without using the Notch matrix. :!:

And I could lower ibias down to 96 and quality still looked quite good at my eyes while filesize decreased from 10701 KB to 8825 KB while keeping the frame quantizer at 1 :!:

(means all happened at the MB quantizing level, not frame quantizing level)

My favorite is vfdct=1:pbias=-256:ibias=128, about 9873 KB.

Quote:

And you say that "the problem" is solved when setting vqmin=2. Are you referring to the problem of mmx not handling negative *bias values, the problem of high-contrast areas with notch-matrix, or the problem of notch-matrix just working well with mmx?.
high-contrast and other vfdct's than mmx.


Tested with dark underwater scene.

Bilu

incredible 04-14-2004 04:50 AM

Sorry friends that I was a time out of here but I was in Linux-newbie-configuration/installing tests-trouble :lol:

And I wanted to know How we can really trust on bitrateviewer!
So I did many many tests to see if the purpose how we do use Bitrateviewer to see/assume how the encoder does its Job.

I am totally confused, means I do not trust on the Q curve according to determine the encoders quality anymore!
As we didn saw the C curve logic in Bitrateviewer right. Its a diff. approach from WHERE the Bitrateviewer does take the Q informations and what they really do mean.

As you remember I already said a time ago "don't trust bitrateviewer" ... but I thought, well ... If Q peaks in my mencoder encodings also in theses frames blocks do occur.

The last days I took TmpgEnc, CCE 2.50 and CCE 2.6x and shurely mencoder .... to see how does the Q curve copy the "real" present quality of the encoding.

Conclusion :arrow: 8O

I used CCE 2.50 - "Notch" applied and for example two encodings done - one using "linear Quantizer Scale" and the other encoding "non linear Quantizer Scale" means checked off.

In both encodings when using CCE 2.50 the q-curve behaviour was a "dream" ... the result at linear quantizer scale was q=1 - in the whole stream, even when a AVG bitrate 2000kbit was choosen 8O
The other stream where non-linear quantizer was used a nice dynamical q curve using low q values 1-2.
(both CCE 2.50 encodings got the Notch .matrix values also afterwards applied using restream as this is needed! as CCE 2.50 does NOT apply matrixes to the encoded mpv (even you do encode using a diff. one) as default but the std. mpeg. matrix)

CCE 2.6x gave me an encode where the Q curve was much higher! approx. 3-4 and so I "though" ahhhh .... thats why they say CCE 2.50 even gives better output. ...... :arrow: wrong thought as by comparing these 3 encodings .... CCE 2.6x resultet even in less blocks! Although the Q values where much higher.
And that's what KIka from doom9.de/gleitz meant by saying this:
Quote:

Originally Posted by Kika
Because a high level means only that a block contained many same values after quantization, and which can mean also 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.

(Just translated by google.)

And mencoder .... ok as we know output was better.
I got many Buffer underflows in Mencoder BUT the bitratecurve on these parts didn't even went below 1000kbit 8O :evil:


Now .. I hope I get again into the mencoder settings as in here a lot is postet the last days and Vmesquitas Thread where mencoders internal filters are used looks VERY promising :)

digitall.doc 04-14-2004 05:37 AM

Quote:

Originally Posted by bilu
My favorite is vfdct=1:pbias=-256:ibias=128, about 9873 KB.

Your favorite with or without notch-matrix?. Because if you get similar results than without notch-matrix, why use it and drop notch-matrix?, is it faster?. And what's the result with *bias and notch-matrix altogether?.
I'll give it a look if I have the time (you'll see I've been very busy lately :roll: )

@inc,
what do you think we can use then (apart from everybody's eyes, but the "eye" method is very subjective, and difficult to compare through the net) to compare encoders?

bilu 04-14-2004 08:29 AM

Quote:

Originally Posted by digitall.doc
Your favorite with or without notch-matrix?. Because if you get similar results than without notch-matrix, why use it and drop notch-matrix?, is it faster?. And what's the result with *bias and notch-matrix altogether?.

vfdct=3 (mmx) is the only one that works with the notch matrix.
And vfdct doesn't work with *bias negative values.

*bias negative values lower frame quantizers.
Reducing ibias decreases quality, but reducing pbias doesn't seem to.

Negative *bias values with Notch matrix do strange negative blocks in high-contrast areas, but only if vqmin < 2.

My current command-line:

Quote:

BATCH
====
PAL: mencoder -include settings.ini -lavcopts keyint=15 movie.vob -o movie.m2v
NTSC: mencoder -include settings.ini -vf-pre softpulldown -lavcopts keyint=18 movie.vob -o movie.m2v

SETTINGS.INI
=========
of=rawvideo=1
ovc=lavc=1
nosound=1
noskip=1
vf=yuvcsp
lavcopts=vcodec=mpeg2video:vrc_buf_size=1835:preme =2:vstrict=-1
:vrc_maxrate=5000:vqblur=0:vrc_eq=tex:ildct=1:ilme =1:autoaspect=1
:vqmin=1:mbqmin=1:lmin=1:vbitrate=3000:pbias=-256:vfdct=1
As you can see I've limited maximum bitrate.
Since we can't control rc_buffer_aggressivity yet it currently overquantizes after the bitrate peaks. Using pbias=-256 and lowering max bitrate are the only way to fight it.


Bilu

digitall.doc 04-14-2004 10:52 AM

bilu,
as always, good job. I'm more dedicated now to 2 pass (did you try it?), but I keep an eye on your developments, always profitable for everybody :wink: .
I still don't know why do you prefer vfdct=1:pbias=-256 instead of keeping notch-matrix (if I understood well you get similar results).
And what about using vfdct=3:pbias=-256:vqmin=2 with notch-matrix?, how where the results?.
You say that it lower quantizers, in BitrateViewer I guess, but how does it look?, better?.

And finally, what is rc_buffer_aggressivity supposed to be doing (when it wrks properly :roll: )?.


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