Processing via a video card

Now I have video transcoding running through a Ryzen 7 2700 processor, I want to buy an RTX3060 video card. Tell me, what do I need to do so that Pertube sees the video card and starts processing video through it?

Hi!

PeerTube uses ffmpeg to do the transcoding job.
You should probably use the transcoding plugin API to create a transcoding plugin dedicated to your need.

A plugin using Hardware h264 transcode can be found there: Théo Le Calvar / peertube-plugin-hardware-transcode-vaapi · GitLab

There is a virtual machine, I decided to put another video card, NVIDIA 1060. Here is the result

peertube@media:~$ lspci | grep -E "VGA|3D"
00:01.0 VGA compatible controller: Red Hat, Inc. QXL paravirtual graphic card (rev 05)
06:10.0 VGA compatible controller: NVIDIA Corporation GP106 [GeForce GTX 1060 6GB] (rev a1)
peertube@media:~$

I see a video card in the virtual machine. How do I get Peertube to do transcoding via a video card? I tried to install the plugin that you specified, but video processing still happens through the processor.

You can also see the video card

peertube@media:~$ nvidia-smi
Sun Jun  5 00:45:33 2022
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 470.129.06   Driver Version: 470.129.06   CUDA Version: 11.4     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|                               |                      |               MIG M. |
|===============================+======================+======================|
|   0  NVIDIA GeForce ...  On   | 00000000:06:10.0 Off |                  N/A |
| 27%   40C    P8     7W / 120W |      1MiB /  6078MiB |      0%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|=============================================================================|
|  No running processes found                                                 |
+-----------------------------------------------------------------------------+
peertube@media:~$

I decided to install the plugin peertube-plugin-transcoding-profile-debug · master · Framasoft / PeerTube / official-plugins · GitLab
But I do not know which codec to correctly specify in the section
"encoderName": "string",

I found out… in order for transcoding to work through a video card, FFMPEG needs to compile itself and add the CUDA module there. Here is the line for the configuration
./configure --enable-nonfree --enable-cuda-nvcc --enable-libnpp --extra-cflags=-I/usr/local/cuda/include --extra-ldflags=-L/usr/local/cuda/lib64 --disable-static --enable-shared

Here are the full instructions
https://docs.nvidia.com/video-technologies/video-codec-sdk/ffmpeg-with-nvidia-gpu/
I have Debian 11 installed and I get an error when compiling

ERROR: failed checking for nvcc.

The instructions also say how to fix this error, but I still can’t.
Then I found out that this is an nvcc issue, which is installed version 10 on Debian by default. And if nlc version 7 is installed, then everything will work fine. But I couldn’t install this old version.

Does no one have any ideas how to solve this problem?