digitalFAQ.com Forums [Archives]

digitalFAQ.com Forums [Archives] (http://www.digitalfaq.com/archives/)
-   Video Encoding and Conversion (http://www.digitalfaq.com/archives/encode/)
-   -   Mencoder: Quality based Encoding? (http://www.digitalfaq.com/archives/encode/9845-mencoder-quality-based.html)

Encoder Master 05-24-2004 03:37 PM

Quality based Encoding?
 
Hey guys,

I don't know so I ask. Is there a command-line option in Mencoder which encodes quality based like TMPGEnc's CQ-Mode?

THX, for helping. :wink:

Prodater64 05-24-2004 04:30 PM

Hi:
From MPlayerHQ
Quote:

vqscale=<1-31>
Constant quantizer / constant quality encoding (selects fixed quantizer mode). A lower value means better quality but larger files (default: 0 (dis- abled)). 1 is not recommended (see -vqmin for details).

vqmin=<1-31>
minimum quantizer (pass 1/2)
1
Not recommended (much larger file, little quality difference and weird side effects: msmpeg4, h263 will be very low quality, ratecontrol will be confused resulting in lower quality and some decoders will not be able to decode it).
2
Recommended for normal mpeg4/mpeg1video encoding (default).
3
Recommended for h263(p)/msmpeg4. The reason for preferring 3 over 2 is that 2 could lead to overflows (this will be fixed for h263(p) by changing the quantizer per MB in the future, msmpeg4 cannot be fixed as it does not support that).
It would be a command line with both options. In spite of "not recommended" advice in vqmin1, some ppl in forum think that it is the better value but another ppl just opposed. VM GUI use vqmin1.



--------------------------
Visit: Intermediate guide: MencodeMe/Win32 - Avisynth - MakeAvis by Prodater64.
Visit: KVCD - MencodeMe - Auxiliar Task - KVCD Docking Gate by Prodater64.
Visit: Mencoder scripting with AVSEdit and Guide for Multiple Files by Prodater64.
Visit: Mini-guide quick and easy - DVD to (S)KVCD with MencodeMe by Maurus.
Visit: Mencode-me: a newbie oriented GUI - 0.23 is out! by VMesquita.
--------------------------

Encoder Master 05-24-2004 04:33 PM

First thx predaotr but what means this: minimum quantizer (pass 1/2) Is it a 2 or 1 pass encode?

Which lines in a 1pass encode with packshot I have o delete and which I have to add? Only -vqscale=<1-31> ???

Prodater64 05-24-2004 05:01 PM

Quote:

Originally Posted by Encoder Master
First thx predaotr but what means this: minimum quantizer (pass 1/2) Is it a 2 or 1 pass encode?

Which lines in a 1pass encode with packshot I have o delete and which I have to add? Only -vqscale=<1-31> ???

It means that vqmin can be apply to both types of encodings.
Post here your packshot command line, and I will try to help you. (I don't working with packshot for now).
But I think that when Inc. see this thread, hi will answer you inmediatly.



--------------------------
Visit: Intermediate guide: MencodeMe/Win32 - Avisynth - MakeAvis by Prodater64.
Visit: KVCD - MencodeMe - Auxiliar Task - KVCD Docking Gate by Prodater64.
Visit: Mencoder scripting with AVSEdit and Guide for Multiple Files by Prodater64.
Visit: Mini-guide quick and easy - DVD to (S)KVCD with MencodeMe by Maurus.
Visit: Mencode-me: a newbie oriented GUI - 0.23 is out! by VMesquita.
--------------------------

incredible 05-25-2004 03:22 AM

Hands of in our cases of vqscale! Vqscale means a total linear quantizer!

a) Vqscale isn't that fine adjustable like vqmin and vbitrate etc. Vqscale 2 gives you a "constant" Q flatline at Q value 2 means in high bitrate scenes the Bitrate jumps up to sky and leaves "the orbit" (where 9800 would be still near earth ground ;-) )
b) if you go higher with vqscale, blocks even quicklier come out at dark low bitratescenes like underwater.

So conclusion: a constand Q resulted by Vqscale will give a total inefficient output for our needings. Its like CBR in a Bitrate (not Q) case.
If you look into Packshot commandline you see that there I do also use Vqmin=1 as its the result of many tests which gives the Q factor more room to "breath".

The manual of Mencoder is very informative but I dont trust every theoretic explanation there as "real world tests" and comaprisons do show sometimes different behaviours. Also mencoder is still in developing phase and i.E. there its mentioned how to apply vrc_minrate but as we found out, determining a min bitrate will end up in a bitrate allocation fiasco.

Encoder Master 05-25-2004 03:35 AM

Your're right. vqscale is constant linear but the quality is again better as 2-pass encoding. I've tested some Movies with a factor of 3 (~500Kbps) and it looks better than 2- or 1-pass VBR.

But in high resolution your're also right. The peaks are too high and you get some buffer underflomin. But this is one point: Why?

I have to set a max. Bitrate of 5000kbps and the bitrate goes over it. Can I realy do nothing?

Prodater64 05-25-2004 05:41 AM

What happens if you use vqscale together with vrc_maxrate?

In this order
Quote:

:vrc_maxrate:vqscale
or in the opposed
Quote:

:vqscale:vrc_maxrate

incredible 05-25-2004 06:03 AM

@ EM

That issue of Bitratedrops and over-peaks has been discussed in here many times. Do watch the "mencoder thread" ... its long but in case of someone who likes experimenting/tweaking its a "needed" reference as already many tests on special parameters are done.

As I said ... when using vqscale the thing gets totally out of control! Cause vqscale FORCES the Q curve!

@ Prodater

I already tried, ... but vqscale "forces" many factors and an added "vrc_maxrate/vrc_minrate/vbitrate" wont be respected anymore in a way we need to tweak it.

A linear quantizer scale is NOT the purpose of mpeg2.

As Im very much in my MenCalc, BitrateCalculator and Packshot at this moment I hadn't the time to test the parameter for Bias affecting in mencoder!
Maybe you could test it . And if that "roumor" would be really true, that tweaking the bias in mencoder does only affect bitrates in case of mpeg4 as someone said this a time ago in here. - So we have to figure out this.

Prodater64 05-25-2004 07:32 AM

Quote:

Originally Posted by incredible
@ Prodater
As Im very much in my MenCalc, BitrateCalculator and Packshot at this moment I hadn't the time to test the parameter for Bias affecting in mencoder!
Maybe you could test it . And if that "roumor" would be really true, that tweaking the bias in mencoder does only affect bitrates in case of mpeg4 as someone said this a time ago in here. - So we have to figure out this.

I want to test it but I don't know what Bias is. Can you explain me it? :oops:

incredible 05-25-2004 07:43 AM

Do look for a CCE explanantion, cause in CCE when the vdf file (log file of first pass) is build you can open that one and modify the bias etc.

There are many CCE guides on the web, which do explain that option in CCE and therefore what BIAS does in effective. As I for myself Only know "that it affects bitrate allocations".

Boulder 05-25-2004 08:19 AM

In CCE it simply means "lower bias value causes the encoding to be more like VBR, higher bias value means the encoding is closer to CBR". I found out that a bias of 10-15 resulted in slightly lower quantizers with CCE 2-pass and low bitrates (avg 1500-2500kbps)

I don't know how it is with MEncoder as the scale is quite weird, being from -256 to 256.

Abond 05-25-2004 08:21 AM

If I remember correctly from man_page
vrc_eq=tex
is constant quality encoding.

incredible 05-25-2004 08:27 AM

For testers:


- lavcopts

ibias=<-256-256>

intra quantizer bias (256 == 1.0)
mpeg style quantizer default: 96
h263 style quantizer default: 0
NOTE: The h263 MMX quantizer cannot handle positive biases (set vfdct=1or2), the mpeg MMX quantizer cannot handle negative biases (set vfdct=1or2).

pbias=<-256-256>

inter quantizer bias (256 == 1.0)
mpeg style quantizer default: 0
h263 style quantizer default: -64
NOTE: The h263 MMX quantizer cannot handle positive biases (set vfdct=1or2), the mpeg MMX quantizer cannot handle negative biases (set vfdct=1or2).
Tip: a more positive bias (-32 - -16 instead of -64) seems to improve the PSNR

Encoder Master 05-25-2004 12:48 PM

Quote:

What happens if you use vqscale together with vrc_maxrate?
Like inc. said. Too high although I have put there a max bitrate of 5000kbps. Now I got as peak 10000kbps but also with 2-pass in this case. 8O :(

Quote:

vrc_eq=tex
What about this option. Means it real CQ I only know "vqscale=<1-31>"?

Encoder Master 05-27-2004 05:51 PM

Now I've tested and the CQ (Constant Quality) Mode isn't recommended. At the same filesize compared with 2-pass encoding the picture of 2-pass has less blocks and is homogener.
And you have to forget 1-pass. :lol: :D :wink:


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