Enabling hardware encoding/decoding in Jitsi Videobridge


#1

Hello All,

I have been trying to figure out whether I can force jitsi-videobridge to use a GPU for hardware encoding and decoding of frames. Since jitsi-videobridge can use ffmpeg, and since ffpmpeg can use a GPU for hardware encoding/decoding, at least on paper it seems possible to force jitsi-videobridge to use hardware encoding and decoding.

I have tried the following so far:

  1. Compiled ffmpeg with hardware encoding enabled. I can see in compiled ffmpeg that both hardware encoders and decoders are enabled.
  2. Complied libjitsi ffmpeg as follows: ant -lib ~/.m2/repository/org/apache/maven/maven-ant-tasks/2.1.3 ffmpeg -Dffmpeg=/usr/local/lib -Dlame=/usr/lib/x86_64-linux-gnu -Dvoamrwbenc=/usr/lib/x86_64-linux-gnu/ -Dx264=/usr/lib/x86_64-linux-gnu/libx264 -Darch=64 -v
  3. Built libjitsi-1.0-SNAPSHOT.jar with the newly compiled libjnffmpeg.so file
  4. Replaced libjnffmpeg.so in jitsi-lgpl-dependencies and rebuilt jitsi-lgpl-dependencies-1.1-SNAPSHOT.jar
  5. Added jitsi-lgpl-dependencies-1.1-SNAPSHOT.jar and libjitsi-1.0-SNAPSHOT.jar to /usr/share/jitsi-videobridge/lib

With this setup when I run jitsi-videobridge, I would expect that the jvb java process would show up in nvidid-smi as a process that is running on gpu. But, it does not.

So, either, the jvb process is not supposed to appear in nvidia-smi. If that’s the case, then how can I check whether the jvb is using hardware encoding. Otherwise, it looks like jvb is not using hardware encoding. In that case, can you please tell me what am I doing wrong?


#2

Jvb is not decoding or encoding anything. It just an sfu, just a packet router with intelligence.