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 7th November 2018, 21:59   #1  |  Link
madloggan
Registered User
 
Join Date: Aug 2018
Posts: 5
some qustions about video encoders (HM,JM,AV1..)

English is not my mother tongue; please excuse any errors on my part

I have some questions I can't find a good answer on the internet

first for AVC JM Reference software :

1- why there is no other rate control beside CBR, I can't find any 2pass or crt option? did I forget something?

Code:
Code:
########################################################################################
#Rate control
########################################################################################

RateControlEnable       = 0     # 0 Disable, 1 Enable
Bitrate                 = 1000000 # Bitrate(bps)
InitialQP               = 0     # Initial Quantization Parameter for the first I frame
                                # InitialQp depends on two values: Bits Per Picture,
                                # and the GOP length
BasicUnit               = 0     # Number of MBs in the basic unit
                                # should be a fraction of the total number
                                # of MBs in a frame ("0" sets a BU equal to a frame)
ChannelType             = 0     # type of channel( 1=time varying channel; 0=Constant channel)
RCUpdateMode            = 2     # Rate Control type. Modes supported :
                                # 0 = original JM rate control,
                                # 1 = rate control that is applied to all frames regardless of the slice type,
                                # 2 = original plus intelligent QP selection for I and B slices (including Hierarchical),
                                # 3 = original + hybrid quadratic rate control for I and B slice using bit rate statistics
                                #
RCISliceBitRatio        = 1.0   # target ratio of bits for I-coded pictures compared to P-coded Pictures (for RCUpdateMode=3)
RCBSliceBitRatio0       = 0.5   # target ratio of bits for B-coded pictures compared to P-coded Pictures - temporal level 0 (for RCUpdateMode=3)
RCBSliceBitRatio1       = 0.25  # target ratio of bits for B-coded pictures compared to P-coded Pictures - temporal level 1 (for RCUpdateMode=3)
RCBSliceBitRatio2       = 0.25  # target ratio of bits for B-coded pictures compared to P-coded Pictures - temporal level 2 (for RCUpdateMode=3)
RCBSliceBitRatio3       = 0.25  # target ratio of bits for B-coded pictures compared to P-coded Pictures - temporal level 3 (for RCUpdateMode=3)
RCBSliceBitRatio4       = 0.25  # target ratio of bits for B-coded pictures compared to P-coded Pictures - temporal level 4 (for RCUpdateMode=3)
RCBoverPRatio           = 0.45  # ratio of bit rate usage of a B-coded picture over a P-coded picture for the SAME QP (for RCUpdateMode=3)
RCIoverPRatio           = 3.80  # ratio of bit rate usage of an I-coded picture over a P-coded picture for the SAME QP (for RCUpdateMode=3)
RCMinQPPSlice           =  8    # minimum P Slice QP value for rate control
RCMaxQPPSlice           = 42    # maximum P Slice QP value for rate control
RCMinQPBSlice           =  8    # minimum B Slice QP value for rate control
RCMaxQPBSlice           = 42    # maximum B Slice QP value for rate control
RCMinQPISlice           =  8    # minimum I Slice QP value for rate control
RCMaxQPISlice           = 42    # maximum I Slice QP value for rate control
RCMinQPSPSlice          =  8    # minimum SP Slice QP value for rate control
RCMaxQPSPSlice          = 40    # maximum SP Slice QP value for rate control
RCMinQPSISlice          =  8    # minimum SI Slice QP value for rate control
RCMaxQPSISlice          = 42    # maximum SI Slice QP value for rate control
RCMaxQPChange           =  4    # maximum QP change for frames of the base layer
2- is there any way to increase the speed of the encoder?

for x264 encoder :

1- I found that on the encoder help section is the QP range from 0 to 81? why it's not to 51 like hm,x265, jm?

