Error when launching pipeline: TegraV4L2_Open for ENCODER failed

I have a basic pipeline that goes

h264parse | nvv4l2decoder | nvvideoconvert | capsfilter | x264enc

which normally works fine. However after some time I start seeing this error when starting a gstreamer pipeline:

TegraV4L2_Open for ENCODER failed: Resource temporarily unavailable
Failed to query video capabilities: Invalid argument
libv4l2: error getting capabilities: Invalid argument

Every time I try to start a pipeline, and the issue doesn’t resolve until the process is restarted. I can’t tell which element is causing the issue (we don’t use nvv4l2h264enc); and it’s not straightforward to catch this error.

Please provide complete information as applicable to your setup.

• Hardware Platform (Jetson / GPU): GPU
• DeepStream Version: 6.1.0
• JetPack Version (valid for Jetson only) n/a
• TensorRT Version: 11.6-8.4.0.6
• NVIDIA GPU Driver Version (valid for GPU only): 510.85.02
• Issue Type( questions, new requirements, bugs) bug
• 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) Just looking for information on what component could be causing this issue and how to detect it.
• Requirement details( This is for new requirement. Including the module name-for which plugin or for which sample application, the function description)

could you share the whole logs? did you start a new pipeline?

what is your host device model? arm or x86? and can you try a new camera because “TegraV4L2_Open for ENCODER failed” is low level exception.

@fanzh

The device in question is a NVIDIA RTX A2000 12GB on x86. We have multiple cameras connected to the device (differing pipelines), and they all fail with the same error; the only solution is to restart the process.

Sometimes it can take some time to hit this error; for example the error began occuring after the process was running for a week; after which starting any new pipeline creates this error.

  1. take process A, B for example, do you mean A run for a week, then start B, B gives " TegraV4L2_Open for ENCODER failed" error, restart B, then A ,B both can work?
  2. did you run process in docker? could you share your gst-luanch command or code? we need to reproduce it.

The process doesn’t run in docker.

We have a single process that uses the gstreamer library to start and manage pipelines, similar to the deepstream-test1 sample app. Following that example, we run several pipelines (ex.gst_element_set_state (pipeline1, GST_STATE_PLAYING);, where the pipeline is equivalent to 264parse | nvv4l2decoder | nvvideoconvert | capsfilter | x264enc).

Eventually the pipeline fails, and when the application tries to restart it (by creating an entirely new pipeline and running gst_element_set_state (pipeline1, GST_STATE_PLAYING);) that pipeline will fail with TegraV4L2_Open for ENCODER failed. We can’t reproduce the error reliably as just restarting the entire process can resolve the issue; the problem is that restarting the process interferes with other functionality of the application.

Once again the error has occured, but the (only) log message is a bit different:

TegraV4L2_Open for ENCODER failed: Success
Failed to query video capabilities: Invalid argument
libv4l2: error getting capabilities: Invalid argument

can you use third part tool to test camera? here is the command:
gst-launch v4l2src device=/dev/video0 ! filesink location=web3.yuv or
gst-launch-1.0 device=/dev/video0 v4l2src ! xvimagesink

The camera, and various gstreamer pipelines work. This issue doesn’t happen every time, and if I test it works fine. The issue only occurs after the pipeline has been running for a couple hours/days. After which, the entire process must be restarted. I don’t think the camera is the issue.

thanks for your sharing, there is no enough information to get root cause because it is calling system function failing.

  1. can you provide a whole logs? please do “export GST_DEBUG=4”, then run again, you can redirect the logs to a file.
  2. if you are testing camera, what “h264parse | nvv4l2decoder” is used to do?
  3. can you simplify your code to narrow down this issue?
  4. can you provide a simplified code reproduce this issue? including configuration file and source file.

There is no update from you for a period, assuming this is not an issue any more.
Hence we are closing this topic. If need further support, please open a new one.
Thanks

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.