View Single Post
Old 17th April 2017, 15:09   #25  |  Link
hello_hello
Registered User
 
Join Date: Mar 2011
Posts: 4,823
Katie probably won't read this post, or pretend not to, because I think I'm one of the "other forum members" she refers to in her signature which means I'm on her ignore list so I can't learn from her reading my posts..... or however it works according to her signature...... but...
she probably should try what I did here and run a CQ2.0 single pass encode to see what the resulting bitrate will be, and whether it's in the same ballpark as the bitrate she's using for 2 pass encoding. Or she could at least run a compression test. I'd explain how to run one but I probably haven't got it wrong enough to learn how.... or however it works according to her signature..... but it's just guessing without any further details.

I played around a little more with the sample I'd been using for testing a couple of days ago, and this time Xvid wasn't overshooting the requested bitrate. After hunting through log files to see WTF, it turned out I somehow reset the overflow percentage. I don't remember doing that, but with it increased to 10% again today the target bitrate was almost exact.

Highlights from yesterday's log file:

Quote:
--[Information] [14/04/17 7:09:27 PM] Avisynth input script
--[Information] [14/04/17 7:09:27 PM] resolution: 960x396
--[Information] [14/04/17 7:09:27 PM] frame rate: 24000/1001
--[Information] [14/04/17 7:09:27 PM] aspect ratio: 80:33 (2.424)
--[Information] [14/04/17 7:09:27 PM] custom command line: -vbvsize 3145728 -vbvmax 4854000 -vbvpeak 2359296
--[Information] [14/04/17 7:09:27 PM] Job command line: "C:\Program Files\MeGUI\tools\xvid_encraw\xvid_encraw.exe" -i "D:\Test.avs" -o "D:\h263.m4v" -pass2 "D:\h263.stats" -bitrate 2000 -max_key_interval 240 -max_bframes 1 -bvhq -masking 2 -imin 1 -bmin 1 -pmin 1 -par 1 -vbvsize 3145728 -vbvmax 4854000 -vbvpeak 2359296
--[Information] [14/04/17 7:09:49 PM] Final statistics
---[Information] [14/04/17 7:09:49 PM] Video Bitrate Desired: 2000 kbit/s
---[Information] [14/04/17 7:09:49 PM] Video Bitrate Obtained (approximate): 2936 kbit/s
And today's:

Quote:
--[Information] [17/04/17 10:01:35 PM] Avisynth input script
--[Information] [17/04/17 10:01:35 PM] resolution: 960x396
--[Information] [17/04/17 10:01:35 PM] frame rate: 24000/1001
--[Information] [17/04/17 10:01:35 PM] aspect ratio: 80:33 (2.424)
--[Information] [17/04/17 10:01:35 PM] custom command line: -vbvsize 3145728 -vbvmax 4854000 -vbvpeak 2359296
--[Information] [17/04/17 10:01:35 PM] Job command line: "C:\Program Files\MeGUI\tools\xvid_encraw\xvid_encraw.exe" -i "D:\Test.avs" -o "D:\Test megui 2050.m4v" -pass2 "D:\Test megui 2050.stats" -bitrate 2050 -max_key_interval 240 -ostrength 10 -oimprove 10 -odegrade 10 -max_bframes 1 -bvhq -masking 2 -imin 1 -bmin 1 -pmin 1 -par 1 -vbvsize 3145728 -vbvmax 4854000 -vbvpeak 2359296
--[Information] [17/04/17 10:01:51 PM] Final statistics
---[Information] [17/04/17 10:01:51 PM] Video Bitrate Desired: 2050 kbit/s
---[Information] [17/04/17 10:01:51 PM] Video Bitrate Obtained (approximate): 2058 kbit/s
That's Xvid 1.3.4.

Out of curiosity, I tried the same encode using AutoGK and Xvid 1.2.1. AutoGK wasn't happy about the bitrate.

Quote:
[17/04/17 10:06:48 PM] Custom resolution settings: fixed width of 960 pixels
[17/04/17 10:06:48 PM] Standalone support enabled: ESS
[17/04/17 10:06:48 PM] Started encoding.
[17/04/17 10:06:48 PM] Source resolution: 960x396
[17/04/17 10:06:48 PM] Source fps: 23.976
[17/04/17 10:06:48 PM] Output will contain 1001 frames
[17/04/17 10:06:48 PM] Using VAQ in XviD
[17/04/17 10:06:48 PM] Overhead: 0 bytes (0.00 Mb)
[17/04/17 10:06:48 PM] Video size: 10,485,760 bytes (10.00 Mb)
[17/04/17 10:06:48 PM] Running compressibility test.
[17/04/17 10:06:48 PM] Writing the following script to D:\agk_tmp\test 2050_agk_comptest.avs
===========================================================
[17/04/17 10:07:10 PM] Duration was: 21 seconds
[17/04/17 10:07:10 PM] Speed was: 46.59 fps.
[17/04/17 10:07:10 PM] Compressibility percentage is: 191.70
[17/04/17 10:07:10 PM] Using sharper matrix
[17/04/17 10:07:10 PM] Switching b-frames off
[17/04/17 10:07:10 PM] Chosen resolution is: 960x400 ( AR: 2.40 )
[17/04/17 10:07:10 PM] Predicted comptest value is: 129.65%
[17/04/17 10:07:10 PM] Running first pass.
[17/04/17 10:07:10 PM] Writing the following script to D:\agk_tmp\test 2050_agk_movie.avs
===========================================================
[17/04/17 10:07:31 PM] Duration was: 20 seconds
[17/04/17 10:07:31 PM] Speed was: 47.70 fps.
[17/04/17 10:07:31 PM] Expected quality of first pass size: 133.54%
[17/04/17 10:07:31 PM] Trying to adjust settings.
[17/04/17 10:07:31 PM] No adjustment is possible
[17/04/17 10:07:31 PM] Warning: final AVI will likely be undersized.
[17/04/17 10:07:31 PM] Running second pass.
[17/04/17 10:07:52 PM] Duration was: 20 seconds
[17/04/17 10:07:52 PM] Speed was: 47.70 fps.
[17/04/17 10:07:52 PM] Job finished. Total time: 1 minute, 3 seconds
It lied about using the sharper (mpeg) matrix, probably because I have the most strict hardware compatibility setting enabled, but the resulting bitrate was 1438kbps, however visually it wasn't that far off the encode I ran at 2050kbps in respect to detail retention. Maybe about 95%, but the bitrate was about 600kbps less.

AutoGK doesn't set the min quantizer to 1. Instead, when the quality is high, it actually does this (for lower quality it might reduce the min and max to 2 and 4 respectively etc.)....
Would the following really force the same quantizer for all frames (assuming B-Frames were still enabled)?


Last edited by hello_hello; 17th April 2017 at 15:11.
hello_hello is offline   Reply With Quote