Re: RTSP Stream source detect unavailability and replace Logo until its available

Rahibe Meryem via gstreamer-devel <[email protected]>
Newsgroups gmane.comp.video.gstreamer.devel
Message-ID <[email protected]>
I tried but didn’t successful..

What could be wrong with below pipeline ? 







gst-launch-1.0 funnel name=fun 

! queue name=custom_pre_convert_0 leaky=no max-size-buffers=30 max-size-bytes=0 max-size-time=0 

! videoconvert n-threads=1 qos=false 

! video/x-raw,format=RGB 

! queue name=custom_pre_cropper1_q leaky=no max-size-buffers=30 max-size-bytes=0 max-size-time=0 

! customcropper so-path=/local/workspace/custom/apps/h8/gstreamer/libs/post_processes//cropping_algorithms/libwhole_buffer.so function-name=create_crops use-letterbox=true resize-method=inter-area internal-offset=true name=cropper1 customaggregator name=agg1 cropper1. 

! queue name=bypess1_q leaky=no max-size-buffers=30 max-size-bytes=0 max-size-time=0 

! agg1. cropper1. 

! queue name=custom_pre_detector_q leaky=no max-size-buffers=30 max-size-bytes=0 max-size-time=0 

! customnet hef-path=/local/workspace/custom/apps/h8/gstreamer/general/multi_person_multi_camera_tracking/resources/yolov5s_personface_reid.hef scheduling-algorithm=1 vdevice-key=1 

! queue name=detector_post_q leaky=no max-size-buffers=1000 max-size-bytes=0 max-size-time=0 

! customfilter so-path=/local/workspace/custom/apps/h8/gstreamer/libs/post_processes//libyolo_post.so qos=false function_name=yolov5_personface_letterbox config-path=/local/workspace/custom/apps/h8/gstreamer/general/multi_person_multi_camera_tracking/resources/configs/yolov5_personface.json 

! queue name=detector_pre_agg_q leaky=no max-size-buffers=30 max-size-bytes=0 max-size-time=0 

! agg1. agg1. 

! queue name=custom_pre_tracker leaky=no max-size-buffers=30 max-size-bytes=0 max-size-time=0 

! customtracker name=custom_tracker custom-objects-blacklist=custom_landmarks,custom_depth_mask,custom_class_mask,custom_matrix class-id=1 kalman-dist-thr=0.7 iou-thr=0.7 init-iou-thr=0.8 keep-new-frames=2 keep-tracked-frames=4 keep-lost-frames=8 qos=false std-weight-position-box=0.01 std-weight-velocity-box=0.001 

! queue leaky=no max-size-buffers=60 max-size-bytes=0 max-size-time=0 

! customfilter function-name=alp_crop config-path=aliveliDereliX use-gst-buffer=true so-path=/local/workspace/custom/apps/h8/gstreamer/libs/post_processes/libalpullu_crop.so 

! queue name=custom_pre_cropper2_q leaky=no max-size-buffers=30 max-size-bytes=0 max-size-time=0 

! customcropper so-path=/local/workspace/custom/apps/h8/gstreamer/libs/post_processes//cropping_algorithms/libre_id.so function-name=create_crops internal-offset=true name=cropper2 customaggregator name=agg2 cropper2. 

! queue name=bypess2_q leaky=no max-size-buffers=30 max-size-bytes=0 max-size-time=0 

! agg2. cropper2. 

! queue name=pre_reid_q leaky=no max-size-buffers=10 max-size-bytes=0 max-size-time=0 

! customnet hef-path=/local/workspace/custom/apps/h8/gstreamer/general/multi_person_multi_camera_tracking/resources/repvgg_a0_person_reid_2048.hef scheduling-algorithm=1 vdevice-key=1 

! queue name=reid_post_q leaky=no max-size-buffers=10 max-size-bytes=0 max-size-time=0 

! customfilter so-path=/local/workspace/custom/apps/h8/gstreamer/libs/post_processes//libre_id.so qos=false 

! queue name=reid_pre_agg_q leaky=no max-size-buffers=10 max-size-bytes=0 max-size-time=0 

! agg2. agg2. 

! queue name=custom_pre_gallery leaky=no max-size-buffers=30 max-size-bytes=0 max-size-time=0 

! customgallery similarity-thr=.4 gallery-queue-size=100 class-id=1 

! queue name=custom_post_gallery leaky=no max-size-buffers=30 max-size-bytes=0 max-size-time=0 

! videoscale n-threads=2 add-borders=false qos=false 

! video/x-raw, width=800, height=450, pixel-aspect-ratio=1/1 

! queue name=custom_pre_draw leaky=no max-size-buffers=30 max-size-bytes=0 max-size-time=0 

