Flussonic Media Server is able to encode video using the GPU on Nvidia graphics cards. The list of supported cards can be found at nvidia site.
Also the Nvidia driver version at least 352 must be installed.
Install the driver from the package.
apt-get install nvidia-375
apt-get install nvidia-driver libnvidia-encode1
non-free component must be enabled in
To work with a lot of transcoder processes (more than 40), you'll need to increase the OS limit for open files: ulimit -n 4096.
Add these lines to /etc/security/limits.conf file:
* hard nofile 4096 * hard nofile 4096
Enabling the transcoder
You can configure transcoding:
- In the Flussonic configuration file /etc/flussonic/flussonic.conf in a stream settings, using the directive
transcoderwith various options.
- In the administrator UI in Media > click a stream > Process > Transcoder. The word
transcoderis not needed here.
hw=nvenc flag to turn on Nvenc:
transcoder vb=2048k hw=nvenc ab=128k
Selecting a codec
The default is H.264. For encoding on Nvenc you can use H.265 (HEVC):
transcoder vb=2048k hw=nvenc vcodec=hevc ab=128k
Selecting the video card
If the system has multiple graphics cards, you can choose which one to use with
transcoder vb=2048k hw=nvenc deviceid=2 ab=128k
The number of the card can be retrieved with the command
The first card used by default
Trimming a video
For Nvenc available
crop=left:right:width:heigt option, allows to crop video:
transcoder vb=2048k hw=nvenc crop=0:0:100:100 ab=128
Decoding performed on GPU by default.
To use processor for decoding, specify
transcoder vb=2048k hw=nvenc2 ab=128k
Deinterlace performed by default when using nvenc.
In nvenc2 case deinterlace has to be turned on explicitly with
To disable resource-consuming deinterlacing, specify
deinterlace=0 on nvidia transcoding.
Other parameters, such as
level are used just as in CPU transcoder.
preset parameter can have one of these values:
hp used by default.
hw=qsv flag to turn on QuickSync:
transcoder vb=2048k hw=qsv ab=128k
GeForce series video cards, as a rule, have a limitation in the number of simultaneously encoded streams equal to two. Professional lines QUADRO and TESLA do not have such restrictions, however, the maximum number of transcoded streams depends on many factors, including the quality of input and output streams (bitrate, video resolution, frames per second, etc.), as well as the hardware resources of the server.
When choosing a video card model, use the nvidia comparison table
You can collect statistics on the operation of Nvidia GPU if you enable saving statistics in the Pulse database. To start saving data, add the following directive to the Flussonic configuration file:
To stop saving statistics on Nvidia, update the configuration file:
To view the data on the graph, create a query to the Pulse database and run it in the administrator interface in Pulse, field Custom query.
In the query, use the following main metrics (temperature metrics might not be supported by the video card):
gpu_pwr— Power usage (in Watts)
gpu_gtemp— GPU temperature (in C)
gpu_mtemp— Memory temperature (in C)
gpu_sm— SM (streaming multiprocessor) utilization in %
gpu_mem— Memory utilization in %
gpu_enc— Encoder utilization in %
gpu_dec— Decoder utilization in %
gpu_usedmem— Used video memory, in bytes or kilobytes.
gpu_pclk— Memory and processor clocks (in MHz)
gpu_tviol— Power violations (in %) and thermal violations (as a boolean flag)
gpu_bar1— Frame buffer and Bar1 memory usage (in MB)
gpu_dbecc— ECC (number of aggregated single bit, double bit ECC errors) and PCIe replay errors
gpu_txpci— PCIe Rx and Tx throughput in MB/s (Maxwell and above).