Execution getting stuck after model has been loaded

Please provide complete information as applicable to your setup.

• Hardware Platform (t4 GPU)
• DeepStream Version 6.2

  • Ubuntu 20.04
  • GStreamer 1.16.3
  • NVIDIA driver 525.60.13
  • CUDA 11.8
  • TensorRT 8.5.1.7

deepstream_test_1.py.txt (11.3 KB)
This is a code i found on a different forum

Save output to video using filesink

,
nvinfer gstnvinfer_impl.cpp:328:notifyLoadModelStatus: [UID 1]: Load new model:dstest1_pgie_config.txt sucessfully
After this the execution gets stuck and the video file is shown as text even though its mp4 file

Could you attach the log with GST_DEBUG=3 in front of the execution command?

i was using a .mp4 file instead of a .h264 file,now it works.

It could be an encoder problem. Since the h264 works well, you can try the pipeline like ....nvv4l2h264enc ! h264parse ! qtmux ! filesink location=test.mp4

I made these changes and it doesnt work with h264 either, im new to this so not so familiar

encoder = Gst.ElementFactory.make("nvv4l2h264enc", "encoder")
    if not encoder:
        sys.stderr.write(" Unable to create encoder \n")
    encoder.set_property("bitrate", 2000000)
 
    print("Creating h264parser \n")
    h264parser2 = Gst.ElementFactory.make("h264parse", "h264-parser2")
    if not h264parser2:
        sys.stderr.write(" Unable to create h264parser \n")
 
    print("Creating Container \n")
    container = Gst.ElementFactory.make("qtmux", "qtmux")
    if not container:
        sys.stderr.write(" Unable to create code parser \n")
 
    print("Creating Sink \n")
    sink = Gst.ElementFactory.make("filesink", "filesink")
    if not sink:
        sys.stderr.write(" Unable to create file sink \n")
 
    sink.set_property("location", "/home/ipcam/Downloads/output_videos/output_1.mp4")
    sink.set_property("sync", 1)
    sink.set_property("async", 0)
 
    print("Playing file %s " %args[1])
    source.set_property('location', args[1])
    streammux.set_property('width', 1920)
    streammux.set_property('height', 1080)
    streammux.set_property('batched-push-timeout', 4000000)
    streammux.set_property('batch-size', 1)
    pgie.set_property('config-file-path', "dstest1_pgie_config.txt")
 
    print("Adding elements to Pipeline \n")
    pipeline.add(source)
    pipeline.add(h264parser)
    pipeline.add(decoder)
    pipeline.add(streammux)
    pipeline.add(pgie)
    pipeline.add(nvvidconv)
    pipeline.add(nvvidconv2)
    pipeline.add(encoder)
    pipeline.add(capsfilter)
    pipeline.add(h264parser2)
    pipeline.add(container)
    pipeline.add(nvosd)
    pipeline.add(sink)
 
    # we link the elements together
    # file-source -> h264-parser -> nvh264-decoder ->
    # nvinfer -> nvvidconv -> nvosd -> video-renderer
    print("Linking elements in the Pipeline \n")
    source.link(h264parser)
    h264parser.link(decoder)
 
    sinkpad = streammux.get_request_pad("sink_0")
    if not sinkpad:
        sys.stderr.write(" Unable to get the sink pad of streammux \n")
    srcpad = decoder.get_static_pad("src")
    if not srcpad:
        sys.stderr.write(" Unable to get source pad of decoder \n")
    srcpad.link(sinkpad)
    streammux.link(pgie)
    pgie.link(nvvidconv)
    nvvidconv.link(nvosd)
    nvosd.link(nvvidconv2)
    nvvidconv2.link(capsfilter)
    capsfilter.link(encoder)
    encoder.link(h264parser2)
 
    sinkpad1 = container.get_request_pad("video_0")
    if not sinkpad1:
        sys.stderr.write(" Unable to get the sink pad of qtmux \n")
    srcpad1 = h264parser2.get_static_pad("src")
    if not srcpad1:
        sys.stderr.write(" Unable to get mpeg4 parse src pad \n")
    srcpad1.link(sinkpad1)
    container.link(sink)

You can just link the plugin like below.

    encoder.link(h264parser2)
    h264parser2.link(container)
    container.link(sink)

I tried implementing the code, but it still didn’t work. I’ll attach the entire code. Could you please review it and let me know what I did wrong? I’m not very familiar with this.
deepstreamtest1.txt (11.6 KB)

There seems nothing wrong with the code. Could you attach the log with GST_DEBUG=3 in the front of the command like below?

GST_DEBUG=3 python3 ...

debug_log (1).txt (97.1 KB)

Could you attach the video source you are using?

This is our demo video, so it shouldn’t be a problem. Just from your soure code, You haven’t changed the plugin connection like I suggested before.

There is no update from you for a period, assuming this is not an issue anymore. 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.