Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Video Encoding > MPEG-2 Encoding

Reply
 
Thread Tools Search this Thread Display Modes
Old 29th October 2008, 17:59   #1  |  Link
2Bdecided
Registered User
 
Join Date: Dec 2002
Location: UK
Posts: 1,673
HC one pass - bitrate too low?

I know HC doesn't do CBR, but can't I set the CQ value to something that means "really high quality", enable the max bitrate limit, so that it usually hits the maximum bitrate?

I've tried the obvious, and with a maximum bitrate of 8.5Mbps, any CQ value seems to give ~5Mbps!

What am I doing wrong?

Cheers,
David.
2Bdecided is offline   Reply With Quote
Old 29th October 2008, 18:42   #2  |  Link
MrC
AVStoDVD Dev
 
MrC's Avatar
 
Join Date: Apr 2006
Location: Italy
Posts: 1,302
Post all your HCenc settings, or the .ini file used, it will be more simple to suggest you "how to".



Bye
__________________
MrC

AVStoDVD Homepage
AVStoDVD @ Doom9 Forum
MrC is offline   Reply With Quote
Old 30th October 2008, 16:53   #3  |  Link
2Bdecided
Registered User
 
Join Date: Dec 2002
Location: UK
Posts: 1,673
Code:
*INFILE           g:\video\sf etc dvd\jydmms dvd.avs
*OUTFILE          G:\video\sf etc dvd\JYDMMS DVD.m2v
*MAXBITRATE       8500
*FRAMES           0 6838
*NOSMP
*AUTOGOP          15
*CQ_MAXBITRATE    1.000
*INTERLACED
*MATRIX           fox1
The bitrate goes a little higher with the default MPEG matrix.

Even on the most complex content, the bitrate doesn't max out.

Cheers,
David.
2Bdecided is offline   Reply With Quote
Old 30th October 2008, 19:08   #4  |  Link
MrC
AVStoDVD Dev
 
MrC's Avatar
 
Join Date: Apr 2006
Location: Italy
Posts: 1,302
You may try adding:

Code:
*BIAS 100
to limit the VBR span.

But if you want to be sure to stay at high bitrate you must use 2-pass VBR or use another encoder that support CBR (i.e. QuEnc).



Bye
__________________
MrC

AVStoDVD Homepage
AVStoDVD @ Doom9 Forum
MrC is offline   Reply With Quote
Old 31st October 2008, 11:52   #5  |  Link
2Bdecided
Registered User
 
Join Date: Dec 2002
Location: UK
Posts: 1,673
HCgui doesn't let you set the BIAS when encoding in one pass mode.


To be honest, I don't care if the bitrate falls during "easy to encode" sections - the problem is that in one pass mode the algorithm just fails - it lowers the bitrate and creates artefacts on "difficult to encode" sections - giving a lower bitrate than in two pass mode. This doesn't make any sense to me - in two pass mode, it has to bring the bitrate down to reach an average - in one pass mode, it doesn't - yet one pass mode gives a lower bitrate!

The thing is, to my eyes on my content, HCenc gives better quality at av=8Mbps, peak=8.5Mbps than QuEnc does with CBR=8.5Mbps. So I'd like to use HCenc, but the first pass seems a waste of time since I don't care about hitting an average bitrate.

Why doesn't one-pass mode work as I expect?

Cheers,
David.
2Bdecided is offline   Reply With Quote
Old 31st October 2008, 20:40   #6  |  Link
qyot27
...?
 
qyot27's Avatar
 
