[FFmpeg-user] New ffmpeg NVEnc options and errors

hydra3333 at gmail.com hydra3333 at gmail.com
Thu Jul 2 13:19:03 EEST 2020


Hello,

I just cross-compiled ffmpeg about an hour ago to try out the new nvenc options, and received an error (see below).

It says "-rc:v vbr_hq" is an older older 2 Pass RC Mode, but doesn't indicate in the help (also see below) that is older nor which is newer and shoould be used.

There is also a clipped nearly-a-log message "Enable NV_ENC_RC_PARAMS::multiPass flag for two pass encoding a" which I don't as yet understand.

Any help on where to next would be greatly appreciated.

ffmpeg command:

"C:\SOFTWARE\ffmpeg\0-homebuilt-x64\ffmpeg.exe" -hide_banner -v verbose -nostats 
-init_hw_device opencl=ocl:0.0 -filter_hw_device ocl  
-i "D:\VRDTVS-SCRATCH\test.VRDTVS.qsf.mp4"  -vsync 0 
-sws_flags lanczos+accurate_rnd+full_chroma_int+full_chroma_inp 
-filter_complex "[0:v]yadif=0:0:0,hwupload,unsharp_opencl=lx=3:ly=3:la=0.5:cx=3:cy=3:ca=0.5,hwdownload,format=pix_fmts=yuv420p" 
-strict experimental 
-c:v h264_nvenc -pix_fmt nv12 
-preset p7 -multipass fullres 
-spatial-aq 1 -temporal-aq 1 -refs 3 -bf 2 -g 50 
-rc:v vbr_hq 
-rc-lookahead:v 32 -cq:v 0 -b:v 2592170 -minrate:v 518434 -maxrate:v 5184340 -bufsize 5184340 
-coder 1 -profile:v high -level 5.2 -movflags +faststart+write_colr  
-c:a libfdk_aac -cutoff 20000 -ab 384k -ar 48000 -y "T:\HDTV\VRDTVS-Converted\test.mp4"  

ffmpeg log:

Routing option strict to both codec and muxer layer
[AVHWDeviceContext @ 0000017cdfe62380] 0.0: NVIDIA CUDA / GeForce RTX 2060 SUPER
[AVHWDeviceContext @ 0000017cdfe62380] DXVA2 to OpenCL mapping function found (clCreateFromDX9MediaSurfaceKHR).
[AVHWDeviceContext @ 0000017cdfe62380] DXVA2 in OpenCL acquire function found (clEnqueueAcquireDX9MediaSurfacesKHR).
[AVHWDeviceContext @ 0000017cdfe62380] DXVA2 in OpenCL release function found (clEnqueueReleaseDX9MediaSurfacesKHR).
[AVHWDeviceContext @ 0000017cdfe62380] The cl_khr_d3d11_sharing extension is required for D3D11 to OpenCL mapping.
[AVHWDeviceContext @ 0000017cdfe62380] D3D11 to OpenCL mapping not usable.
[h264 @ 0000017cdfe67480] Reinit context to 1920x1088, pix_fmt: yuv420p
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'D:\VRDTVS-SCRATCH\test.VRDTVS.qsf.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : VideoReDo (Lavf58.29.100)
  Duration: 01:24:48.43, start: 0.280000, bitrate: 2618 kb/s
    Stream #0:0(und): Video: h264 (High), 1 reference frame (avc1 / 0x31637661), yuv420p(tv, left), 1920x1080 (1920x1088) [SAR 1:1 DAR 16:9], 2356 kb/s, 25 fps, 50 tbr, 90k tbn, 50 tbc (default)
    Metadata:
      handler_name    : VideoHandler
    Stream #0:1(eng): Audio: mp3 (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 256 kb/s (default)
    Metadata:
      handler_name    : SoundHandler
Stream mapping:
  Stream #0:0 (h264) -> yadif (graph 0)
  format (graph 0) -> Stream #0:0 (h264_nvenc)
  Stream #0:1 -> #0:1 (mp3 (mp3float) -> aac (libfdk_aac))
