ros-drivers / video_stream_opencv

A package to open video streams and publish them in ROS using the opencv videocapture mechanism
227 stars 159 forks source link

Invalid video_stream_provider #113

Closed saadnec closed 1 year ago

saadnec commented 1 year ago

I have been trying to run "rtsp_stream.launch" through roslaunch. I am publishing my mobile camera input to an ip address using http protocol for doing that I just changed the following line <arg name="video_stream_provider" value="http://192.168.10.9:4747/video" />

But i keep receiving the following errors

**`Checking log directory for disk usage. This may take a while. Press Ctrl-C to interrupt Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://saad:35595/

SUMMARY

PARAMETERS

NODES /rtsp2/ rtsp2_image_view (image_view/image_view) rtsp2_stream (video_stream_opencv/video_stream)

ROS_MASTER_URI=http://localhost:11311

process[rtsp2/rtsp2_stream-1]: started with pid [14618] process[rtsp2/rtsp2_image_view-2]: started with pid [14619] [ INFO] [1666023624.470907836]: Initializing nodelet with 4 worker threads. [ WARN] [1666023624.514958344]: Shutdown request received. [ WARN] [1666023624.515008880]: Shutdown request received. [ WARN] [1666023624.515026175]: Reason given for shutdown: [[/rtsp2/rtsp2_image_view] Reason: new node registered with same name] [ WARN] [1666023624.515063189]: Reason given for shutdown: [[/rtsp2/rtsp2_stream] Reason: new node registered with same name] [ INFO] [1666023624.551346717]: Camera name: rtsp2 [ INFO] [1666023624.551390886]: Provided camera_info_url: '' [ INFO] [1666023624.551429932]: Publishing with frame_id: rtsp_frame [ INFO] [1666023624.551456854]: Setting camera FPS to: 30 [ INFO] [1666023624.551476054]: Throttling to fps: 30 [ INFO] [1666023624.551495476]: Setting buffer size for capturing frames to: 1000 [ INFO] [1666023624.551523171]: Flip horizontal image is: false [ INFO] [1666023624.551539543]: Flip vertical image is: false [ INFO] [1666023624.551554584]: Video start frame is: 0 [ INFO] [1666023624.551570554]: Video stop frame is: -1 [ INFO] [1666023624.823776364]: using default calibration URL [ INFO] [1666023624.823873729]: camera calibration URL: file:///home/saad/.ros/camera_info/rtsp2.yaml [ INFO] [1666023624.823950947]: Unable to open camera calibration file [/home/saad/.ros/camera_info/rtsp2.yaml] [ WARN] [1666023624.823979120]: Camera calibration file /home/saad/.ros/camera_info/rtsp2.yaml not found. [ INFO] [1666023624.824053851]: Opening VideoCapture with provider: http://192.168.10.9:4747/video

(video_stream:14618): GStreamer-CRITICAL **: 21:20:24.961: gst_element_link_pads_full: assertion 'GST_IS_ELEMENT (src)' failed OpenCV Error: Unspecified error (GStreamer: cannot link color -> sink ) in cvCaptureFromCAM_GStreamer, file /home/saad/Dev/opencv/modules/videoio/src/cap_gstreamer.cpp, line 792 VIDEOIO(cvCreateCapture_GStreamer (CV_CAP_GSTREAMER_FILE, filename)): raised OpenCV exception:

/home/saad/Dev/opencv/modules/videoio/src/cap_gstreamer.cpp:792: error: (-2) GStreamer: cannot link color -> sink in function cvCaptureFromCAM_GStreamer

[FATAL] [1666023624.961658398]: Invalid 'video_stream_provider': http://192.168.10.9:4747/video `**