Quantcast Mencoder: Quality Based Encoding? - digitalFAQ.com Forums [Archives]
  #1  
05-24-2004, 03:37 PM
Encoder Master Encoder Master is offline
Free Member
 
Join Date: Mar 2003
Location: (^_^)
Posts: 504
Thanks: 0
Thanked 0 Times in 0 Posts
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.
Reply With Quote
Someday, 12:01 PM
admin's Avatar
Site Staff / Ad Manager
 
Join Date: Dec 2002
Posts: 42
Thanks: ∞
Thanked 42 Times in 42 Posts
  #2  
05-24-2004, 04:30 PM
Prodater64 Prodater64 is offline
Free Member
 
Join Date: Mar 2003
Location: Palma de Mallorca - España
Posts: 2,925
Thanks: 0
Thanked 0 Times in 0 Posts
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.
--------------------------
Reply With Quote
  #3  
05-24-2004, 04:33 PM
Encoder Master Encoder Master is offline
Free Member
 
Join Date: Mar 2003
Location: (^_^)
Posts: 504
Thanks: 0
Thanked 0 Times in 0 Posts
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> ???
Reply With Quote
  #4  
05-24-2004, 05:01 PM
Prodater64 Prodater64 is offline
Free Member
 
Join Date: Mar 2003
Location: Palma de Mallorca - España
Posts: 2,925
Thanks: 0
Thanked 0 Times in 0 Posts
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.
--------------------------
Reply With Quote
  #5  
05-25-2004, 03:22 AM
incredible incredible is offline
Free Member
 
Join Date: May 2003
Location: Germany
Posts: 3,189
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to incredible
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.
Reply With Quote
  #6  
05-25-2004, 03:35 AM
Encoder Master Encoder Master is offline
Free Member
 
Join Date: Mar 2003
Location: (^_^)
Posts: 504
Thanks: 0
Thanked 0 Times in 0 Posts
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?
Reply With Quote
  #7  
05-25-2004, 05:41 AM
Prodater64 Prodater64 is offline
Free Member
 
Join Date: Mar 2003
Location: Palma de Mallorca - España
Posts: 2,925
Thanks: 0
Thanked 0 Times in 0 Posts
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
Reply With Quote
  #8  
05-25-2004, 06:03 AM
incredible incredible is offline
Free Member
 
Join Date: May 2003
Location: Germany
Posts: 3,189
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to incredible
@ 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.
Reply With Quote
  #9  
05-25-2004, 07:32 AM
Prodater64 Prodater64 is offline
Free Member
 
Join Date: Mar 2003
Location: Palma de Mallorca - España
Posts: 2,925
Thanks: 0
Thanked 0 Times in 0 Posts
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?
Reply With Quote
  #10  
05-25-2004, 07:43 AM
incredible incredible is offline
Free Member
 
Join Date: May 2003
Location: Germany
Posts: 3,189
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to incredible
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".
Reply With Quote
  #11  
05-25-2004, 08:19 AM
Boulder Boulder is offline
Free Member
 
Join Date: Sep 2002
Location: Lahti, Finland
Posts: 1,652
Thanks: 0
Thanked 0 Times in 0 Posts
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.
Reply With Quote
  #12  
05-25-2004, 08:21 AM
Abond Abond is offline
Free Member
 
Join Date: Mar 2003
Posts: 243
Thanks: 0
Thanked 0 Times in 0 Posts
If I remember correctly from man_page
vrc_eq=tex
is constant quality encoding.
Reply With Quote
  #13  
05-25-2004, 08:27 AM
incredible incredible is offline
Free Member
 
Join Date: May 2003
Location: Germany
Posts: 3,189
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to incredible
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
Reply With Quote
  #14  
05-25-2004, 12:48 PM
Encoder Master Encoder Master is offline
Free Member
 
Join Date: Mar 2003
Location: (^_^)
Posts: 504
Thanks: 0
Thanked 0 Times in 0 Posts
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.

Quote:
vrc_eq=tex
What about this option. Means it real CQ I only know "vqscale=<1-31>"?
Reply With Quote
  #15  
05-27-2004, 05:51 PM
Encoder Master Encoder Master is offline
Free Member
 
Join Date: Mar 2003
Location: (^_^)
Posts: 504
Thanks: 0
Thanked 0 Times in 0 Posts
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.
Reply With Quote
Reply




Similar Threads
Thread Thread Starter Forum Replies Last Post
DVD2SVCD: Encoding for better quality password Video Encoding and Conversion 6 07-03-2004 09:49 PM
Mencoder: Great picture quality, but grainy Dialhot Video Encoding and Conversion 14 05-31-2004 04:53 PM
Mencoder: MencoderMe mpeg1 quality results. Prodater64 Video Encoding and Conversion 29 05-09-2004 01:22 PM
Mencoder extra settings makes quality worse? Fluffbutt Video Encoding and Conversion 55 05-06-2004 09:26 AM
Mencoder: Mencoder two-pass encoding questions Prodater64 Video Encoding and Conversion 13 05-05-2004 03:33 PM

Thread Tools



 
All times are GMT -5. The time now is 02:11 PM  —  vBulletin © Jelsoft Enterprises Ltd