Press [q] to stop, [?] for help
[h264 @ 0000017cdfe613c0] Reinit context to 1920x1088, pix_fmt: yuv420p
[graph_1_in_0_1 @ 0000017cf3bf8c00] tb:1/48000 samplefmt:fltp samplerate:48000 chlayout:0x3
[format_out_0_1 @ 0000017cf3bf9c00] auto-inserting filter 'auto_resampler_0' between the filter 'Parsed_anull_0' and the filter 'format_out_0_1'
[auto_resampler_0 @ 0000017cf3bf8300] ch:2 chl:stereo fmt:fltp r:48000Hz -> ch:2 chl:stereo fmt:s16 r:48000Hz
[graph 0 input from stream 0:0 @ 0000017cf3bf8700] w:1920 h:1080 pixfmt:yuv420p tb:1/90000 fr:25/1 sar:1/1
[auto_scaler_0 @ 0000017cf3bf8400] w:iw h:ih flags:'bilinear' interl:0
[format @ 0000017cf3bf8000] auto-inserting filter 'auto_scaler_0' between the filter 'Parsed_format_4' and the filter 'format'
[auto_scaler_0 @ 0000017cf3bf8400] w:1920 h:1080 fmt:yuv420p sar:1/1 -> w:1920 h:1080 fmt:nv12 sar:1/1 flags:0x2
[h264_nvenc @ 0000017cdfe9cd80] Loaded Nvenc version 10.0
[h264_nvenc @ 0000017cdfe9cd80] Nvenc initialized successfully
[h264_nvenc @ 0000017cdfe9cd80] 1 CUDA capable devices found
[h264_nvenc @ 0000017cdfe9cd80] [ GPU #0 - < GeForce RTX 2060 SUPER > has Compute SM 7.5 ]
[h264_nvenc @ 0000017cdfe9cd80] supports NVENC
[h264_nvenc @ 0000017cdfe9cd80] AQ enabled.
[h264_nvenc @ 0000017cdfe9cd80] Temporal AQ enabled.
[h264_nvenc @ 0000017cdfe9cd80] Lookahead enabled: depth 32, scenecut enabled, B-adapt enabled.
[h264_nvenc @ 0000017cdfe9cd80] InitializeEncoder failed: invalid param (8): Presets P1 to P7 are not supported with older 2 Pass RC Modes(CBR_HQ, VBR_HQ) and cbr lowdelay.
Enable NV_ENC_RC_PARAMS::multiPass flag for two pass encoding a
[h264_nvenc @ 0000017cdfe9cd80] Nvenc unloaded
Error initializing output stream 0:0 -- Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
[AVIOContext @ 0000017cdfe6d6c0] Statistics: 0 seeks, 0 writeouts
[libfdk_aac @ 0000017cf3ad7180] 2 frames left in the queue on closing
[AVIOContext @ 0000017cdfe6ea00] Statistics: 3922241 bytes read, 0 seeks
Conversion failed!

Extract of "C:\SOFTWARE\ffmpeg\0-homebuilt-x64\ffmpeg.exe" -hide_banner -v debug -h encoder=h264_nvenc
  -rc                <int>        E..V...... Override the preset rate-control (from -1 to INT_MAX) (default -1)
     constqp         0            E..V...... Constant QP mode
     vbr             1            E..V...... Variable bitrate mode
     cbr             2            E..V...... Constant bitrate mode
     vbr_minqp       8388612      E..V...... Variable bitrate mode with MinQP (deprecated)
     ll_2pass_quality 8388616      E..V...... Multi-pass optimized for image quality (deprecated)
     ll_2pass_size   8388624      E..V...... Multi-pass optimized for constant frame size (deprecated)
     vbr_2pass       8388640      E..V...... Multi-pass variable bitrate mode (deprecated)
     cbr_ld_hq       8            E..V...... Constant bitrate low delay high quality mode
     cbr_hq          16           E..V...... Constant bitrate high quality mode
     vbr_hq          32           E..V...... Variable bitrate high quality mode




More information about the ffmpeg-user mailing list