Skip to content

Commit 7b7c876

Browse files
committed
update nvidia docs.
1 parent 1477750 commit 7b7c876

File tree

3 files changed

+39
-6
lines changed

3 files changed

+39
-6
lines changed

webpage/docs/configuration/capture.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,33 @@ See documentation for [ximagesrc](https://gstreamer.freedesktop.org/documentatio
279279

280280
This configuration requires [Nvidia GPU](https://developer.nvidia.com/cuda-gpus) with [NVENC](https://developer.nvidia.com/nvidia-video-codec-sdk) support.
281281

282+
```yaml title="config.yaml"
283+
capture:
284+
video:
285+
codec: h264
286+
ids: [ main ]
287+
pipelines:
288+
main:
289+
gst_pipeline: |
290+
ximagesrc display-name={display} show-pointer=true use-damage=false
291+
! cudaupload ! cudaconvert ! queue
292+
! video/x-raw(memory:CUDAMemory),format=NV12
293+
! nvh264enc
294+
name=encoder
295+
preset=2
296+
gop-size=25
297+
spatial-aq=true
298+
temporal-aq=true
299+
bitrate=4096
300+
vbv-buffer-size=4096
301+
rc-mode=6
302+
! h264parse config-interval=-1
303+
! video/x-h264,stream-format=byte-stream
304+
! appsink name=appsink
305+
```
306+
307+
This configuration requires [Nvidia GPU](https://developer.nvidia.com/cuda-gpus) with [NVENC](https://developer.nvidia.com/nvidia-video-codec-sdk) support and [Cuda](https://developer.nvidia.com/cuda-zone) support.
308+
282309
</TabItem>
283310
</Tabs>
284311

webpage/docs/installation/docker-images.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ For images with Nvidia GPU hardware acceleration using EGL use:
241241
- [`ghcr.io/m1k1o/neko/nvidia-microsoft-edge`](https://ghcr.io/m1k1o/neko/nvidia-microsoft-edge)
242242
- [`ghcr.io/m1k1o/neko/nvidia-brave`](https://ghcr.io/m1k1o/neko/nvidia-brave)
243243

244-
The base image is available at [`ghcr.io/m1k1o/neko/nvidia-base`](https://ghcr.io/m1k1o/neko/nvidia-base).
244+
The base image is available at [`ghcr.io/m1k1o/neko/nvidia-base`](https://ghcr.io/m1k1o/neko/nvidia-base). See [Examples](/docs/v3/installation/examples#nvidia) for more information and usage.
245245

246246
## Supported Architectures {#arch}
247247

webpage/docs/installation/examples.md

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -113,9 +113,9 @@ services:
113113
114114
## Nvidia GPU Acceleration {#nvidia}
115115
116-
Neko supports hardware acceleration using Nvidia GPUs. To use this feature, you need to have the Nvidia Container Toolkit installed on your system. You can find the installation instructions [here](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/install-guide.html).
116+
Neko supports hardware acceleration using Nvidia GPUs. To use this feature, you need to have the Nvidia Container Toolkit installed on your system. You can find the installation instructions [here](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/install-guide.html). Check if your GPU supports hardware encoding with [this list](https://developer.nvidia.com/video-encode-decode-gpu-support-matrix).
117117
118-
This example shows how to accelerate video encoding and as well the browser rendering using the GPU. You can test if the GPU is used by running `nvidia-smi`, which should show the GPU usage of both the browser and neko. In the browser, you can run the [WebGL Aquarium Demo](https://webglsamples.org/aquarium/aquarium.html) to test the GPU usage.
118+
This example shows how to accelerate video encoding and as well the browser rendering using the GPU. You can test if the GPU is used by running `nvtop` or `nvidia-smi`, which should show the GPU usage of both the browser and neko. In the browser, you can run the [WebGL Aquarium Demo](https://webglsamples.org/aquarium/aquarium.html) to test the GPU usage.
119119

120120
```yaml title="docker-compose.yaml"
121121
services:
@@ -130,8 +130,8 @@ services:
130130
NEKO_CAPTURE_VIDEO_PIPELINE: |
131131
ximagesrc display-name={display} show-pointer=true use-damage=false
132132
! video/x-raw,framerate=25/1
133-
! videoconvert ! queue
134-
! video/x-raw,format=NV12
133+
! cudaupload ! cudaconvert ! queue
134+
! video/x-raw(memory:CUDAMemory),format=NV12
135135
! nvh264enc
136136
name=encoder
137137
preset=2
@@ -161,7 +161,11 @@ services:
161161

162162
See available [Nvidia Docker Images](/docs/v3/installation/docker-images#nvidia).
163163

164-
If you only want to accelerate the encoding, **not the browser rendering**, you can use the default image with additional environment variables:
164+
:::note
165+
If your Nvidia GPU does not support CUDA, you can use the pipeline below without `cudaupload` and `cudaconvert`. This should work with older GPUs, but the performance might be lower.
166+
:::
167+
168+
If you only want to accelerate the encoding, **not the browser rendering**, and you do not need [Cuda library](https://gstreamer.freedesktop.org/documentation/cuda/index.html?gi-language=c), you can use the default image with additional environment variables:
165169

166170
```yaml title="docker-compose.yaml"
167171
services:
@@ -181,8 +185,10 @@ services:
181185
NEKO_CAPTURE_VIDEO_PIPELINE: |
182186
ximagesrc display-name={display} show-pointer=true use-damage=false
183187
! video/x-raw,framerate=25/1
188+
# highlight-start
184189
! videoconvert ! queue
185190
! video/x-raw,format=NV12
191+
# highlight-end
186192
! nvh264enc
187193
name=encoder
188194
preset=2

0 commit comments

Comments
 (0)