NVEnc icon indicating copy to clipboard operation
NVEnc copied to clipboard

--check-avdevices how to use with capture card?

Open Usulyre opened this issue 10 months ago • 9 comments

Hi, when I use this command "NVEncC64.exe --check-avdevices" i get this:

input devices: V dshow V gdigrab V lavfi V vfwcap A lavfi

output devices:

How do I use a capture card with the above if it is at all possible?

Usulyre avatar Mar 21 '25 00:03 Usulyre

You can use by --input-format dshow -i video="Capture Card Name", where "Capture Card Name" shall be replaced to the name which can be shown as the device name in OBS.

However, if it actually works depends on the pixel format used by the capture card, not all pixel formats are supported in NVEncC.

rigaya avatar Mar 23 '25 09:03 rigaya

You can use by --input-format dshow -i video="Capture Card Name", where "Capture Card Name" shall be replaced to the name which can be shown as the device name in OBS.

However, if it actually works depends on the pixel format used by the capture card, not all pixel formats are supported in NVEncC.

Thanks for your reply.

Is there a way to set options for the pixel format of the capture card, resolution, etc., with NVEnc?

Are options like ffmpeg "rtbufsize" able to be set with NVEnc ?

Usulyre avatar Mar 23 '25 21:03 Usulyre

Currently --input-option rtbufsize:1500000 --input-option video_size:1280x720 --input-option framerate:30 might work, but untested. I'm currently not sure what to be set for pixel_format, I haven't tested dshow capture much for detailed settings.

rigaya avatar Mar 25 '25 22:03 rigaya

Currently --input-option rtbufsize:1500000 --input-option video_size:1280x720 --input-option framerate:30 might work, but untested. I'm currently not sure what to be set for pixel_format, I haven't tested dshow capture much for detailed settings.

Here is an example of what I got working on one of my capture cards:

"NvEncC64.exe --input-format dshow -i video="UHD Capture" --input-option rtbufsize:1500000 --input-option video_size:1280x720 --input-option framerate:60 --input-option pixel_format:yuyv422 -o - --output-format nut | ffplay.exe -"

My issue now is that there is some latency/lag issues with the video, is there a way to use --avhw for hardware decoding?

I tried it but it doesn't support that pixel format got this error message:

"avcuvid: codec rawvideo(yuyv422) unable to decode by cuvid."

Is there a way to convert the pixel format to one that is supported?

Anything else I can add/change to reduce the latency/lag issues?

Usulyre avatar Mar 27 '25 00:03 Usulyre

I think that for at 1280x720 60fps, software decoding shall be enough.

The latency of lag might be better by adding --input-analyze 0.2 --input-probesize 10000 .

rigaya avatar Mar 27 '25 12:03 rigaya

NVEnc 8.01 adds --input-pixel-format to set pixel format.

However, I'm not being able to test --input-pixel-format yuyv422 as I don't have a capture card that can use the pixel format.

rigaya avatar Mar 29 '25 11:03 rigaya

NVEnc 8.01 adds --input-pixel-format to set pixel format.

However, I'm not being able to test --input-pixel-format yuyv422 as I don't have a capture card that can use the pixel format.

So I had this now:

NvEncC64.exe --input-format dshow -i video="UHD Capture" --input-option rtbufsize:1024m --input-option video_size:1280x720 --input-option framerate:60 --input-pixel-format yuyv422 --input-analyze 0.2 --input-probesize 32 --vpp-fruc fps=120 -o - --output-format nut | ffplay.exe -enable_vulkan -

There is still some latency/lag present.

I was wondering if there is an option or you could add an option to set a custom fps for the capture card?

I tried this but it didn't work, "--fps 24.000"

Also, my other capture card which has a pixel format of this: "uyvy422" doesn't work at all.

NvEncC64.exe --input-format dshow -i video="UHD Capture" --input-option rtbufsize:1024m --input-option video_size:1280x720 --input-option framerate:24 --input-pixel-format uyvy422 --input-analyze 0.2 --input-probesize 32 --vpp-fruc fps=120 -o - --output-format nut | ffplay.exe -enable_vulkan -

Usulyre avatar Mar 30 '25 00:03 Usulyre

I was wondering if there is an option or you could add an option to set a custom fps for the capture card?

I think --input-option framerate:24.000 should work.

Also, my other capture card which has a pixel format of this: "uyvy422" doesn't work at all.

Yes, not all pixel formats are supported in NVEncC. I will add support for uyvy422 in next release.

rigaya avatar Apr 01 '25 09:04 rigaya

NVEnc 8.03 adds support for uyvy422 input.

rigaya avatar Apr 05 '25 12:04 rigaya