! customfilter use-gst-buffer=true so-path=/local/workspace/custom/apps/h8/gstreamer/libs/apps/re_id//libre_id_overlay.so qos=false 

! queue name=custom_post_draw leaky=no max-size-buffers=30 max-size-bytes=0 max-size-time=0 

! streamiddemux name=sid compositor name=comp start-time-selection=0 sink_0::xpos=0 sink_0::ypos=0 sink_1::xpos=640 sink_1::ypos=0 sink_2::xpos=1280 sink_2::ypos=0 sink_3::xpos=1920 sink_3::ypos=0 sink_4::xpos=0 sink_4::ypos=640 sink_5::xpos=640 sink_5::ypos=640 sink_6::xpos=1280 sink_6::ypos=640 sink_7::xpos=1920 sink_7::ypos=640 sink_8::xpos=0 sink_8::ypos=1280 sink_9::xpos=640 sink_9::ypos=1280 sink_10::xpos=1280 sink_10::ypos=1280 sink_11::xpos=1920 sink_11::ypos=1280 sink_12::xpos=0 sink_12::ypos=1920 sink_13::xpos=640 sink_13::ypos=1920 sink_14::xpos=1280 sink_14::ypos=1920 sink_15::xpos=1920 sink_15::ypos=1920 

! queue name=custom_video_q_0 leaky=no max_size_buffers=30 max-size-bytes=0 max-size-time=0 

! videoconvert n-threads=2 qos=false 

! queue name=custom_display_q_0 leaky=no max_size_buffers=300 max-size-bytes=0 max-size-time=0 

! fpsdisplaysink video-sink=xvimagesink name=custom_display sync=false text-overlay=true fallbacksrc uri=='rtsp://custom:[email protected]:554/cam/realmonitor?channel=25&subtype=0' timeout=20000000000 name=xource_0 fallback-uri=file:///local/workspace/custom/orange.jpg 

! decodebin 

! queue name=custom_preprocess_q_0 leaky=no max-size-buffers=32 max-size-bytes=0 max-size-time=0 

! decodebin3 

! queue leaky=downstream max-size-buffers=32 max-size-bytes=0 max-size-time=0 

! videoscale n-threads=8 

! video/x-raw,pixel-aspect-ratio=1/1 

! videoconvert n-threads=8 

! video/x-raw,pixel-aspect-ratio=1/1 

! custompython qos=false module=/local/workspace/custom/apps/h8/gstreamer/general/multi_person_multi_camera_tracking/add_metadata.py function=test0 

! fun.sink_0 sid.src_0 

! queue name=comp_q_0 leaky=downstream max-size-buffers=5 max-size-bytes=0 max-size-time=0 

! comp.sink_0






Setting pipeline to PAUSED ...
0:00:00.083481833 1706563 0x5590078b8f50 ERROR            fallbacksrc utils/fallbackswitch/src/fallbacksrc/imp.rs:1482:gstfallbackswitch::fallbacksrc::imp::FallbackSrc::change_source_state:<xource_0> source failed to change state
 << : -----------------PAD
aliveliDereliX : -----------------configPath
aliveliDereliX : -----------------configPath
xx INITIALIZATION ...................
INITIALIZATION ...................
xx..INITIALIZATION ...................
1 - - INITIALIZATION ...................
2 - -  INITIALIZATION ...................
INI TIALIZATION ...................
INI TIALIZATION ...................
INITIALIZATION ...................
Pipeline is PREROLLING ...
Redistribute latency...
Redistribute latency...
Redistribute latency...
0:00:01.083850290 1706563 0x55900791af00 ERROR            fallbacksrc utils/fallbackswitch/src/fallbacksrc/imp.rs:3190:gstfallbackswitch::fallbacksrc::imp::FallbackSrc::handle_source_error::{{closure}}::{{closure}}::{{closure}}:<xource_0> source failed to change state
^Chandling interrupt.
Interrupt: Stopping pipeline ...
Setting pipeline to NULL ...
Freeing pipeline ...
> On 21 Jul 2023, at 17:13, Tim-Philipp Müller via gstreamer-devel <[email protected]> wrote:
> 
> Hi,
> 
>> I have 16 rtsp sources (cam) I am looking a solution to detect unavailable rtsp source whether starting the program or after a while , and replace the stream output with a logo until its available again. The pipeline has many plugins object detection etc. 
>> 
>> Is there any way to do this ? 
> 
> fallbacksrc or fallbackswitch from gst-plugins-rs might be able to achieve what you want:
> 
> https://gstreamer.freedesktop.org/documentation/fallbackswitch/index.html?gi-language=c#fallbackswitch-page <https://gstreamer.freedesktop.org/documentation/fallbackswitch/index.html?gi-language=c#fallbackswitch-page>
> 
> Cheers
>  Tim
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.