nvenc h264 can't use gop=1
-strict -2 -hide_banner -threads 0 -hwaccel auto -i "D:_B_Footages\20250509LAW_DJI\DJI_20250430132123_0135_D.MP4" -r 60000/1001 -c:v h264_nvenc -b_ref_mode 0 -crf 23 -qp 23 -maxrate 50000k -bufsize 100000k -profile:v high -g 1 -map v:0 -c:a aac -ar 48k -b:a 256k -map a:0 -pix_fmt yuv420p -timecode "15:24:32;12" -sws_flags bicubic -movflags faststart -metadata creation_time="2025-05-22T03:21:45.517753700Z" -y "D:_B_Footages\20250509LAW_DJI\264\DJI_20250430132123_0135_D_x264.mp4"
[mov,mp4,m4a,3gp,3g2,mj2 @ 0000016a211e87c0] stream 0, timescale not set
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'D:_B_Footages\20250509LAW_DJI\DJI_20250430132123_0135_D.MP4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2mp41
creation_time : 2025-04-30T05:21:24.000000Z
encoder : DJI OsmoPocket3
timecode : 15:24:32;12
Duration: 00:05:10.66, start: 0.000000, bitrate: 56832 kb/s
Stream #0:00x1: Video: hevc (Main 10) (hvc1 / 0x31637668), yuv420p10le(tv, bt709), 2688x1512, 51431 kb/s, 59.94 fps, 59.94 tbr, 60k tbn (default)
Metadata:
creation_time : 2025-04-30T05:21:24.000000Z
handler_name : VideoHandler
vendor_id : [0][0][0][0]
timecode : 15:24:32;12
Stream #0:10x2: Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 317 kb/s (default)
Metadata:
creation_time : 2025-04-30T05:21:24.000000Z
handler_name : SoundHandler
vendor_id : [0][0][0][0]
Stream #0:20x3: Data: none (djmd / 0x646D6A64), 23 kb/s
Metadata:
creation_time : 2025-04-30T05:21:24.000000Z
handler_name : DJI meta
Stream #0:30x4: Data: none (dbgi / 0x69676264), 5027 kb/s
Metadata:
creation_time : 2025-04-30T05:21:24.000000Z
handler_name : DJI dbgi
Stream #0:40x6: Data: none (tmcd / 0x64636D74)
Metadata:
creation_time : 2025-04-30T05:21:24.000000Z
handler_name : TimeCodeHandler
timecode : 15:24:32;12
Stream #0:5[0x0]: Video: mjpeg (Baseline), yuvj420p(pc, bt470bg/unknown/unknown), 1280x720 [SAR 1:1 DAR 16:9], 90k tbr, 90k tbn (attached pic)
[vist#0:0/hevc @ 0000016a211e9e80] [dec:hevc @ 0000016a23a39a80] Using auto hwaccel type dxva2 with new default device.
[out#0/mp4 @ 0000016a211ea140] Codec AVOption crf (Select the quality for constant quality mode) has not been used for any stream. The most likely reason is either wrong type (e.g. a video option with no video streams) or that it is a private option of some decoder which was not actually used for any stream.
[out#0/mp4 @ 0000016a211ea140] Codec AVOption gop_timecode (MPEG GOP Timecode in hh:mm:ss[:;.]ff format. Overrides timecode_frame_start.) has not been used for any stream. The most likely reason is either wrong type (e.g. a video option with no video streams) or that it is a private option of some decoder which was not actually used for any stream.
Stream mapping:
Stream #0:0 -> #0:0 (hevc (native) -> h264 (h264_nvenc))
Stream #0:1 -> #0:1 (aac (native) -> aac (native))
Press [q] to stop, [?] for help
[h264_nvenc @ 0000016a23a39300] InitializeEncoder failed: invalid param (8): Gop Length should be greater than number of B frames + 1
[vost#0:0/h264_nvenc @ 0000016a211f0a80] [enc:h264_nvenc @ 0000016a2128d500] Error while opening encoder - maybe incorrect parameters such as bit_rate, rate, width or height.
[vf#0:0 @ 0000016a21289cc0] Error sending frames to consumers: Invalid argument
[vf#0:0 @ 0000016a21289cc0] Task finished with error code: -22 (Invalid argument)
[vf#0:0 @ 0000016a21289cc0] Terminating thread with return code -22 (Invalid argument)
[vost#0:0/h264_nvenc @ 0000016a211f0a80] [enc:h264_nvenc @ 0000016a2128d500] Could not open encoder before EOF
[vost#0:0/h264_nvenc @ 0000016a211f0a80] Task finished with error code: -22 (Invalid argument)
[vost#0:0/h264_nvenc @ 0000016a211f0a80] Terminating thread with return code -22 (Invalid argument)
[out#0/mp4 @ 0000016a211ea140] Nothing was written into output file, because at least one of its streams received no packets.
frame= 0 fps=0.0 q=0.0 Lsize= 0KiB time=N/A bitrate=N/A speed=N/A elapsed=0:00:00.18
[aac @ 0000016a23628c00] Qavg: 62039.188
Conversion failed!
I don't know it's limitation of nvenc or just something else.
I don't know too, but GOP 1 is possible via CPU.