ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
1

gscam issues with ip camera

asked 2012-07-17 04:40:24 -0600

DaSilva258 gravatar image

updated 2014-01-28 17:13:03 -0600

ngrennan gravatar image

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. 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

edit retag flag offensive close merge delete

Comments

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.

joq gravatar image joq  ( 2012-07-17 06:05:45 -0600 )edit

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,

DaSilva258 gravatar image DaSilva258  ( 2012-07-18 03:59:01 -0600 )edit

2 Answers

Sort by ยป oldest newest most voted
2

answered 2012-07-18 04:16:04 -0600

DaSilva258 gravatar image

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.

edit flag offensive delete link more

Comments

1

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'

jnj11 gravatar image jnj11  ( 2014-06-20 14:04:00 -0600 )edit

I'm facing the exact same problem :(

Avio gravatar image Avio  ( 2016-09-22 06:03:35 -0600 )edit

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).

Avio gravatar image Avio  ( 2016-09-22 07:08:58 -0600 )edit
0

answered 2013-02-07 04:40:51 -0600

Bala gravatar image

updated 2013-02-07 06:18:41 -0600

I can see my live pic in the window. How do I take a snapshot with this with terminal?

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2012-07-17 04:40:24 -0600

Seen: 2,773 times

Last updated: Feb 07 '13