X264中B帧判定模式快速和优化差距到底体现在哪?
dwing吧
全部回复
仅看楼主
level 10
恶灵降世 楼主
RT
另,假定同一视频源压制,其他参数都相同,B帧方面用 优化并设8 或 用快速并设16 两种情况哪个成品效果更好一些?
2013年11月29日 15点11分 1
level 13
bframes和b-adapt和b-pyramid
B帧可以说是x264压制中压缩率最高的帧了(具体见附录1),所以提高B帧的压缩率对于提高整体压缩率很有帮助。
bframes就是最大B帧数,一般真人片再9在往上能囊括的不超过千分之5,动漫到12再往上能囊括的不超过千分之5。如果只要百分之1-2不能被囊括的话,真人片6,动画8。
后两个b-adapt和b-pyramid是用来提升B帧的压缩率的.
b-adapt(控制x264如何决定要放置P帧或B帧)2(最佳”算法)比1(“快速”算法)可以优秀很多,对于B帧很多的地方,效率同样的B帧数量下可以提升至少25%的压缩率(我使用GOSICK的NCED做测试bframes=8时间上多了25%-30%左右。)
b-pyramid(允许B帧作为其他帧的参照帧)也是一个有效提高压缩率的参数,允许B和p参考B帧获得更大的压缩率。strict如果你是为了保证那种茶USB的蓝光碟机能够播放就选择1强制支持标准。如果是一般高清播放机硬解就选normal,速度上影响不大(约5%左右),normal相对于strict提升也3-5%左右,性价比很高的参数。--------这是我从别人博客里面复制过来的,你可以参考下
2013年12月03日 01点12分 2
level 9
不知道这个25%~30%是怎么来的,crf不能作为判断质量相同的标准
2013年12月03日 01点12分 3
level 12
b-adapt本身对质量的影响没有那么大。adapt2速度会慢一些,精度会高一些,但是最后决定画质的还是其他的因素。插B帧,画质下降一点点,码率也下降一点点;插P,画质和码率都上升一点点。多插少插B帧不会对压缩率起很大的作用。
2013年12月03日 07点12分 4
adapt=2似乎码率下降5~6%。
2014年04月24日 01点04分
回复 bash99 :假定10000码率是个透明值,10000的百分之5也才500,所以好像也没有提升多大的压缩率。
2014年07月20日 11点07分
回复 bash99 :其实用1还是2更多是心理作用,实际上不要太注重参数是真理,还是用眼睛去看画质如何吧。
2014年07月20日 11点07分
level 8
个人经验,在压缩率上,--b-adapt 2 -b 3~5 优于 --b-adapt 1 -b 16,而且耗时没有增加太多
2014年04月24日 04点04分 6
我看矢车菊影音工作室和某些压制小组,都喜欢bframes=8到16,b_pyramid=2.b_adapt=1这样,我感觉这样在节约时间的性价比上还是可以的,更何况B帧也提升不了多大的压缩率,从压制人员这么用参数的想法可以看出。
2014年07月20日 11点07分
回复 轨迹爱好者 :我没见过有用b-adapt 1的压制组
2014年07月20日 12点07分
level 8
还是拿事实说话。【clannad op m2ts】
可以看到:
【2】尽管用了bframes16,但是b-adapt 1决策效率差,b帧总数仍然不如【1】的配置,也就是说同CRF下压缩率比不上【1】,【1】节约了约100k
bp
s,同时其的ssim表现略差于【2】。
【3】在【1】的基础上增加bframes到8,也就是我们通常压片的配置,此时的b帧总数更高,但压缩率的提升相比【1】非常有限(仅节约了15kbps,可能也与片源类型有关,OP的动态场景太多)。同时ssim略差于【1】,速度相比【1】下降了约1fps。
【1】
-r 5 -b 5 --b-adapt 2 --ssim --tune ssim
x264 [info]: frame I:22 Avg QP:19.78 size: 51139
x264 [info]: frame P:573 Avg QP:23.69 size: 12599
x264 [info]: frame B:1584 Avg QP:26.17 size: 4683
x264 [info]: consecutive B-frames: 4.5% 3.6% 9.8% 42.2% 17.7% 22.3%
x264 [info]: SSIM Mean Y:0.9867856 (18.790db)
encoded 2179 frames, 10.34 fps, 1387.47 kb/s, 15.03 MB
【2】
-r 5 -b 16 --b-adapt 1 --ssim --tune ssim
x264 [info]: frame I:39 Avg QP:20.51 size: 32714
x264 [info]: frame P:1184 Avg QP:24.57 size: 11227
x264 [info]: frame B:956 Avg QP:26.11 size: 2352
x264 [info]: consecutive B-frames: 36.7% 23.1% 2.8% 14.1% 6.9% 5.0% 4.2% 1.1% 0.4% 0.5% 0.5% 1.7% 0.0% 0.0% 0.0% 0.0%
x264 [info]: SSIM Mean Y:0.9871333 (18.905db)
encoded 2179 frames, 11.16 fps, 1480.43 kb/s, 16.04 MB
【3】
-r 5 -b 8 --b-adapt 2 --ssim --tune ssim
x264 [info]: frame I:17 Avg QP:19.81 size: 50406
x264 [info]: frame P:548 Avg QP:23.78 size: 13119
x264 [info]: frame B:1614 Avg QP:26.23 size: 4675
x264 [info]: consecutive B-frames: 4.2% 3.3% 9.8% 41.5% 13.1% 9.6% 3.9% 4.8% 9.9%
x264 [info]: SSIM Mean Y:0.9866538 (18.746db)
encoded 2179 frames, 9.088 fps, 1372.52 kb/s, 14.87 MB
2014年07月20日 12点07分 7
分辨率是 1080p → a720p
2014年07月20日 12点07分
回复 648433211 :看我下面帖的参数,用b_adapt=1的例子啊
2014年07月20日 13点07分
回复 648433211 :我觉得用B_adapt=1比较有性价比,时间快,即使2最佳算法比1也提升最多5%,假设10000码率,压缩率也就500.更何况平时压缩不会用这么高的码率,PT组和BT组例外。
2014年07月20日 13点07分
@阿拉斯加壮壮 x265默认就是2了,而且中档预设一起以上,都是用2
2014年07月20日 13点07分
level 13
【矢车菊影音工作室起风了,一般其他都是这样的参数】Video
ID : 1
Format : AVC
Format/Info : Advanced Video Codec
Format profile : High [email protected]
Format settings, CABAC : Yes
Format settings, ReFrames : 6 frames
Codec ID : V_MPEG4/ISO/AVC
Duration : 2h 6mn
Width : 1 920 pixels
Height : 1 036 pixels
Display aspect ratio : 1.85:1
Frame rate mode : Constant
Frame rate : 23.976 fps
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 10 bits
Scan type : Progressive
Writing library : x264 core 132 r2309+704+40 1360ac3 tMod [10-bit@all X86]
Encoding settings : cabac=1 / ref=6 / deblock=1:0:0 / analyse=0x3:0x133 / me=umh / subme=10 / psy=1 / fade_compensate=0.40 / psy_rd=0.75:0.00 / mixed_ref=1 / me_range=32 / chroma_me=1 / trellis=2 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=0 / chroma_qp_offset=-2 / threads=12 / lookahead_threads=1 / sliced_threads=0 / nr=0 / decimate=0 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / fgo=4 / bframes=8 / b_pyramid=2 / b_adapt=1 / b_bias=0 / direct=3 / weightb=1 / open_gop=0 / weightp=2 / keyint=250 / keyint_min=23 / scenecut=40 / intra_refresh=0 / rc_lookahead=40 / rc=crf / mbtree=1 / crf=20.0000 / qcomp=0.60 / qpmin=0 / qpmax=81 / qpstep=4 / ip_ratio=1.40 / aq=3:0.50 / aq-sensitivity=10.00 / aq-factor=1.00:1.00:1.00 / aq2=0 / aq3=0
【风车字幕组的鲁班三世VS柯南剧场版2013】
Video
ID : 1
Format : AVC
Format/Info : Advanced Video Codec
Format profile : High [email protected]
Format settings, CABAC : Yes
Format settings, ReFrames : 8 frames
Codec ID : V_MPEG4/ISO/AVC
Duration : 1h 47mn
Width : 1 920 pixels
Height : 1 080 pixels
Display aspect ratio : 16:9
Frame rate mode : Constant
Frame rate : 23.976 fps
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 10 bits
Scan type : Progressive
Writing library : x264 core 138 r2358 9e941d1
Encoding settings : cabac=1 / ref=8 / deblock=1:-1:-1 / analyse=0x3:0x133 / me=umh / subme=9 / psy=1 / psy_rd=0.40:0.00 / mixed_ref=1 / me_range=16 / chroma_me=1 / trellis=2 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=4 / threads=16 / lookahead_threads=1 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=16 / b_pyramid=2 / b_adapt=1 / b_bias=0 / direct=3 / weightb=1 / open_gop=0 / weightp=2 / keyint=240 / keyint_min=23 / scenecut=56 / intra_refresh=0 / rc_lookahead=41 / rc=crf / mbtree=0 / crf=23.0 / qcomp=1.00 / qpmin=10 / qpmax=51 / qpstep=4 / vbv_maxrate=24000 / vbv_bufsize=24000 / crf_max=0.0 / nal_hrd=none / ip_ratio=1.40 / pb_ratio=1.30 / aq=2:0.80
2014年07月20日 13点07分 8
level 11
BDRIP的速度瓶颈难道不在于AVS么...新番720p MP4的话注重速度用b_adapt=1可以理解,但BDRIP如果AVS卡线程的话x264可是用tesa 10也对速度没什么影响呐
2014年07月20日 13点07分 9
不一定,你可以同时干两个
2014年07月21日 08点07分
1