『漫游』酷论坛>『影音数码技术学习交流』>[求助]新B帧的2pass速度 ..
qyqgpower@2008-10-04 18:28
CLANNAD OP
full quality(ideal frame decision)
--pass 1 --bitrate 2065 --keyint 240 --min-keyint 24 --ref 10 --mixed-refs --no-fast-pskip --bframes 16 --b-adapt 2 --b-pyramid --b-rdo --bime --weightb --direct auto --subme 7 --trellis 2 --psy-rd 0.0:0 --partitions all --8x8dct --me tesa --merange 32 --threads 3 --thread-input --progress --no-dct-decimate --output NUL
x264 [info]: slice I:25 Avg QP:13.64 size: 17373 PSNR Mean Y:52.42 U:54.60 V:54.78 Avg:52.75 Global:51.30
x264 [info]: slice P:979 Avg QP:17.47 size: 16141 PSNR Mean Y:45.88 U:47.90 V:48.09 Avg:46.43 Global:44.71
x264 [info]: slice B:1149 Avg QP:18.97 size: 5754 PSNR Mean Y:45.43 U:47.69 V:47.92 Avg:46.03 Global:44.24
encoded 2153 frames, 1.37 fps, 2035.61 kb/s
old turbo->subme1
--pass 1 --bitrate 2065 --keyint 240 --min-keyint 24 --bframes 16 --b-adapt 2 --b-pyramid --direct auto --subme 1 --partitions none --me dia --threads 3 --thread-input --progress --no-dct-decimate --output NUL
x264 [info]: slice I:24 Avg QP:15.70 size: 17849 PSNR Mean Y:50.45 U:53.45 V:53.70 Avg:50.99 Global:48.41
x264 [info]: slice P:1081 Avg QP:19.43 size: 15963 PSNR Mean Y:43.73 U:46.68 V:46.86 Avg:44.47 Global:42.30
x264 [info]: slice B:1048 Avg QP:21.30 size: 4855 PSNR Mean Y:43.07 U:46.46 V:46.73 Avg:43.90 Global:41.70
encoded 2153 frames, 10.13 fps, 2028.89 kb/s
new turbo->subme2
--pass 1 --bitrate 2065 --keyint 240 --min-keyint 24 --bframes 16 --b-adapt 2 --b-pyramid --direct auto --subme 2 --partitions none --me dia --threads 3 --thread-input --progress --no-dct-decimate --output NUL
x264 [info]: slice I:26 Avg QP:14.79 size: 17604 PSNR Mean Y:51.37 U:54.08 V:54.31 Avg:51.85 Global:49.99
x264 [info]: slice P:1030 Avg QP:19.35 size: 16229 PSNR Mean Y:43.87 U:46.79 V:47.00 Avg:44.61 Global:42.45
x264 [info]: slice B:1097 Avg QP:21.00 size: 5163 PSNR Mean Y:43.38 U:46.62 V:46.89 Avg:44.18 Global:41.99
encoded 2153 frames, 7.96 fps, 2034.74 kb/s
normal subme6+hex
--pass 1 --bitrate 2065 --keyint 240 --min-keyint 24 --bframes 16 --b-adapt 2 --b-pyramid --direct auto --psy-rd 0.0:0 --partitions none --threads 3 --thread-input --progress --no-dct-decimate --output NUL
x264 [info]: slice I:27 Avg QP:14.56 size: 17692 PSNR Mean Y:51.48 U:54.17 V:54.40 Avg:51.97 Global:50.14
x264 [info]: slice P:991 Avg QP:19.16 size: 16147 PSNR Mean Y:44.13 U:47.07 V:47.27 Avg:44.88 Global:42.78
x264 [info]: slice B:1135 Avg QP:20.84 size: 5568 PSNR Mean Y:43.56 U:46.64 V:46.93 Avg:44.33 Global:42.17
encoded 2153 frames, 7.75 fps, 2031.30 kb/s
slower subme6+hex+bframe related options (near ideal decision)
--pass 1 --bitrate 2065 --keyint 240 --min-keyint 24 --bframes 16 --b-adapt 2 --b-pyramid --b-rdo --bime --weightb --direct auto --psy-rd 0.0:0 --partitions none --threads 3 --thread-input --progress --no-dct-decimate --output NUL
x264 [info]: slice I:27 Avg QP:14.40 size: 18063 PSNR Mean Y:51.63 U:54.20 V:54.45 Avg:52.11 Global:50.23
x264 [info]: slice P:979 Avg QP:19.16 size: 16824 PSNR Mean Y:44.12 U:46.97 V:47.16 Avg:44.85 Global:42.76
x264 [info]: slice B:1147 Avg QP:20.87 size: 5109 PSNR Mean Y:43.85 U:46.90 V:47.17 Avg:44.62 Global:42.48
encoded 2153 frames, 7.25 fps, 2032.98 kb/s
lower ME to dia (bad result)
--pass 1 --bitrate 2065 --keyint 240 --min-keyint 24 --bframes 16 --b-adapt 2 --b-pyramid --b-rdo --bime --weightb --direct auto --psy-rd 0.0:0 --partitions none --me dia --threads 3 --thread-input --sar 1:1 --progress --no-dct-decimate --output NUL
x264 [info]: slice I:26 Avg QP:14.52 size: 17864 PSNR Mean Y:51.61 U:54.17 V:54.41 Avg:52.08 Global:50.16
x264 [info]: slice P:1002 Avg QP:19.22 size: 16749 PSNR Mean Y:44.11 U:46.96 V:47.15 Avg:44.83 Global:42.72
x264 [info]: slice B:1125 Avg QP:20.90 size: 4950 PSNR Mean Y:43.81 U:46.91 V:47.15 Avg:44.59 Global:42.43
encoded 2153 frames, 7.42 fps, 2032.78 kb/s
rise to subme7+umh+no-fast-pskip, no change in frame decision
best result: subme6+hex+bframe related options for 1st pass.
subme1和subme2的区别是最大的(这次测试里不太明显,因为较短且片段内容比较特殊),因为前者使用SAD,2开始使用SATD,这也是为什么MeGUI的turbo将subme从1提升到了2。
但即使是subme2,精度仍旧与理想的有较大差距,所以我做了上面这些测试,得出的结论是subme6+hex+bframe related options。尽量提高精度的前提下不在1stpass中做更多无谓的运算(比如trellis,partitioning,ref什么的)
52wy@2008-10-04 18:33
能写几个中文注释吗=。=
zjhray@2008-10-04 19:36
还是等b-adapt 2支持多核后再折腾2pass吧
雷鸣@2008-10-04 19:56
感谢qyq大大的数据,这就去更新gui
SAPikachu@2008-10-04 20:27
搭车请教qyq大。。。用crf模式跑好1pass之后有没有必要再用码率模式跑一次--pass 3。。。?还是直接2pass就可以了。。。?
qyqgpower@2008-10-04 20:30
subme6+hex+bframe related options建议添加为HQ Turbo之类的名字。别把Turbo改成这个,最多和MeGUI保持一致subme2
b-adapt 2+较大bframe看起来似乎速度差距很小,但bframe较小时,subme2和这个设置速度可能会相差4,5倍,小心速度党发飙
qyqgpower@2008-10-04 20:34
引用
最初由 SAPikachu 发布
搭车请教qyq大。。。用crf模式跑好1pass之后有没有必要再用码率模式跑一次--pass 3。。。?还是直接2pass就可以了。。。?
直接2ndpass即可,2ndpass时会利用的东西其实不多:
frame decision
direct mvs
lowres lookahead mv(仅在指定VBV时)
之类的
雷鸣@2008-10-04 21:17
引用
最初由 qyqgpower 发布
subme6+hex+bframe related options建议添加为HQ Turbo之类的名字。别把Turbo改成这个,最多和MeGUI保持一致subme2
b-adapt 2+较大bframe看起来似乎速度差距很小,但bframe较小时,subme2和这个设置速度可能会相差4,5倍,小心速度党发飙
正常的改成这个了,turbo的基本和原来一样,最大-m 3
某种程度上可以认为我是速度党吧……不过我主要用single pass的
对于参数什么的也几乎没去研究,都是吃前辈们放出的一部分研究成果……
vempx@2008-10-05 05:41
闲着EP试了下用crf直接压制,crf做1pass然后用码率模式2pass压制,还有1pass和2pass都是码率模式压制这三个压制方法
我是看到楼上有同学说到crf完了还有没有必要2pass才有的这个想法,我想试试看到底有没有必要。片源是Clannad的OP,交叉264版本为megui更新998
参数如下
--crf 18 --level 4.1 --keyint 240 --min-keyint 24 --ref 8 --mixed-refs --no-fast-pskip --bframes 5 --b-adapt 2 --b-pyramid --weightb --subme 9 --trellis 2 --psy-rd 0.0:0 --partitions p8x8,b8x8,i4x4,i8x8 --8x8dct --me umh --merange 24 --threads 2 --thread-input --aq-mode 0 --progress --no-dct-decimate --no-psnr --no-ssim --output "bitrate_2pass" "test.avs" --sar 40:33 --stats "log.stats"
crf模式是建立在crf18基础上的,码率模式的码率使用crf18结束之后log中的最终码率
首先来看直接用crf18压制的log:
avis [info]: 704x480 @ 23.98 fps (2155 frames)
x264 [info]: using SAR=40/33
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 Cache64
mp4 [info]: initial delay 2002 (scale 24000)
x264 [info]: slice I:29 Avg QP:17.14 size: 8674
x264 [info]: slice P:966 Avg QP:19.66 size: 14535
x264 [info]: slice B:1160 Avg QP:21.24 size: 4483
x264 [info]: consecutive B-frames: 8.3% 44.4% 40.1% 3.6% 1.6% 2.0%
x264 [info]: mb I I16..4: 42.1% 49.8% 8.1%
x264 [info]: mb P I16..4: 12.5% 18.9% 3.6% P16..4: 30.4% 12.2% 8.5% 0.0% 0.0% skip:13.8%
x264 [info]: mb B I16..4: 2.2% 3.9% 0.4% B16..8: 33.5% 2.8% 3.3% direct: 6.5% skip:47.5% L0:43.0% L1:49.2% BI: 7.8%
x264 [info]: 8x8 transform intra:54.7% inter:65.9%
x264 [info]: ref P L0 61.1% 15.6% 8.9% 4.1% 3.3% 2.8% 2.6% 1.7%
x264 [info]: ref B L0 78.6% 9.6% 4.7% 2.4% 2.0% 1.8% 1.0%
x264 [info]: ref B L1 95.1% 4.9%
x264 [info]: kb/s:1734.9
encoded 2155 frames, 6.58 fps, 1735.01 kb/s
用crf18做1pass,之后码率2pass模式的log:
avis [info]: 704x480 @ 23.98 fps (2155 frames)
x264 [info]: using SAR=40/33
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 Cache64
mp4 [info]: initial delay 2002 (scale 24000)
x264 [info]: slice I:29 Avg QP:16.83 size: 8250
x264 [info]: slice P:966 Avg QP:19.74 size: 14582
x264 [info]: slice B:1160 Avg QP:21.15 size: 4498
x264 [info]: consecutive B-frames: 8.3% 44.4% 40.1% 3.6% 1.6% 2.0%
x264 [info]: mb I I16..4: 38.5% 54.5% 7.0%
x264 [info]: mb P I16..4: 13.2% 18.3% 3.5% P16..4: 29.8% 12.1% 8.6% 0.0% 0.0% skip:14.5%
x264 [info]: mb B I16..4: 2.4% 3.8% 0.4% B16..8: 33.4% 2.9% 3.4% direct: 6.6% skip:47.1% L0:43.8% L1:48.4% BI: 7.8%
x264 [info]: 8x8 transform intra:53.4% inter:66.0%
x264 [info]: ref P L0 60.4% 15.9% 9.1% 4.1% 3.3% 2.8% 2.6% 1.7%
x264 [info]: ref B L0 77.9% 9.8% 4.7% 2.6% 2.1% 1.8% 1.0%
x264 [info]: ref B L1 94.9% 5.1%
x264 [info]: kb/s:1739.4
encoded 2155 frames, 7.45 fps, 1739.56 kb/s
1pass和2pass都是用码率模式:
avis [info]: 704x480 @ 23.98 fps (2155 frames)
x264 [info]: using SAR=40/33
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 Cache64
x264 [info]: slice I:29 Avg QP:16.69 size: 8918
x264 [info]: slice P:966 Avg QP:19.75 size: 14399
x264 [info]: slice B:1160 Avg QP:20.94 size: 4651
x264 [info]: consecutive B-frames: 8.3% 44.4% 40.1% 3.6% 1.6% 2.0%
x264 [info]: mb I I16..4: 38.7% 53.2% 8.0%
x264 [info]: mb P I16..4: 12.2% 18.6% 3.8% P16..4: 29.6% 12.4% 8.6% 0.0% 0.0% skip:14.7%
x264 [info]: mb B I16..4: 2.6% 4.1% 0.4% B16..8: 34.1% 3.1% 3.5% direct: 7.1% skip:45.1% L0:44.1% L1:48.0% BI: 7.9%
x264 [info]: 8x8 transform intra:54.5% inter:62.8%
x264 [info]: ref P L0 59.8% 16.1% 9.1% 4.2% 3.3% 3.0% 2.7% 1.8%
x264 [info]: ref B L0 76.5% 10.5% 4.9% 2.8% 2.2% 2.0% 1.1%
x264 [info]: ref B L1 94.5% 5.5%
x264 [info]: kb/s:1741.2
encoded 2155 frames, 7.18 fps, 1741.37 kb/s
从数据上看,似乎相差并不是非常大,这么小的差别再用一次2pass花一倍的时间我觉得似乎不是很值得。
先去睡了……睡醒把压出来的成品下载补上来,有兴趣的同学研究下看看主观观感上有没有什么不同……
SAPikachu@2008-10-05 10:02
引用
最初由 qyqgpower 发布
直接2ndpass即可,2ndpass时会利用的东西其实不多:
frame decision
direct mvs
lowres lookahead mv(仅在指定VBV时)
之类的
感谢解答。。。
SAPikachu@2008-10-05 10:13
引用
最初由 vempx 发布
从数据上看,似乎相差并不是非常大,这么小的差别再用一次2pass花一倍的时间我觉得似乎不是很值得。
先去睡了……睡醒把压出来的成品下载补上来,有兴趣的同学研究下看看主观观感上有没有什么不同……
呃。。。用trellis和direct auto的话2pass 应该有用吧。。。?
qyqgpower@2008-10-05 11:47
crf 1stpass当然要用高速设置,就和bitrate 1stpass一样的道理,ratecontrol方程其实是一模一样的
vempx@2008-10-05 14:23
http://xianexs.mail.qq.com/cgi-bin/downloadfilepart/svrid238/compress_compare.rar?svrid=238&fid=cb5a400f48f9147eae8d757c596beadc753b51dbbb114842&&txf_fid=c9d75c0cb55345a25866007004e21321cf889ace&&txf_sid=
提取码 bc1bb846
话说,用crf2pass出来的log看起来和crf没有什么太大的区别……囧
vempx@2008-10-05 18:38
crf18的数据:
x264 [info]: slice I:29 Avg QP:17.14 size: 8674 PSNR Mean Y:52.91 U:55.86 V:57.35 Avg:53.52 Global:50.69
x264 [info]: slice P:966 Avg QP:19.66 size: 14535 PSNR Mean Y:46.61 U:48.76 V:48.89 Avg:47.17 Global:46.21
x264 [info]: slice B:1160 Avg QP:21.24 size: 4483 PSNR Mean Y:45.82 U:48.35 V:48.55 Avg:46.47 Global:45.44
x264 [info]: SSIM Mean Y:0.9875667
x264 [info]: PSNR Mean Y:46.271 U:48.635 V:48.822 Avg:46.879 Global:45.813 kb/s:
1734.89
crf18+2pass码率的数据:
x264 [info]: slice I:28 Avg QP:16.21 size: 9206 PSNR Mean Y:53.07 U:55.98 V:57.49 Avg:53.68 Global:50.55
x264 [info]: slice P:969 Avg QP:19.69 size: 14512 PSNR Mean Y:46.67 U:48.77 V:48.91 Avg:47.22 Global:46.29
x264 [info]: slice B:1158 Avg QP:21.10 size: 4502 PSNR Mean Y:45.89 U:48.35 V:48.56 Avg:46.53 Global:45.50
x264 [info]: SSIM Mean Y:0.9875803
x264 [info]: PSNR Mean Y:46.334 U:48.639 V:48.836 Avg:46.932 Global:45.880 kb/s:
1738.54
好像PSNR和SSIM都有不同程度的提升……
52wy@2008-10-05 22:28
引用
最初由 vempx 发布
crf18的数据:
x264 [info]: slice I:29 Avg QP:17.14 size: 8674 PSNR Mean Y:52.91 U:55.86 V:57.35 Avg:53.52 Global:50.69
x264 [info]: slice P:966 Avg QP:19.66 size: 14535 PSNR Mean Y:46.61 U:48.76 V:48.89 Avg:47.17 Global:46.21
x264 [info]: slice B:1160 Avg QP:21.24 size: 4483 PSNR Mean Y:45.82 U:48.35 V:48.55 Avg:46.47 Global:45.44
x264 [info]: SSIM Mean Y:0.9875667
x264 [info]: PSNR Mean Y:46.271 U:48.635 V:48.822 Avg:46.879 Global:45.813 kb/s:
1734.89
crf18+2pass码率的数据:
x264 [info]: slice I:28 Avg QP:16.21 size: 9206 PSNR Mean Y:53.07 U:55.98 V:57.49 Avg:53.68 Global:50.55
x264 [info]: slice P:969 Avg QP:19.69 size: 14512 PSNR Mean Y:46.67 U:48.77 V:48.91 Avg:47.22 Global:46.29
x264 [info]: slice B:1158 Avg QP:21.10 size: 4502 PSNR Mean Y:45.89 U:48.35 V:48.56 Avg:46.53 Global:45.50
x264 [info]: SSIM Mean Y:0.9875803
x264 [info]: PSNR Mean Y:46.334 U:48.639 V:48.836 Avg:46.932 Global:45.880 kb/s:
1738.54
好像PSNR和SSIM都有不同程度的提升……
2倍时间提升这么微弱=。=
«123»共3页
| TOP