• Hardware Platform (Jetson / GPU) Jetson NX
• DeepStream Version 6.0
• JetPack Version (valid for Jetson only) Jetpack 4.6 [L4T 32.6.1]
• TensorRT Version8.0.1.6
• Issue Type( questions, new requirements, bugs) Question
Thanks to @kharshit.kr and @Fiona.Chen, I found this post about adding spitmuxsink
to DeepStream.
It’s almost the same issue, but I’m using two sinks instead of one.
sink0
is for inference and other related processing.
sink1
is for saving stream into file
Below is my config file,
[application]
enable-perf-measurement=1
perf-measurement-interval-sec=60
kitti-track-output-dir=/opt/nvidia/deepstream/deepstream-6.0/output
[tiled-display]
enable=1
rows=1
columns=1
width=1920
height=1080
#width=3840
#height=2160
gpu-id=0
[source0]
enable=1
#Type - 1=CameraV4L2 2=URI 3=MultiURI
type=3
num-sources=1
uri=<PATH_TO_VIDEO>
gpu-id=0
#<Addition>#
latency=100
[streammux]
gpu-id=0
batch-size=1
batched-push-timeout=40000
## Set muxer output width and height
width=1920
height=1080
live-source=0
enable-padding=0
[sink0]
enable=1
#Type - 1=FakeSink 2=EglSink 3=File
type=2
#file 1 live 0
sync=1
source-id=0
gpu-id=0
#<Addition>#
qos=0
source-id=0
[sink1]
enable=1
type=3
container=1
codec=1
enc-type=1
sync=0
bitrate=20000000
profile=0
output-file=/home/nvidia/Desktop/D191_20210204122128.mp4
source-id=0
[osd]
enable=1
gpu-id=0
border-width=3
text-size=15
text-color=1;1;0;1;
text-bg-color=0.3;0.3;0.3;1
font=Arial
show-clock=1
clock-x-offset=1100
clock-y-offset=30
clock-text-size=60
clock-color=1;1;0;0
[primary-gie]
enable=1
gpu-id=0
# Modify as necessary
batch-size=1
#Required by the app for OSD, not a plugin property
bbox-border-color0=1;0;0;1
bbox-border-color1=0;1;1;1
bbox-border-color2=0;0;1;1
bbox-border-color3=0;1;0;1
gie-unique-id=1
config-file=./config.txt
[tracker]
enable=1
tracker-width=1920
tracker-height=1080
ll-lib-file=/opt/nvidia/deepstream/deepstream-6.0/lib/libsort.so
gpu-id=0
[tests]
file-loop=1
When I edit deepstream_sink_bin.c
according to the post, it throws a segmentation fault.
$ deepstream-app -c deepstream.txt
# Warning (can be ignored)
(deepstream-app:19512): GLib-GObject-WARNING **: 15:21:16.060: g_object_set_is_valid_property: object class 'GstX264Enc' has no property named 'bufapi-version'
# New warning when I edit my deepstream_sink_bin.c
(deepstream-app:19512): GStreamer-WARNING **: 15:21:16.070: Trying to link elements h264-parser and sink_sub_bin_mux2 that don't share a common ancestor: sink_sub_bin_mux2 hasn't been added to a bin or pipeline, and h264-parser is in sink_sub_bin2
Segmentation fault (core dumped)
My question is, I want to use splitmuxsink
only for sink1
so that I can save multiple videos based on size and time while leaving other functionality intact.
I’ll try my best to follow advices.
Appreciate any help!