ffmpeg 和x265 压制测试10bit i444
dwing吧
全部回复
仅看楼主
level 6
埋寇爵神 楼主
用pr导入DNG序列,然后剪辑,导出cineform 12bit或者DNxHR 10bit 444 为1.mov
ffmpeg -i d:\1.mov -f rawvideo -pix_fmt yuv444p - | x26512 --input-res 1856x790 --input-csp i444 --input-depth 8 --fps 25 --crf 16 --asm avx512 --output 1.hevc -
结果是: --input-depth 是8的时候才正常,为10或12都是不正常。
若不加--input-depth 8,则
ffmpeg -i d:\1.mov -f rawvideo -pix_fmt yuv422p - | x26512 --input-res 1856x790 --input-csp i422 --fps 25 --crf 16 --asm avx512 --output 1.hevc -
这样,或者420才正常,444是不正常的。。
结论:这种pipe 的方式无法达到10bit或12bit压制,在rawvideo 时已经变为8bit了。 -pix_fmt yuv444p10le不成功的。
现在测试成功的方法:
ffmpeg -i 1.mov -vcodec libx265 -crf 19 -preset medium -x265-params "asm=avx512" 1.hevc
结果: 自动识别原来的444还是422或420,最高只能main10 444了。
Stream
#0:0 -> #
0:0 (cfhd (native) -> hevc (libx265))
Press [q] to stop, [?] for help
x265 [info]: HEVC encoder version 2.9+15-81373aab81df
x265 [info]: build info [Windows][GCC 8.2.1][64 bit] 10bit
x265 [info]: using cpu capabilities: MMX2 SSE2Fast LZCNT SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2 AVX512
x265 [info]: Main 4:4:4 10 profile, Level-4 (Main tier)
x265 [info]: Thread pool created using 16 threads
x265 [info]: Slices : 1
x265 [info]: frame threads / pool features : 4 / wpp(13 rows)
x265 [info]: Coding QT: max CU size, min CU size : 64 / 8
x265 [info]: Residual QT: max TU size, max depth : 32 / 1 inter / 1 intra
x265 [info]: ME / range / su
bp
el / merge : hex / 57 / 2 / 2
x265 [info]: Keyframe min / max / scenecut / bias: 25 / 250 / 40 / 5.00
x265 [info]: Cb/Cr QP Offset : 6 / 6
x265 [info]: Lookahead / bframes / badapt : 20 / 4 / 2
x265 [info]: b-pyramid / weightp / weightb : 1 / 1 / 0
x265 [info]: References / ref-limit cu / depth : 3 / on / on
x265 [info]: AQ: mode / str / qg-size / cu-tree : 1 / 1.0 / 32 / 1
x265 [info]: Rate Control / qCompress : CRF-19.0 / 0.60
x265 [info]: tools: rd=3 psy-rd=2.00 rskip signhide tmvp strong-intra-smoothing
x265 [info]: tools: lslices=5 deblock sao
Output #0, hevc, to '1.hevc':
2019年01月08日 13点01分 1
level 6
埋寇爵神 楼主

General
Unique ID : 11672749074982
15102143661
73010601042918 (0x57D0E5A045F73A7FD1213A15CC8DE3E6)
Complete name : D:\1.mkv
Format : Matroska
Format version : Version 4
File size : 125 MiB
Duration : 4 min 31 s
Overall bit rate mode : Variable
Overall bit rate : 3 857 kb/s
Encoded date : UTC 2019-01-08 13:34:17
Writing application : mkvmerge v29.0.0 ('Like It Or Not') 64-bit
Writing library : libebml v1.3.6 + libmatroska v1.4.9
Video
ID : 1
Format : HEVC
Format/Info : High Efficiency Video Coding
Format profile : @L4@Main
Codec ID : V_MPEGH/ISO/HEVC
Duration : 4 min 31 s
Bit rate : 3 732 kb/s
Width : 1 856 pixels
Height : 790 pixels
Display aspect ratio : 2.35:1
Frame rate mode : Constant
Frame rate : 25.000 FPS
Color space : RGB
Bit depth : 10 bits
Bits/(Pixel*Frame) : 0.102
Stream size : 121 MiB (97%)
Writing library : x265 2.9+15-81373aab81df:[Windows][GCC 8.2.1][64 bit] 10bit
Encoding settings : cpuid=1176575 / frame-threads=4 / numa-pools=16 / wpp / no-pmode / no-pme / no-psnr / no-ssim / log-level=2 / input-csp=3 / input-res=1856x790 / interlace=0 / total-frames=0 / level-idc=0 / high-tier=1 / uhd-bd=0 / ref=3 / no-allow-non-conformance / repeat-headers / annexb / no-aud / no-hrd / info / hash=0 / no-temporal-layers / open-gop / min-keyint=25 / keyint=250 / gop-lookahead=0 / bframes=4 / b-adapt=2 / b-pyramid / bframe-bias=0 / rc-lookahead=20 / lookahead-slices=5 / scenecut=40 / radl=0 / no-splice / no-intra-refresh / ctu=64 / min-cu-size=8 / no-rect / no-amp / max-tu-size=32 / tu-inter-depth=1 / tu-intra-depth=1 / limit-tu=0 / rdoq-level=0 / dynamic-rd=0.00 / no-ssim-rd / signhide / no-tskip / nr-intra=0 / nr-inter=0 / no-constrained-intra / strong-intra-smoothing / max-merge=2 / limit-refs=3 / no-limit-modes / me=1 / subme=2 / merange=57 / temporal-mvp / weightp / no-weightb / no-analyze-src-pics / deblock=0:0 / sao / no-sao-non-deblock / rd=3 / no-early-skip / rskip / no-fast-intra / no-tskip-fast / no-cu-lossless / no-b-intra / no-splitrd-skip / rdpenalty=0 / psy-rd=2.00 / psy-rdoq=0.00 / no-rd-refine / no-lossless / cbqpoffs=6 / crqpoffs=6 / rc=crf / crf=19.0 / qcomp=0.60 / qpstep=4 / stats-write=0 / stats-read=0 / ipratio=1.40 / pbratio=1.30 / aq-mode=1 / aq-strength=1.00 / cutree / zone-count=0 / no-strict-cbr / qg-size=32 / no-rc-grain / qpmax=69 / qpmin=0 / no-const-vbv / sar=1 / overscan=0 / videoformat=5 / range=0 / colorprim=2 / transfer=2 / colormatrix=0 / chromaloc=0 / display-window=0 / max-cll=0,0 / min-luma=0 / max-luma=1023 / log2-max-poc-lsb=8 / vui-timing-info / vui-hrd-info / slices=1 / no-opt-qp-pps / no-opt-ref-list-length-pps / no-multi-pass-opt-rps / scenecut-bias=0.05 / no-opt-cu-delta-qp / no-aq-motion / no-hdr / no-hdr-opt / no-dhdr10-opt / no-idr-recovery-sei / analysis-reuse-level=5 / scale-factor=0 / refine-intra=0 / refine-inter=0 / refine-mv=0 / no-limit-sao / ctu-info=0 / no-lowpass-dct / refine-mv-type=0 / copy-pic=1 / max-ausize-factor=1.0 / no-dynamic-refine / no-single-sei
Default : Yes
Forced : No
Color range : Limited
Matrix coefficients : Identity
Audio
ID : 2
Format : Vorbis
Codec ID : A_VORBIS
Duration : 4 min 31 s
Bit rate mode : Variable
Bit rate : 123 kb/s
Channel(s) : 2 channels
Sampling rate : 48.0 kHz
Frame rate : 46.877 FPS (1024 SPF)
Compression mode : Lossy
Stream size : 3.97 MiB (3%)
Default : Yes
Forced : No
2019年01月08日 13点01分 2
吧务
level 14
为什么不y4m[阴险]
2019年01月08日 15点01分 3
吧务
level 14
因为yuv444p是8b,yuv444p12le才是12b[阴险]
2019年01月08日 15点01分 4
不会呀。yuv444p加了12le之后就报错了。
2019年01月09日 02点01分
吧务
level 14
ffmpeg -i src -f yuv4mpegpipe -strict -1 - | x265 --y4m
2019年01月08日 15点01分 5
原来如此。之前一直用rawvideo太辛苦了。谢谢。
2019年01月09日 02点01分
谢谢。原来如此。之前一直用rawvideo太辛苦了。这个要指定 --input-res吗?
2019年01月09日 02点01分
@埋寇爵神 只要一个--y4m就够了
2019年01月09日 02点01分
ffmpeg -i 1.mov -f yuv4mpegpipe -strict -1 -pix_fmt yuv444p12le - | x26512 --y4m --crf 16 --asm avx512 --output 1.hevc - [yuv4mpegpipe @ 0000026e14d61780] Warning: generating non standard YUV stream. Mjpegtools will not work. 转出来是花屏的,很多紫色。
2019年01月09日 02点01分
level 7
楼上正解
2019年01月08日 19点01分 6
谢谢。
2019年01月09日 02点01分
level 6
埋寇爵神 楼主

[无效] https://pan.baidu.com/s/1jyQUDs_PHE-4EAoT3aT3Gw 测试视频1.mov DNG 序列用pr导出
2019年01月09日 02点01分 7
有兴趣可以下载来压制一下 目前我只能压制为10bit 444,还无法做到12bit 444
2019年01月09日 02点01分
level 6
埋寇爵神 楼主
应该可以x265 12bit 444了。谢谢大家。
命令行: ffmpeg -i 1.mov -f yuv4mpegpipe -strict -1 - | x26512 --y4m --crf 16 --asm avx512 --output 1.mp4 -
原编码是ProRes 444XQ 码率256M,是yuv444p12le potplayer显示 輸入格式ap4x 24bit ------成功。
cineform 12bit444 是gbrap12le 码率208M, potplayer显示輸入格式RGB 32bit ------命令行提示要指定-pix_fmt
无法识别gbrap12le这种带alpha的吧。
2019年01月09日 05点01分 8
1