GStreamer (Nvidia Accelerated GStreamer) pipeline getting stuck while trying to simultaneously preview and write to disk

Please provide complete information as applicable to your setup.

• Hardware Platform (Jetson / GPU)
Jetson Xavier
• DeepStream Version
• JetPack Version (valid for Jetson only)

• Issue Type( questions, new requirements, bugs)
question, 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)

I am trying to create a pipeline with a camera where I can simultaneously preview and write to the file.

                                  ------> queue ---->  fakesink 
usb camera ---- Tee --
                                ------> queue -----> nvvideoconvert ---->  nvegltransform ----> nveglglessink ** Working  Fine **

                                  ------> queue ---->  nvv4l2h264enc   ----> fakesink 
usb camera---- Tee --
                                ------> queue -----> nvvideoconvert ---->  nvegltransform ----> nveglglessink ** Not Working   **

Here is a python file with sample code to demonstrate the issue, (6.5 KB)

• Requirement details( This is for new requirement. Including the module name-for which plugin or for which sample application, the function description)

                                  ------> queue ---->  nvv4l2h264enc   ----> filesink  ** What I want **
usb camera---- Tee
                                ------> queue -----> nvvideoconvert ---->  nvegltransform ----> nveglglessink ** What I Want   **

Please find the description of the problem above. Basically I would like to run a data logger while previewing the stream. however when I build the pipeline I prefer the video frame freezes and the capture file does not accumulate any footage. they both work independently without an issue (when preview and logging run separately) I wonder if this is a GStreamer limitation or if I’m doing something fundamentally wrong . previously I’ve got other combinations working fine e.g. deepstream pipeline running inference and parallel RTSP streams of both raw and processed/annotated video.


Hi @ganinduN , could you try the following 2 methods?
1.the reason may be your camera data format is not matching the nvv4l2h264enc data format. So you can add a nvconvert plugin between them.
2.set the nveglglessink plugin “sync” property to FALSE.

1 Like

Hi @yuweiw,
Thanks a lot for the answer!! you were very close.

To unfreeze the nveglglessink the trick is to set sink.set_property('async', False)

However the answer to sandwiching nvvideoconvert blocks is slightly not straightforward as it depends on the upstream compatibility. In my case most of the time I use LVDS cameras that go through the MIPI interface therefore I get video/x-raw(memory:NVMM) that is happily compatible with the downstream hardware accelerated blocks. If you use a usb cam for example you may have video/x-raw so you may require a video/x-raw -- > video/x-raw(memory:NVMM) conversion which nvvideoconvert take care of.

Hope this helps! (definitely helped myself)

I’ve added a working code that works with a usb cam, please read the comments for caveats!

Ganindu. (6.1 KB)

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