Code:
Code:
Ratecontrol:

  -q, --qp <integer>          Force constant QP (0-81, 0=lossless)
  -B, --bitrate <integer>     Set bitrate (kbit/s)
      --crf <float>           Quality-based VBR (-12-51) [23.0]
      --rc-lookahead <integer> Number of frames for frametype lookahead [40]
      --vbv-maxrate <integer> Max local bitrate (kbit/s) [0]
      --vbv-bufsize <integer> Set size of the VBV buffer (kbit) [0]
      --vbv-init <float>      Initial VBV buffer occupancy [0.9]
      --crf-max <float>       With CRF+VBV, limit RF to this value
                                  May cause VBV underflows!
      --qpmin <integer>       Set min QP [0]
      --qpmax <integer>       Set max QP [2147483647]
      --qpstep <integer>      Set max QP step [4]
      --ratetol <float>       Tolerance of ABR ratecontrol and VBV [1.0]
      --ipratio <float>       QP factor between I and P [1.40]
      --pbratio <float>       QP factor between P and B [1.30]
      --chroma-qp-offset <integer>  QP difference between chroma and luma [0]
      --aq-mode <integer>     AQ method [1]
                                  - 0: Disabled
                                  - 1: Variance AQ (complexity mask)
                                  - 2: Auto-variance AQ
                                  - 3: Auto-variance AQ with bias to dark scenes
      --aq-strength <float>   Reduces blocking and blurring in flat and
                              textured areas. [1.0]
2- when I set the rate control to contact qp why it's not constant I mean when I set qp to 40 why its range from 37 to 44 not constant like other encoders? same for HEVC HM Reference software

Code:
Code:
siraj@RouterX:~/Desktop/Project/Samples/1080p$ x264 --profile main --preset placebo --input-csp i420  --output-csp i420  --input-depth 8  --output-depth 8 --input-res 1920x1080 --fps 50 --verbose /home/siraj/Desktop/Project/Samples/1080p/ReadySteadyGo_1920x1080_120fps_420_8bit_YUV.yuv --qp 40 --frames 100 --pass 1 -o NUL --stats 264.stats
yuv [info]: 1920x1080p 0:0 @ 50/1 fps (cfr)
x264 [debug]: using mv_range_thread = 40
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX
x264 [info]: profile Main, level 5.1
x264 [debug]: frame=   0 QP=37.00 NAL=3 Slice:I Poc:0   I:8160 P:0    SKIP:0    size=55240 bytes
.
.
x264 [debug]: frame=  99 QP=42.00 NAL=0 Slice:B Poc:196 I:1    P:1999 SKIP:6136 size=2725 bytes
x264 [info]: frame I:1     Avg QP:37.00  size: 55240
x264 [info]: frame P:24    Avg QP:40.00  size:  7936
x264 [info]: frame B:75    Avg QP:41.68  size:  2783
x264 [info]: consecutive B-frames:  1.0%  0.0% 15.0% 52.0% 20.0% 12.0%  0.0%  0.0%  0.0%  0.0%  0.0%  0.0%  0.0%  0.0%  0.0%  0.0%  0.0%
x264 [info]: mb I  I16..4: 53.5%  0.0% 46.5%
x264 [info]: mb P  I16..4:  1.7%  0.0%  0.8%  P16..4: 32.9%  2.5%  4.2%  0.0%  0.0%    skip:57.8%
x264 [info]: mb B  I16..4:  0.1%  0.0%  0.0%  B16..8: 24.9%  1.4%  0.2%  direct: 0.3%  skip:73.1%  L0:37.3% L1:61.9% BI: 0.8%
x264 [info]: direct mvs  spatial:90.7% temporal:9.3%
x264 [info]: coded y,uvDC,uvAC intra: 42.9% 39.3% 13.0% inter: 1.2% 1.3% 0.0%
x264 [info]: i16 v,h,dc,p: 62% 25%  5%  9%
x264 [info]: i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 30%  7% 15%  6%  8%  9%  7%  7% 10%
x264 [info]: i8c dc,h,v,p: 42% 27% 23%  8%
x264 [info]: Weighted P-Frames: Y:0.0% UV:0.0%
x264 [info]: ref P L0: 50.2% 24.3% 12.8%  2.5%  2.7%  1.8%  1.8%  0.5%  0.7%  0.5%  0.6%  0.4%  0.4%  0.3%  0.3%  0.2%
x264 [info]: ref B L0: 94.6%  2.8%  1.0%  0.4%  0.3%  0.3%  0.2%  0.1%  0.1%  0.1%  0.1%  0.1%  0.0%  0.0%  0.0%
x264 [info]: ref B L1: 99.1%  0.9%
x264 [info]: kb/s:1817.81

