0
$\begingroup$

Rosanswers logo

Hi there, i have a problem in getting my ip cameras videostream into ROS. I try to use the gscam package from brown university.

I followed the Webcam tutorial and edited it to manage the access to the rtsp videostream of my camera.

I'm starting the gscam node with :

export GSCAM_CONFIG="rtspsrc location=rtsp://CameraIP/ipcam.sdp ! video/x-raw-rgb,framerate=30/1 ! ffmpegcolorspace"

to set the proper configuration and then i run it with: rosrun gscam gscam

And this is the output which seems ok.

Gstreamer Version: GStreamer 0.10.36 stream is PAUSED. [ INFO] [1342534853.237473148]: Successfully read camera calibration. Rerun camera calibrator if it is incorrect. Processing...

when i do rostopic list, all topics from the gscam node are listed. But now when i try to watch the video with

rosrun image_view image_view image:=/gscam/image_raw

a small blank window pops up, but without any picture or video from my camera. when i try to echo the image_raw topic, there are no messages published by the node. I can see there is something going on with the camera, the lights are blinking the same way, as i watch the videostream via webbrowser or even gstreamer launchend without ros, which works perfect.

i have no clue on this, but maybe someone of u have an idea or faced the same problem and managed to solve it.

i would be pretty happy if there is some help out there.

Greetings


Originally posted by DaSilva258 on ROS Answers with karma: 46 on 2012-07-17

Post score: 1


Original comments

Comment by joq on 2012-07-17:
Try rxgraph to see if the nodes and topics are connected as expected. Try rostopic hz /gscam/image_raw to see if any images are actually being published.

Comment by DaSilva258 on 2012-07-18:
rxgraph shows me the gscam_publisher node and the connected image_view_node. everything seems to work. hz /gscam/image_raw brings up that there are no images actually being published,

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

after hours of searching for a solution i finally got it work. I'm not really happy how i've done it now, because its not on the direct way, but it works :)

my idea was to get the videostream from the ipcamera to a virtual video device, so that i can access it by ROS on the same way as you access an usb plugged camera.

it is possible with gstreamer to establish a pipe between the ipcameras videostream and a local video device.

the following command handles this for me

gst-launch souphttpsrc location=http://[user]:[password]@[camera_ip]/mjpg/video.mjpg ! jpegdec ! v4l2sink device=/dev/video0

and now i only need to follow the steps in the tutorial mentioned above to see the stream from my camera.


Originally posted by DaSilva258 with karma: 46 on 2012-07-18

This answer was ACCEPTED on the original site

Post score: 2


Original comments

Comment by jnj11 on 2014-06-20:
I'm also having this problem. I tried this solution and got the message below. Do you have any thoughts about the cause?

Setting pipeline to PAUSED ERROR: Pipeline doesn't want to pause ERROR: from element /GstPipeline:pipeline0/GstV4l2Sink:v4l2sink0: Cannot identify device '/dev/video0'

Comment by Avio on 2016-09-22:
I'm facing the exact same problem :(

Comment by Avio on 2016-09-22:
Ok, this last problem was a missing module: sudo apt install v4l2loopback-dkms and then sudo modprobe v4l2loopback. Anyway, the v4l2loopback trick seems to work only with the test stream: gst-launch-1.0 videotestsrc ! v4l2sink device=/dev/video0 (VLC opens it, cheese don't).

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.