Search code examples
ffmpeglibx265

FFmpeg: Multiple x265-params are not recognized


I'm using ffmpeg in x265 and I want to use multiple x265-params in one encoding.

When I use more than one parameter, ffmpeg does not recognize them.

My script is:

ffmpeg -s:v 1440x1080 -r 25 -i incident_10d_1440x1080_25.yuv -c:v rawvideo \
-pix_fmt yuv420p -c:v libx265 -x265-params "--qp=16:--preset=medium:--psnr" \
out_1440x1080_qp16.mp4

I set quantization parameter value equal to 16.

But my output in terminal contains the following:

x265 [info]: Main profile, Level-4 (Main tier)
x265 [info]: Thread pool created using 4 threads
x265 [info]: Slices                              : 1
x265 [info]: frame threads / pool features       : 2 / wpp(17 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 / subpel / merge         : hex / 57 / 2 / 2
x265 [info]: Keyframe min / max / scenecut / bias: 25 / 250 / 40 / 5.00
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-28.0 / 0.60

As can be seen I get Rate Control / qCompress : CRF-28.0 / 0.60.

The correct one must be x265 [info]: Rate Control : CQP-16.

When I have only this parameter in x265-params like -x265-params "--qp=16" it's working properly.


Solution

  • Apply the preset and tune outside:

    -preset medium -tune psnr -x265-params "qp=16:rc-lookahead=18"