Join Date: Nov 2005
Location: Florida
Posts: 1,368
Just a shot in the dark here, but what about using PROFILE best? Even though I stick to Progressive and have the bitrate capped at 6000kbps in most cases, the artifacting is kept to a minimum. I also have AQ set to 1, and DC_PREC 9 (although upping it to 10 would probably be another boost). For complete reference, this is the ini I use for 16:9 23fps sources (the major difference between this and the 16:9 29fps profile is the absence of the PULLDOWN option):
Code:
*CQ_MAXBITRATE          1.000
*MAXBITRATE          6000
*NOSMP
*PROFILE          best
*ASPECT          16:9
*GOP              12 2
*AQ          1
*DC_PREC          9
*PROGRESSIVE
*CLOSEDGOPS
*PULLDOWN
*LASTIFRAME
*MPEGLEVEL        MP@ML
*MATRIX           mpeg
*WAIT             0
Additional note: I also mostly deal with anime encoding, rather than live action, so the dynamics of the images are indeed different, but generally speaking using the higher-precision options should result in more quality retention, at the expense of speed and bitrate (high or low, depending on what one is shooting for).

All of what I said of course based on the fact that the configuration that's posted doesn't list these values, so I can only assume they aren't being used.
qyot27 is offline   Reply With Quote
Old 2nd December 2008, 01:28   #7  |  Link
2Bdecided
Registered User
 
Join Date: Dec 2002
Location: UK
Posts: 1,673
Using "Profile Best" doesn't help at all.

Using Matrix: MPEG bumps the bitrate up compared with Fox1 (e.g. asking for 9Mbps gets 8Mbps with MPEG, but 6Mbps with Fox1) - however, the MPEG matrix at 8Mbps isn't as good quality as the Fox1 matrix at 8Mbps on the clip I'm testing.

It's a mystery.

I know it's abusing HC to want to do this, but it seems strange that it can manage to do it fairly well if you say it's VBR with the same average and max bitrate, but not if you say it's ABR with very high quality and the same max bitrate.

Cheers,
David.
2Bdecided is offline   Reply With Quote
Old 2nd December 2008, 12:26   #8  |  Link
Audionut
Registered User
 
Join Date: Nov 2003
Posts: 1,280
All things being equal, any of the fox matrices will require much more bitrate than mpeg.

You've got something really funky going on to be getting more bitrate at the same quantizer from mpeg.


Can you post a sample.

Look at your log for the fox1 encode. Find the average QP used and then use that as base line.
You could also try using some AQ and luminace gain.

Last edited by Audionut; 2nd December 2008 at 12:40.
Audionut is offline   Reply With Quote
Old 2nd December 2008, 15:22   #9  |  Link
2Bdecided
Registered User
 
Join Date: Dec 2002
Location: UK
Posts: 1,673
Hi Audionut,

Thanks for the suggestions.

Quote:
Originally Posted by Audionut View Post
Can you post a sample.
I could, but the problem doesn't seem to be content related - light or dark, letterboxed or full screen, fast motion or less motion (haven't done anything largely static yet).

Can you, or anyone, confirm what I'm seeing from the settings in post 3 of this thread? If I use exactly those, I get ~ 5.5Mbps; replace Fox1 with MPEG and I get ~7.5Mbps.

I know that shouldn't be normal, but it seems that when you choose settings that cause HCenc to bump up against the max bitrate almost all the time, it does something strange trying to stay within that max bitrate, and over compensates - i.e. the further over the max bitrate it was going to be, the further under the max bitrate it ends up.

In any case, I'll try picking an AQ that's more appropriate, as you suggested. That's a work around though, rather than a solution, and unless I'm going to check that for all content (so ruling out 1-pass encoding) it'll be guesswork getting close.

Cheers,
David.
2Bdecided is offline   Reply With Quote
Old 3rd December 2008, 01:31   #10  |  Link
Audionut
Registered User
 
Join Date: Nov 2003
Posts: 1,280
Quote:
Originally Posted by 2Bdecided View Post
That's a work around though, rather than a solution,
Then don't ask HC to do something it can't possibly do, like encode content with fox1 at QP1 and stay under a bitrate of 8500.