encoded 100 frames, 2.48 fps, 1817.81 kb/s
siraj@RouterX:~/Desktop/Project/Samples/1080p$  x264 --profile main --preset placebo -o avc_20.264 --input-csp i420  --output-csp i420  --input-depth 8  --output-depth 8 --input-res 1920x1080 --fps 50 --verbose /home/siraj/Desktop/Project/Samples/1080p/ReadySteadyGo_1920x1080_120fps_420_8bit_YUV.yuv --qp 40  --pass 2  --stats 264.stats --frames 100 --dump-yuv x264_40.yuv
yuv [info]: 1920x1080p 0:0 @ 50/1 fps (cfr)
x264 [debug]: using mv_range_thread = 40
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX
x264 [info]: profile Main, level 5.1
x264 [debug]: frame=   0 QP=37.00 NAL=3 Slice:I Poc:0   I:8160 P:0    SKIP:0    size=55240 bytes
.
.
x264 [debug]: frame=  99 QP=42.00 NAL=0 Slice:B Poc:196 I:1    P:2101 SKIP:6030 size=2887 bytes
x264 [info]: frame I:1     Avg QP:37.00  size: 55240
x264 [info]: frame P:24    Avg QP:40.00  size:  7961
x264 [info]: frame B:75    Avg QP:41.68  size:  2757
x264 [info]: consecutive B-frames:  1.0%  0.0% 15.0% 52.0% 20.0% 12.0%  0.0%  0.0%  0.0%  0.0%  0.0%  0.0%  0.0%  0.0%  0.0%  0.0%  0.0%
x264 [info]: mb I  I16..4: 53.5%  0.0% 46.5%
x264 [info]: mb P  I16..4:  1.7%  0.0%  0.8%  P16..4: 33.2%  2.6%  4.1%  0.0%  0.0%    skip:57.7%
x264 [info]: mb B  I16..4:  0.1%  0.0%  0.0%  B16..8: 23.8%  1.4%  0.2%  direct: 0.4%  skip:74.2%  L0:38.2% L1:61.0% BI: 0.8%
x264 [info]: direct mvs  spatial:96.0% temporal:4.0%
x264 [info]: coded y,uvDC,uvAC intra: 43.4% 39.7% 13.0% inter: 1.2% 1.3% 0.0%
x264 [info]: i16 v,h,dc,p: 62% 24%  5%  9%
x264 [info]: i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 30%  7% 16%  6%  8%  9%  7%  7% 10%
x264 [info]: i8c dc,h,v,p: 42% 27% 23%  8%
x264 [info]: Weighted P-Frames: Y:0.0% UV:0.0%
x264 [info]: ref P L0: 50.0% 23.4% 14.2%  3.0%  2.0%  2.4%  1.4%  0.6%  0.5%  0.4%  0.4%  0.4%  0.3%  0.3%  0.3%  0.1%
x264 [info]: ref B L0: 94.8%  2.6%  1.0%  0.4%  0.3%  0.2%  0.2%  0.1%  0.1%  0.1%  0.1%  0.1%  0.0%  0.0%  0.0%
x264 [info]: ref B L1: 99.3%  0.7%
x264 [info]: kb/s:1812.22

encoded 100 frames, 2.88 fps, 1812.22 kb/s
for vp9 :

1- is it good to use multithreading option, is there any drop of quality?



for av1 :

1- is there any way I can increase the speed of the encoder?

2- I cant build the re1v encoder, after making command this error appears:

