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 > Announcements and Chat > General Discussion

Reply
 
Thread Tools Search this Thread Display Modes
Old 27th November 2018, 12:54   #1  |  Link
madloggan
Registered User
 
Join Date: Aug 2018
Posts: 5
constant quantizer for vp9

hey

how I can use constant quantizer mode on vp9
I know there is Constant Quantizer (Q) and you can select it by using --end-usage=q and -min-q=10 --max-q=10

so my question is this mode like the mode on x264 and the x265 range is from 0 to 51?

but when i trying to encode file with q = 10 on x264 or x265 i got bitrate range is from 150 mb/s to 200 mb/s but when I'm using vp9 with --end-usage=q and -min-q=10 --max-q=10 i got file with 23 mb/s how can this is possible ?


Codec: WebM Project VP9 Encoder v1.7.0



my command for x264 :

with qp mode :

x264 qp = 10

Quote:
x264 --frames 100 --profile high --preset medium -o x264_10.264 --input-csp i420 --output-csp i420 --input-depth 8 --output-depth 8 --input-res 1920x1080 --fps 50 --verbose --dump-yuv x264_10.yuv /home/siraj/Desktop/Project/Samples/1080p/ReadySteadyGo_1920x1080_120fps_420_8bit_YUV.yuv --qp=10
the output bitrate = 165813.47 kb/s

x265 qp = 10

Quote:
x265 -o hevc_3500.265 --output-depth 8 --input ReadySteadyGo_1920x1080_120fps_420_8bit_YUV.yuv --fps 50 --input-res 1920x1080 --input-depth 8 --input-csp 1 -P main -p medium --qp=10 --frames=100 --recon x265_40.yuv --recon-depth 8 --recon x265_50.yuv
the bitrate = 132423.19 kb/s

with crf mode :

x264 crf=20

Quote:
x264 --frames 100 --profile high --preset medium -o x264_10.264 --input-csp i420 --output-csp i420 --input-depth 8 --output-depth 8 --input-res 1920x1080 --fps 50 --verbose --dump-yuv x264_10.yuv /home/siraj/Desktop/Project/Samples/1080p/ReadySteadyGo_1920x1080_120fps_420_8bit_YUV.yuv --crf=20
bitrate = 8865.74 kb/s


x265 : crf = 20

Quote:
x265 -o hevc_3500.265 --output-depth 8 --input ReadySteadyGo_1920x1080_120fps_420_8bit_YUV.yuv --fps 50 --input-res 1920x1080 --input-depth 8 --input-csp 1 -P main -p medium --crf=20 --frames=100 --recon x265_40.yuv --recon-depth 8 --recon x265_50.yuv
bitrate = 6388.08 kb/s

--------------------------------------------------------------------------

for vp9

vp9 q mode = 10

Quote:
./vpxenc --output=ReadySteadyGo_1920x1080_120fps_420_8bitzzz. webm --codec=vp9 --passes=2 --good -v --i420 --width=1920 --height=1080 --profile=0 --fps=50000/1001 --auto-alt-ref=1 --input-bit-depth=8 --tile-columns=4 /home/siraj/Desktop/Project/Samples/1080p/ReadySteadyGo_1920x1080_120fps_420_8bit_YUV.yuv --bit-depth=8 --end-usage=q --limit=100 --min-q=30 --max-q=30 --threads=4 --cpu-used=4 Warning: Bad quantizer values. Quantizer values should not be equal, and should differ by at least 8.
1 encoder configuration warning(s). Continue? (y to continue) y
bitrate: 24089 kb/s





cq mode = 20

Quote:
./vpxenc --output=RrreadySteadyGo_1920x1080_120fps_420_8bit_. webm --codec=vp9 --passes=2 --good -v --i420 --width=1920 --height=1080 --profile=0 --fps=50000/1001 --input-bit-depth=8 /home/siraj/Desktop/Project/Samples/1080p/ReadySteadyGo_1920x1080_120fps_420_8bit_YUV.yuv --bit-depth=8 --end-usage=q --limit=100 --cq-level=20 --tile-columns=4 --threads=4 --cpu-used=4
bitrate = 15090 kb/s


when change end-usage to cq :
Quote:
./vpxenc --output=RrreadySteadyGo_1920x1080_120fps_420_8bit_. webm --codec=vp9 --passes=2 --good -v --i420 --width=1920 --height=1080 --profile=0 --fps=50000/1001 --input-bit-depth=8 /home/siraj/Desktop/Project/Samples/1080p/ReadySteadyGo_1920x1080_120fps_420_8bit_YUV.yuv --bit-depth=8 --end-usage=cq --limit=100 --cq-level=20 --tile-columns=4 --threads=4 --cpu-used=4
bitrate = 8865.74 kb/s

and if i set cq=24 bucz CQ(VP9)=((CRF(X264.X265)*63))/51
Quote:
./vpxenc --output=RrreadySteadyGo_1920x1080_120fps_420_8bit_. webm --codec=vp9 --passes=2 --good -v --i420 --width=1920 --height=1080 --profile=0 --fps=50000/1001 --input-bit-depth=8 /home/siraj/Desktop/Project/Samples/1080p/ReadySteadyGo_1920x1080_120fps_420_8bit_YUV.yuv --bit-depth=8 --end-usage=q --limit=100 --cq-level=24 --tile-columns=4 --threads=4 --cpu-used=4
bitrate = 12804 kb/s
madloggan is offline   Reply With Quote
Old 27th November 2018, 18:54   #2  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 5,867
What makes you thing there should be a formula that you can find a relation between quantization mappings between different formats.
Seems to me like assuming that there should be a correlation to between the length of a translated of a text into different languages (which use the same symbols when written down).
For x264 and x265 (different languages) which share lots of code (grammar&co) and are quite similar a loose correlation might exist, but looking at different formats this seems to have no logical base.
Looking at what quantization is, I see no reason that there should be a a relation like you are looking for,...

Also as a side note: Why use '--passes=2' when using constant quantizer with VP9 ? iirc constrained quality is a 1pass encoding mode,....

What makes you thing there should be a formula that you can find a relation between quantization mappings between different formats.
Seems to me like assuming that there should be a correlation to between the length of a translated of a text into different languages (which use the same symbols when written down).
For x264 and x265 (different languages) which share lots of code (grammar&co) and are quite similar a loose correlation might exist, but looking at different formats this seems to have no logical base.
Looking at what quantization is, I see no reason that there should be a a relation like you are looking for,...

Also as a side note: Why use '--passes=2' when using constant quantizer with VP9 ? iirc constrained quality is a 1pass encoding mode,....

Quote:
Constrained Quality Level:
CQ mode is a special variant of VBR. It is designed as a fire-and-forget mechanism for encoding a large set of clips such that, as much as possible, the output stays within given quality and size constraints across the set. CQ mode exposes an additional parameter (--cq-level), and the meaning of the --target-bitrate parameter changes to be the “target maximum rate”.
In CQ mode the encoder will try to encode normal frames (all frames apart from key frames, golden frames and alternative reference frames) at a quantizer / quality level of --cq-level, provided that this does not cause the bitrate to rise above the target maximum value.
since afaik crf calculation in x264 and x265 is similar but quite different from VP9s quality level I'm even more doubtful that your goal is achievable,..

-> wish you the best of luck
__________________
Hybrid here in the forum, homepage

Last edited by Selur; 27th November 2018 at 18:59.
Selur is offline   Reply With Quote
Old 27th November 2018, 21:29   #3  |  Link
foxyshadis
ангел смерти
 
foxyshadis's Avatar
 
Join Date: Nov 2004
Location: Lost
Posts: 9,413
VP9 has quantizers from 0-63 on a completely different scale from MPEG. I don't know why you'd expect them to be similar, since the whole point of VPx is to be the un-MPEG.
__________________
There are four boxes to be used in defense of liberty: soap, ballot, jury, and ammo. Please use in that order.
foxyshadis is offline   Reply With Quote
Old 28th November 2018, 11:49   #4  |  Link
madloggan
Registered User
 
Join Date: Aug 2018
Posts: 5
Re: constant quantizer for vp9

Quote:
Originally Posted by Selur View Post
What makes you thing there should be a formula that you can find a relation between quantization mappings between different formats.
Seems to me like assuming that there should be a correlation to between the length of a translated of a text into different languages (which use the same symbols when written down).
For x264 and x265 (different languages) which share lots of code (grammar&co) and are quite similar a loose correlation might exist, but looking at different formats this seems to have no logical base.
Looking at what quantization is, I see no reason that there should be a a relation like you are looking for,...

Also as a side note: Why use '--passes=2' when using constant quantizer with VP9 ? iirc constrained quality is a 1pass encoding mode,....

What makes you thing there should be a formula that you can find a relation between quantization mappings between different formats.
Seems to me like assuming that there should be a correlation to between the length of a translated of a text into different languages (which use the same symbols when written down).
For x264 and x265 (different languages) which share lots of code (grammar&co) and are quite similar a loose correlation might exist, but looking at different formats this seems to have no logical base.
Looking at what quantization is, I see no reason that there should be a a relation like you are looking for,...

Also as a side note: Why use '--passes=2' when using constant quantizer with VP9 ? iirc constrained quality is a 1pass encoding mode,....


since afaik crf calculation in x264 and x265 is similar but quite different from VP9s quality level I'm even more doubtful that your goal is achievable,..

-> wish you the best of luck
Thank you

Quote:
Also as a side note: Why use '--passes=2' when using constant quantizer with VP9? iirc constrained quality is a 1pass encoding mode,...
when I use 2-pass, the output bitrate = 29003 kb/s
with 1-pass, the output bitrate = bitrate: 59061 kb/s

why it is different? if the CQ is 1 pass encoding mod..
madloggan is offline   Reply With Quote
Old 28th November 2018, 11:50   #5  |  Link
madloggan
Registered User
 
Join Date: Aug 2018
Posts: 5
Re: constant quantizer for vp9

Quote:
Originally Posted by foxyshadis View Post
VP9 has quantizers from 0-63 on a completely different scale from MPEG. I don't know why you'd expect them to be similar, since the whole point of VPx is to be the un-MPEG.
Thank you for the detailed and informative answer
madloggan 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 23:47.


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