Window playback using g-streamer python in DeepStream5.0 Jetson Nano device

•Hardware Platform - Jetson Nano
•DeepStream Version 5.0 DP
•JetPack Version 4.4 DP
•Environment - Python

I am having trouble enabling a window (that I can close, drag or minimize) to display the video after inferencing on Jetson Nano.
The code that I am currently using displays the video like a overlay on the screen (without a window) is as shown below:

nvosd = Gst.ElementFactory.make(“nvdsosd”, “onscreendisplay”)
if not nvosd:
sys.stderr.write(" Unable to create nvosd \n")
if(is_aarch64()):
print(“Creating transform \n “)
transform=Gst.ElementFactory.make(“queue”, “queue”)
if not transform:
sys.stderr.write(” Unable to create transform \n”)

print("Creating EGLSink \n")
sink = Gst.ElementFactory.make("nvoverlaysink", "nvvideo-renderer")
sink.set_property('sync',0)

Using nveglglesink command (below code) throws an error. It is recommended to use nvoverlaysink in my environment.

sink = Gst.ElementFactory.make("nveglglessink", "nvvideo-renderer")
if not sink:
    sys.stderr.write(" Unable to create egl sink \n")

It’s not clear, but it sounds like you are asking how you can use the gstreamer pipelines in Python. If that’s the case, nvoverlaysink and nveglglesink do not work. You have to use appsink in code if you want to display or process the frames in code.

1 Like

Hi,
For displaying frames through cv2.imshow(), you may refer to

Could you suggest options for changes that have to be made in the code format attached to the updated case content?

I am looking for a solution using the python module of gstreamer. Could you suggest options for changes that have to be made in the code format attached to the updated case content?

Hi,
You may refer to our samples:


and do customization.
1 Like