ros-drivers / video_stream_opencv

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

Invalid stop/start_frame. #106

Open Mikor-mkr opened 3 years ago

Mikor-mkr commented 3 years ago

Hello everyone, First of all thanks for taking the time to check my issue. The error I get is the following:

[ERROR] [1623244822.830661872]: Invalid 'stop_frame' -2147483648 for video which has -2.76701e+17 frames. Setting internally (won't be shown in dynamic_reconfigure) 'stop_frame' to -2.76701e+17
[ERROR] [1623244822.830673509]: Invalid 'start_frame' 0, which exceeds 'stop_frame' -2147483648. Setting internally (won't be shown in dynamic_reconfigure) 'start_frame' to 0.

Here is my launch file.

<?xml version="1.0"?>
<launch>
   <!-- launch video stream -->
   <include file="$(find video_stream_opencv)/launch/camera.launch" >
        <!-- node name and ros graph name -->
        <arg name="camera_name" value="videofile" />
        <!-- full path to the video file -->
        <!-- wget http://techslides.com/demos/sample-videos/econVideo_2021-06-09-16-33-56_0.mkv -O /tmp/small.mp4 -->
        <arg name="video_stream_provider" value="/home/antonis/Desktop/test_econ_video/econVideo_2021-06-09-16-33-56_2.mkv" />
        <!-- set camera fps to (video files not affected) -->
        <arg name="set_camera_fps" value="27"/>
        <!-- set buffer queue size of frame capturing to -->
        <arg name="buffer_queue_size" value="1000" />
        <!-- throttling the querying of frames to -->
        <arg name="fps" value="27" />
        <!-- setting frame_id -->
        <arg name="frame_id" value="videofile_frame" />
        <!-- camera info loading, take care as it needs the "file:///" at the start , e.g.:
        "file:///$(find your_camera_package)/config/your_camera.yaml" -->
        <arg name="camera_info_url" value="" />
        <!-- flip the image horizontally (mirror it) -->
        <arg name="flip_horizontal" value="false" />
        <!-- flip the image vertically -->
        <arg name="flip_vertical" value="false" />
        <!-- enable looping playback -->
        <arg name="loop_videofile" value="false" />
        <!-- start frame of video -->
        <arg name="start_frame" default="0"/>
        <!-- stop frame of video, -1 means the end of video -->
        <arg name="stop_frame" default="-1"/>
        <!-- visualize on an image_view window the stream generated -->
        <arg name="visualize" value="false" />
   </include>
</launch>

Any ideas? Thanks in advance.