Depending on your content. Fast or slow motion, resolution etc, use a more sane QP or 2, 3 or even 4.
Audionut is offline   Reply With Quote
Old 4th December 2008, 13:32   #11  |  Link
2Bdecided
Registered User
 
Join Date: Dec 2002
Location: UK
Posts: 1,673
But every other encoder I know of, when it need more bits than it has available, uses the maximum available bitrate. This makes perfect sense.

Whereas HCenc appears to use a dramatically lower bitrate, without any good reason.

I'm very experienced with video, but I'm a beginner with HCenc, so I was hoping that someone more experience could either confirm this issue, or show me what I'm doing wrong.


I might be asking for "something it can't possibly do", where this is true for each and every frame in my content - but surely any AQ is asking for "something it can't possibly do" for at least some frames in most content. If it drops the bitrate far below the maximum in this case, it's still wrong.

So, does it?

Cheers,
David.
2Bdecided is offline   Reply With Quote
Old 5th December 2008, 12:53   #12  |  Link
Rumbah
Registered User
 
Join Date: Mar 2003
Posts: 478
Perhaps you are limited by the VBV. Try using the novbv switch but keep in mind that your result may not be DVD compliant.
Rumbah is offline   Reply With Quote
Old 5th December 2008, 14:47   #13  |  Link
smok3
brontosaurusrex
 
smok3's Avatar
 
Join Date: Oct 2001
Posts: 2,392
i have similar problems with quality mode (hc 022), say there is a simple passage followed by very complex one, the complex one will just crap out (lots of macroblocks).

Code:
*MAXBITRATE       8000
*PROFILE          best
*CQ_MAXBITRATE    5.000
*DC_PREC          8
*PROGRESSIVE
*MATRIX           mpeg
__________________
certain other member
smok3 is offline   Reply With Quote
Old 7th December 2008, 06:22   #14  |  Link
gizzin
Registered User
 
Join Date: Jun 2004
Posts: 324
smok3 if u dont use AQ, or lumi. Most likely the dark flat areas will be blocky, Also why use 1pass, doesn't make any sense, use 2pass and sacrifice the speed. Also at that bitrate you really shouldn't be getting any artifacting.

Last edited by gizzin; 7th December 2008 at 06:25.
gizzin is offline   Reply With Quote
Old 10th December 2008, 11:27   #15  |  Link
2Bdecided
Registered User
 
Join Date: Dec 2002
Location: UK
Posts: 1,673
Quote:
Originally Posted by Rumbah View Post
Perhaps you are limited by the VBV. Try using the novbv switch but keep in mind that your result may not be DVD compliant.
I want it to be DVD compliant. How could the VBV limit it to ~5Mbps for many seconds continuously?

Cheers,
David.
2Bdecided is offline   Reply With Quote
Old 10th December 2008, 14:14   #16  |  Link
Audionut
Registered User
 
Join Date: Nov 2003
Posts: 1,280
Quote:
Originally Posted by 2Bdecided View Post
How could the VBV limit it to ~5Mbps for many seconds continuously?
Because it's not perfect. Asking it to encode content with the fox matrix at qp1 and stay under 8500 kb/s is screwing it up. It's over compensating. Encode with a QP of 2 or 3 and enable luminance gain.


Or use 2 pass, it will save you alot of problems.
Audionut is offline   Reply With Quote
Old 11th December 2008, 13:25   #17  |  Link
2Bdecided
Registered User
 
Join Date: Dec 2002
Location: UK
Posts: 1,673
Quote:
Originally Posted by Audionut View Post
Because it's not perfect. Asking it to encode content with the fox matrix at qp1 and stay under 8500 kb/s is screwing it up. It's over compensating.
Sounds like a bug to me

I'll see if I can find a sweet spot for what I have, but the idea that the most challenging sections will get overcompensated for in bitrate reduction isn't exactly comforting.

Cheers,
David.
2Bdecided is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 18:03.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2022, vBulletin Solutions Inc.