Please provide complete information as applicable to your setup.
• Hardware Platform (Jetson / GPU) GPU A6000
• DeepStream Version 6.3
• JetPack Version (valid for Jetson only)
• TensorRT Version
• NVIDIA GPU Driver Version (valid for GPU only) 535.129.03
• Issue Type( questions, new requirements, bugs) Issue
• 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)
Hi
I’m try to construct a very simple pipeline in python that opens a jpeg file, does all the conversions, passes through a nvinfer, through a nvsegvisal and the write the segmentation to a jpeg file. It works fine in a complex C++ pipeline but I can’t get it to work for this simple case. the output file is blank.
here is my simple code:
import gi
gi.require_version(‘Gst’, ‘1.0’)
from gi.repository import GstInitialize GStreamer
Gst.init(None)
def main():
# Define the GStreamer pipeline
pipeline = Gst.parse_launch(
'filesrc location=dbi_rs.jpg ! ’ # Read input JPEG file
'jpegdec ! ’ # Decode JPEG to raw format
'videoconvert ! ’ # Convert to a common format (e.g., I420)
'video/x-raw,format=NV12 ! ’ # Caps filter to set format to NV12
'nvvideoconvert ! ’ # Convert to NVMM memory format for NVIDIA elements
'video/x-raw(memory:NVMM),format=NV12 ! ’ # Caps filter for NVMM memory format
'm.sink_0 nvstreammux name=m width=1920 height=1080 batch-size=1 ! ’ # StreamMux
'nvinfer config-file-path=nvinfer_config.txt ! ’ # Inference
'nvsegvisual ! ’ # Segmentation Visualization
'nvvideoconvert ! ’ # Convert video for encoding
'video/x-raw,format=I420 ! ’ # Caps filter before encoding
'jpegenc ! ’ # Encode to JPEG
‘filesink location=output.jpg’ # Output to file # Output to file
)# Start playing the pipeline pipeline.set_state(Gst.State.PLAYING) # Wait until error or EOS bus = pipeline.get_bus() while True: message = bus.timed_pop_filtered(Gst.CLOCK_TIME_NONE, Gst.MessageType.ERROR | Gst.MessageType.EOS) if message: if message.type == Gst.MessageType.ERROR: err, debug = message.parse_error() print(f"Error: {err}, {debug}") break # Clean up pipeline.set_state(Gst.State.NULL)
if name == “main”:
main()