Skip to content

How to Access Rtsp Url or filename? #453

@image-rcdat

Description

@image-rcdat

Hi, suppose I have multiple streams and I want to process them in parallel and publish the results in Kafka format,
so How should I know which results belong to a specific URL or file?
I've seen the example of multi-stream processing of dlstreamer

gst-launch-1.0 \
filesrc location=${INPUT_VIDEO_FILE_1} ! decodebin ! vaapipostproc ! video/x-raw(memory:VASurface) ! \
gvadetect model=${DETECTION_MODEL} device=NPU pre-process-backend=ie nireq=4 model-instance-id=inf0 ! queue ! \
gvawatermark ! videoconvertscale ! gvafpscounter ! vaapih264enc ! h264parse ! mp4mux ! filesink location=${OUTPUT_VIDEO_FILE_1} \
filesrc location=${INPUT_VIDEO_FILE_2} ! decodebin ! vaapipostproc ! video/x-raw(memory:VASurface) ! \
gvadetect model=${DETECTION_MODEL} device=NPU pre-process-backend=ie nireq=4 model-instance-id=inf0 ! queue ! \
gvawatermark ! videoconvertscale ! gvafpscounter ! vaapih264enc ! h264parse ! mp4mux ! filesink location=${OUTPUT_VIDEO_FILE_2} \
filesrc location=${INPUT_VIDEO_FILE} ! decodebin vaapipostproc ! video/x-raw(memory:VASurface) ! 
gvadetect model={$DETECTION_MODEL_3} device=GPU pre-process-backend=vaapi-surface-sharing nireq=4 model-instance-id=inf1 ! queue ! \
gvawatermark ! videoconvertscale ! gvafpscounter ! vaapih264enc ! h264parse ! mp4mux ! filesink location=${OUTPUT_VIDEO_FILE_3} \
filesrc location=${INPUT_VIDEO_FILE_4} ! decodebin vaapipostproc ! video/x-raw(memory:VASurface) ! 
gvadetect model=${DETECTION_MODEL} device=GPU pre-process-backend=vaapi-surface-sharing nireq=4 model-instance-id=inf1 ! queue ! \
gvawatermark ! videoconvertscale ! gvafpscounter ! vaapih264enc ! h264parse ! mp4mux ! filesink location=${OUTPUT_VIDEO_FILE_4}

but this example saves the result in separate files, I want the name of the source (URL or filename) published with results in Kafka.
How should I do this?
there is a similar issue #334 but couldn't find the answer

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions