Please provide complete information as applicable to your setup.
• Hardware Platform (Jetson / GPU) GPU
• DeepStream Version 5.0
• TensorRT Version 7
• NVIDIA GPU Driver Version (valid for GPU only) 440
• Issue Type( questions, new requirements, bugs) question
I’m trying to add splitmuxsink
element to deepstream-app to save multiple videos based on size and time. Earlier I tried it in deepstream test app, where the pipeline code is quite simple. I removed qtmux
and replaced filesink
of sink
with splitmuxsink
, but doing the same in deepstream-app isn’t working.
The git diff of deepstream_sink_bin.c
is:
--- a/DeepStream/deepstreamMgr/src/apps-common/deepstream_sink_bin.c
+++ b/DeepStream/deepstreamMgr/src/apps-common/deepstream_sink_bin.c
@@ -397,18 +397,18 @@ create_encode_file_bin (NvDsSinkEncoderConfig * config, NvDsSinkBinSubBin * bin)
}
g_snprintf (elem_name, sizeof (elem_name), "sink_sub_bin_sink%d", uid);
- bin->sink = gst_element_factory_make (NVDS_ELEM_SINK_FILE, elem_name);
+ bin->sink = gst_element_factory_make ("splitmuxsink", elem_name);
if (!bin->sink) {
NVGSTDS_ERR_MSG_V ("Failed to create '%s'", elem_name);
goto done;
}
- g_object_set (G_OBJECT (bin->sink), "location", config->output_file_path,
- "sync", config->sync, "async", FALSE, NULL);
+ g_object_set (G_OBJECT (bin->sink), "location", "/mnt/lprsResults0/splitvideo%05d.mp4",
+ "max-size-time", 10000000000, "max-size-bytes", 10000000, NULL);
g_object_set (G_OBJECT (bin->transform), "gpu-id", config->gpu_id, NULL);
gst_bin_add_many (GST_BIN (bin->bin), bin->queue,
bin->transform, bin->codecparse, bin->cap_filter,
- bin->encoder, bin->mux, bin->sink, NULL);
+ bin->encoder, bin->sink, NULL);
NVGSTDS_LINK_ELEMENT (bin->queue, bin->transform);
@@ -416,8 +416,7 @@ create_encode_file_bin (NvDsSinkEncoderConfig * config, NvDsSinkBinSubBin * bin)
NVGSTDS_LINK_ELEMENT (bin->cap_filter, bin->encoder);
NVGSTDS_LINK_ELEMENT (bin->encoder, bin->codecparse);
- NVGSTDS_LINK_ELEMENT (bin->codecparse, bin->mux);
- NVGSTDS_LINK_ELEMENT (bin->mux, bin->sink);
+ NVGSTDS_LINK_ELEMENT (bin->codecparse, bin->sink);
NVGSTDS_BIN_ADD_GHOST_PAD (bin->bin, bin->queue, "sink");
The changed deepstream_sink_bin.c
is on github gist.
The error is
** ERROR: <create_pipeline:1151>: Could not find 'sink' in 'sink_sub_bin_sink1'
** ERROR: <create_pipeline:1283>: create_pipeline failed
** ERROR: <initDeepStream:1512>: Failed to create pipeline
Quitting
App run failed