ffmpeg+H.265+CBR软编码如何实现?
请教群里的大牛,ffmpeg如何实现libx265的CBR模式软编码?我试了libx264使用-x264-params nal-hrd=cbr:force-cfr=1就可以实现CBR模式,但nal-hrd=cbr:force-cfr=1在libx265中不生效,请群里面的老师多指教,万分感谢!
Bitstream options:
--repeat-headers Emit SPS and PPS headers at each keyframe. Default disabled
--info Emit SEI identifying encoder and parameters. Default enabled
--hrd Enable HRD parameters signaling. Default disabled
--idr-recovery-sei Emit recovery point infor SEI at each IDR frame
--temporal-layers Enable a temporal sublayer for unreferenced B frames. Default disabled
--aud Emit access unit delimiters at the start of each access unit. Default disabled
--hash <integer> Decoded Picture Hash SEI 0: disabled, 1: MD5, 2: CRC, 3: Checksum. Default 0
--atc-sei <integer> Emit the alternative transfer characteristics SEI message where the integer is the preferred transfer characteristics. Default disabled
--pic-struct <integer> Set the picture structure and emits it in the picture timing SEI message. Values in the range 0..12. See D.3.3 of the HEVC spec. for a detailed explanation.
--log2-max-poc-lsb <integer>Maximum of the picture order count
--vui-timing-info Emit VUI timing information in the bistream. Default enabled
--vui-hrd-info Emit VUI HRD information in the bistream. Default enabled
--opt-qp-pps Dynamically optimize QP in PPS (instead of default 26) based on QPs in previous GOP. Default disabled
--opt-ref-list-length-ppsDynamically set L0 and L1 ref list length in PPS (instead of default 0) based on values in last GOP. Default disabled
--multi-pass-opt-rps Enable storing commonly used RPS in SPS in multi pass mode. Default disabled
--opt-cu-delta-qp Optimize to signal consistent CU level delta QPs in frame. Default disabled
看x265的帮助信息里面是这样的,会不会使用姿势变了? 本帖最后由 whitelxl 于 2022-7-5 14:15 编辑
x265里面是这样的参数形式-x265-params strict-cbr=1,我现在输出整片是CBR形式了,可是切片输出就成VBR了,请大师兄指教,谢谢。
ffmpeg -i 1.ts -b:v 4000k -muxrate 4000k -c:v libx265 -x265-params strict-cbr=1:vbv-maxrate=4000:vbv-bufsize=4000-c:a copy -t 20 -hls_time 10 out.m3u8
孙悟空 发表于 2022-7-4 16:00
Bitstream options:
--repeat-headers Emit SPS and PPS h ...
谢谢大师兄!
是的,x265里面是这样的参数形式-x265-params strict-cbr=1,我现在输出整片是CBR形式了,可是切片输出就成VBR了,请大师兄指教,谢谢。
我的命令如下:
ffmpeg -i 1.ts -b:v 4000k -muxrate 4000k -c:v libx265 -x265-params strict-cbr=1:vbv-maxrate=4000:vbv-bufsize=4000-c:a copy -t 20 -hls_time 10 out.m3u8 whitelxl 发表于 2022-7-5 14:14
谢谢大师兄!
是的,x265里面是这样的参数形式-x265-params strict-cbr=1,我现在输出整片是CBR形式了, ...
vbr的话,可能还是和压缩方式有关系,可以考虑控制vbv buffer. max rate 和min rate做到实际控制
页:
[1]