Code:
Code:
siraj@RouterX:~/Desktop/Project/Samples/1080p$ x264 --profile main --preset placebo --input-csp i420  --output-csp i420  --input-depth 8  --output-depth 8 --input-res 1920x1080 --fps 50 --verbose /home/siraj/Desktop/Project/Samples/1080p/ReadySteadyGo_1920x1080_120fps_420_8bit_YUV.yuv --qp 40 --frames 100 --pass 1 -o NUL --stats 264.stats
yuv [info]: 1920x1080p 0:0 @ 50/1 fps (cfr)
x264 [debug]: using mv_range_thread = 40
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX
x264 [info]: profile Main, level 5.1
x264 [debug]: frame=   0 QP=37.00 NAL=3 Slice:I Poc:0   I:8160 P:0    SKIP:0    size=55240 bytes
x264 [debug]: frame=   1 QP=40.00 NAL=2 Slice:P Poc:12  I:156  P:2476 SKIP:5528 size=6763 bytes
x264 [debug]: frame=   2 QP=41.00 NAL=2 Slice:B Poc:6   I:22   P:1626 SKIP:6456 size=2804 bytes
.
.
x264 [debug]: frame=  99 QP=42.00 NAL=0 Slice:B Poc:196 I:1    P:1999 SKIP:6136 size=2725 bytes
x264 [info]: frame I:1     Avg QP:37.00  size: 55240
x264 [info]: frame P:24    Avg QP:40.00  size:  7936
x264 [info]: frame B:75    Avg QP:41.68  size:  2783
x264 [info]: consecutive B-frames:  1.0%  0.0% 15.0% 52.0% 20.0% 12.0%  0.0%  0.0%  0.0%  0.0%  0.0%  0.0%  0.0%  0.0%  0.0%  0.0%  0.0%
x264 [info]: mb I  I16..4: 53.5%  0.0% 46.5%
x264 [info]: mb P  I16..4:  1.7%  0.0%  0.8%  P16..4: 32.9%  2.5%  4.2%  0.0%  0.0%    skip:57.8%
x264 [info]: mb B  I16..4:  0.1%  0.0%  0.0%  B16..8: 24.9%  1.4%  0.2%  direct: 0.3%  skip:73.1%  L0:37.3% L1:61.9% BI: 0.8%
x264 [info]: direct mvs  spatial:90.7% temporal:9.3%
x264 [info]: coded y,uvDC,uvAC intra: 42.9% 39.3% 13.0% inter: 1.2% 1.3% 0.0%
x264 [info]: i16 v,h,dc,p: 62% 25%  5%  9%
x264 [info]: i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 30%  7% 15%  6%  8%  9%  7%  7% 10%
x264 [info]: i8c dc,h,v,p: 42% 27% 23%  8%
x264 [info]: Weighted P-Frames: Y:0.0% UV:0.0%
x264 [info]: ref P L0: 50.2% 24.3% 12.8%  2.5%  2.7%  1.8%  1.8%  0.5%  0.7%  0.5%  0.6%  0.4%  0.4%  0.3%  0.3%  0.2%
x264 [info]: ref B L0: 94.6%  2.8%  1.0%  0.4%  0.3%  0.3%  0.2%  0.1%  0.1%  0.1%  0.1%  0.1%  0.0%  0.0%  0.0%
x264 [info]: ref B L1: 99.1%  0.9%
x264 [info]: kb/s:1817.81

encoded 100 frames, 2.48 fps, 1817.81 kb/s
siraj@RouterX:~/Desktop/Project/Samples/1080p$  x264 --profile main --preset placebo -o avc_20.264 --input-csp i420  --output-csp i420  --input-depth 8  --output-depth 8 --input-res 1920x1080 --fps 50 --verbose /home/siraj/Desktop/Project/Samples/1080p/ReadySteadyGo_1920x1080_120fps_420_8bit_YUV.yuv --qp 40  --pass 2  --stats 264.stats --frames 100 --dump-yuv x264_40.yuv
yuv [info]: 1920x1080p 0:0 @ 50/1 fps (cfr)
x264 [debug]: using mv_range_thread = 40
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX
x264 [info]: profile Main, level 5.1
x264 [debug]: frame=   0 QP=37.00 NAL=3 Slice:I Poc:0   I:8160 P:0    SKIP:0    size=55240 bytes
x264 [debug]: frame=   1 QP=40.00 NAL=2 Slice:P Poc:12  I:164  P:2511 SKIP:5485 size=6834 bytes
.
.
x264 [debug]: frame=  99 QP=42.00 NAL=0 Slice:B Poc:196 I:1    P:2101 SKIP:6030 size=2887 bytes
x264 [info]: frame I:1     Avg QP:37.00  size: 55240
x264 [info]: frame P:24    Avg QP:40.00  size:  7961
x264 [info]: frame B:75    Avg QP:41.68  size:  2757
x264 [info]: consecutive B-frames:  1.0%  0.0% 15.0% 52.0% 20.0% 12.0%  0.0%  0.0%  0.0%  0.0%  0.0%  0.0%  0.0%  0.0%  0.0%  0.0%  0.0%
x264 [info]: mb I  I16..4: 53.5%  0.0% 46.5%
x264 [info]: mb P  I16..4:  1.7%  0.0%  0.8%  P16..4: 33.2%  2.6%  4.1%  0.0%  0.0%    skip:57.7%
x264 [info]: mb B  I16..4:  0.1%  0.0%  0.0%  B16..8: 23.8%  1.4%  0.2%  direct: 0.4%  skip:74.2%  L0:38.2% L1:61.0% BI: 0.8%
x264 [info]: direct mvs  spatial:96.0% temporal:4.0%
x264 [info]: coded y,uvDC,uvAC intra: 43.4% 39.7% 13.0% inter: 1.2% 1.3% 0.0%
x264 [info]: i16 v,h,dc,p: 62% 24%  5%  9%
x264 [info]: i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 30%  7% 16%  6%  8%  9%  7%  7% 10%
x264 [info]: i8c dc,h,v,p: 42% 27% 23%  8%
x264 [info]: Weighted P-Frames: Y:0.0% UV:0.0%
x264 [info]: ref P L0: 50.0% 23.4% 14.2%  3.0%  2.0%  2.4%  1.4%  0.6%  0.5%  0.4%  0.4%  0.4%  0.3%  0.3%  0.3%  0.1%
x264 [info]: ref B L0: 94.8%  2.6%  1.0%  0.4%  0.3%  0.2%  0.2%  0.1%  0.1%  0.1%  0.1%  0.1%  0.0%  0.0%  0.0%
x264 [info]: ref B L1: 99.3%  0.7%
x264 [info]: kb/s:1812.22
encoded 100 frames, 2.88 fps, 1812.22 kb/s

