,
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
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)
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 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