Video Encoding in A100 GPU

Please provide complete information as applicable to your setup.

• Hardware Platform (Jetson / GPU) GPU
• DeepStream Version 7.1
• JetPack Version (valid for Jetson only)
• TensorRT Version 10.3.0.26
• NVIDIA GPU Driver Version (valid for GPU only) A100
• Issue Type( questions, new requirements, bugs) question
• How to reproduce the issue ? (This is for bugs. Including which sample app is using, the configuration files content, the command line used and other details for reproducing)
• Requirement details( This is for new requirement. Including the module name-for which plugin or for which sample application, the function description)

We are facing an issue when running our video pipeline on top of A100 GPU. We found out that we are using Deepstream’s nvv4l2h264enc encoder, but A100 GPU does not contain hardware encoder, per Video Encode and Decode GPU Support Matrix | NVIDIA Developer

When trying to find alternative solutions, we thought about using software encoder, particularly x264enc which is gstreamer’s encoder. We faced the same issues as mentioned here X264enc plugin is not available from within my docker container - Intelligent Video Analytics / DeepStream SDK - NVIDIA Developer Forums

We have tried all steps mentioned by the Nvidia’s moderator throughout the thread, but still when running “gst-inspect-1.0 x264enc” we get the error “No such element or plugin ‘x264enc’”. We are unable to run ANY pipeline involving encoding of video under A100 GPU. Note that on other GPUs, the same code works as expected.

We have some questions regarding this issue:

  1. What are we missing in adding the software encoder to deepstream 7.1 image?
  2. What alternatives are there for processing videos in A100 GPU, which contains no hardware encoder? When searching on the web, using gstreamer ‘s x264enc is mentioned as the common solution for this scenario.

Which docker image do you use? x264enc should be available if installed correctly

 docker run -it --rm --privileged --gpus all --network host  nvcr.io/nvidia/deepstream:7.1-gc-triton-devel

/opt/nvidia/deepstream/deepstream/user_additional_install.sh

# This script will clear the gstreamer cache.  
# rm -rf ~/.cache/gstreamer-1.0/
/opt/nvidia/deepstream/deepstream/install.sh

Due to copyright issues, x264 is not installed by default in the docker image, but it is the recommended software encoding plugin.

Thanks for the quick reply!

We are working with nvidia/deepstream:7.1-triton-multiarch and not with gc-triton-devel.

Is there a way to add the plugin to the multiarch image?

For installing x264enc, they are the same, please use the script mentioned above to install

Thanks! The x264enc now works, but we now see that the uri_decode_bin automatically selects nvv412decoder and does not reproduce an error. When trying to find alternatives for software decoder, we see that avdec_h264 is not installed in the image. Trying to download it to the image failed as well.

Is there a solution for this issue also?

A100 can use hardware decoding, but does not support hardware encoding.

Some GPL libraries have been removed from the docker image and need to be reinstalled

ldd /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstlibav.so

apt install --reinstall libmp3lame0 libxvidcore4

/opt/nvidia/deepstream/deepstream/user_additional_install.sh