general questions :

1- I notice when I use constant bitrate option, the output bitrate it's not the same value I chose, its close to it but not exactly, is this normal?

2- what is the good ways to compare different encoders?


right now I'm comparing between encoders by doing this :

first using the slowest speed option for all encoders because the hm and jm encoders are really slow , so I'm using x 264 with placebo option and vp9 without any multithreading To make the process fair, then measure the output yuv file with vqmt tool to measure psnr,msse.... and other objective measurements, I know this measurement compare between frames so I use different tools like vmaf from Netflix to compare yuv file then record the vmat mean score for each encoder, also I'm using subjective measurement to compare between output files, also compare between the output bitrate for each bitstream .

the secont method i use the constant bitrate , trying to get the same bitrate for all encoder then using the same method above to measure

I know this comparing is not fair and the idea is weird to you, but I'm trying to comparing between encoders here if you know any good method I can try tell me
madloggan is offline   Reply With Quote
Old 17th November 2018, 06:44   #2  |  Link
foxyshadis
Angel of Night
 
foxyshadis's Avatar
 
Join Date: Nov 2004
Location: Tangled in the silks
Posts: 9,559
Quote:
Originally Posted by madloggan View Post
English is not my mother tongue; please excuse any errors on my part

I have some questions I can't find a good answer on the internet

first for AVC JM Reference software :

1- why there is no other rate control beside CBR, I can't find any 2pass or crt option? did I forget something?
Because JM is a proof of concept that encoding and decoding works, it's not very optimized for anything else.

Quote:
Originally Posted by madloggan View Post
2- is there any way to increase the speed of the encoder?
Other than the ME options, no.

Quote:
Originally Posted by madloggan View Post
for x264 encoder :

1- I found that on the encoder help section is the QP range from 0 to 81? why it's not to 51 like hm,x265, jm?
Because you're using the multi-bit version and that's what 12-bit maxes out at. Every 2 bits gives you 15 more stops on the QP train, and 8bit qp23 ~ 10bit qp38. If you try to use --output-bits 8 with --qp 81 though, you'll get an error because that's an illegal combination.

Quote:
Originally Posted by madloggan View Post
2- when I set the rate control to contact qp why it's not constant I mean when I set qp to 40 why its range from 37 to 44 not constant like other encoders? same for HEVC HM Reference software
Because you didn't turn off AQ or ipratio/pbratio. I don't know why you keep comparing things to HM, x264 has never had anything to do with HM.

Quote:
Originally Posted by madloggan View Post
for vp9 :

1- is it good to use multithreading option, is there any drop of quality?
Barely discernable or entirely unnoticeable, compared to the huge speedup.


Quote:
Originally Posted by madloggan View Post
for av1 :

1- is there any way I can increase the speed of the encoder?
Haha, no. All you can do is keep updating to the latest and choose the speed/quality tradeoff that works best for you. If you're using placebo like for x264, I pity your CPU.

Quote:
Originally Posted by madloggan View Post
2- I cant build the re1v encoder, after making command this error appears:
You just pasted in the text from the x264 code box above. I've never heard of a re1v encoder either. If you mean aomenc, it's a real pain, best to use pre-built binaries if you aren't familiar with build environments.

Quote:
Originally Posted by madloggan View Post
general questions :

1- I notice when I use constant bitrate option, the output bitrate it's not the same value I chose, its close to it but not exactly, is this normal?
Some encoders have better rate control than others. There is no perfect.

Quote:
Originally Posted by madloggan View Post
2- what is the good ways to compare different encoders?
This is way too complicated and there are dozens of encoder comparison threads here to guide you.
foxyshadis 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 14:11.


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