I'm trying to use gscam with the two embedded webcam I have on a N900 phone. I have sometimes troubles running gscam as it crashes with a nasty segmentation fault.
In order to use gscam, I've configured GSCAM_CONFIG="v4l2src device=/dev/video1 ! videoscale ! video/x-raw-yuv,width=320,height=240 ! identity name=ros ! ffmpegcolorspace ! jpegenc ! fakesink". Running "gst-launch $GSCAM_CONFIG" works as expected, no segfault. Running this pipeline using "rosrun gscam gscam" (in gscam/bin directory) produces erratic segfaults.
I've tried to track down this error, and gscam fails in processData() at:
On Tue, Aug 17, 2010 at 10:15 AM, Sebastien Lelong
<[hidden email]> wrote:
> I guess I have some problems with my pipeline definition... Any idea ? Is it
> because it's YUV and not RGB ? (webcam doesn't seem to support RGB with
> video/x-raw-rgb pipeline element).
It definitely looks like a colorspace issue. gscam can only process
RGB triplets. I'd need a similar YUV camera to tell you the exact
$GSCAM_CONFIG to use, but you should be able to go from YUV->RGB
within the pipeline itself. You might simply need to move or repeat
the ffmpegcolorspace node closer to the color definition. Something
Using both of your GStreamer pipeline works ! I just needed to remove jpegenc element ("can't connect ros to jpegenc0" IIRC). On the other side (computer), running an image converter ROS node, I can now see more realistic images :) I wasn't able to convert in RGB, gstreamer remains cryptic for me...