After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 647217 - camerabin doesn't support JPEG-producing webcams
camerabin doesn't support JPEG-producing webcams
Status: RESOLVED NOTGNOME
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
0.10.x
Other Linux
: Normal major
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2011-04-08 19:41 UTC by Gabriel Burt
Modified: 2011-04-25 19:06 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Gabriel Burt 2011-04-08 19:41:37 UTC
I have two somewhat old webcams:

ID 041e:401c Creative Technology, Ltd Webcam NX [PD1110]
ID 046d:08d7 Logitech, Inc. QuickCam Communicate STX

If I run `gst-launch camerabin` on these, I get "Internal GStreamer error: negotiation problem."

v4l2src's probed caps for them are both something like this:
image/jpeg, width=(int)640, height=(int)480, interlaced=(boolean)false, framerate=(fraction)[ 0/1, 100/1 ]; image/jpeg, width=(int)320, height=(int)240, interlaced=(boolean)false, framerate=(fraction)[ 0/1, 100/1 ]

If I run `gst-launch v4l2src ! decodebin2 ! autovideosink` it works perfectly.

It seems like camerabin should use decodebin2 for these cameras.
Comment 1 Stefan Sauer (gstreamer, gtkdoc dev) 2011-04-08 19:52:28 UTC
It simply does not make sense to:
1.) grab the picture
2.) let the camera encode it
3.) receive it from v4l2
4.) decode it in camerabin
5.) apply effect
6.) encode it again

also its not straight forward to have alternative signal paths to support a smart passthrough for the cases where no effect is selected (decoding still needed for the viewfinder).

The last time we discussed the consesus was to not support this usecase. Besides people can work-around the issue by using:
 LD_PRELOAD=/usr/lib/libv4l/v4l2convert.so my-app

Although I don't yet see why:
gst-launch camerabin video-source="v4l2src ! decodebin2" is not working.
Comment 2 Gabriel Burt 2011-04-08 20:01:47 UTC
I said that `gst-launch v4l2src ! decodebin2 ! autovideosink` works perfectly, I think you misunderstood.

I think it makes much more sense to support this, even if the quality isn't perfect, than to not support these cameras at all, which makes us look like Linux in 2001.
Comment 3 Gabriel Burt 2011-04-08 20:03:00 UTC
Oh, I misunderstood you about `gst-launch camerabin video-source="v4l2src ! decodebin2"` - that indeed does not work, I get:

ERROR: from element /GstCameraBin:camerabin0/GstBin:bin0/GstV4l2Src:v4l2src0: Internal data flow error
Comment 4 Olivier Crête 2011-04-08 20:03:58 UTC
Btw, we have a similar issue for video calls with cameras that can produce H.264.
Comment 5 Stefan Sauer (gstreamer, gtkdoc dev) 2011-04-08 20:29:46 UTC
I can confirm that the solution is to build with libv4l as a dependency.

zypper install libv4l-devel
rebuild gst-plugins-good

> ldd /usr/lib/gstreamer-0.10/libgstvideo4linux2.so | grep v4l
	libv4l2.so.0 => /usr/lib/libv4l2.so.0 (0xb756b000)
	libv4lconvert.so.0 => /usr/lib/libv4lconvert.so.0 (0xb71eb000)

gabriel, I am on suse too. Can you file a bug there please?
Comment 6 Bjørn Lie 2011-04-12 22:30:38 UTC
cam ID 046d:0809 Logitech, Inc. Webcam Pro 9000

When gst-plugins-good is built with libv4l-devel my cam that does not need the libv4lconvert, is applied also for me. Producing 
libv4lconvert: warning more framesizes then I can handle! as an errormsg.

atm gst-launch camerabin will actually kill X  - but I think that is a driverbug thats beeing exposed. ( I'll look into this further)


libv4lconvert: warning more framesizes then I can handle!
libv4lconvert: warning more framesizes then I can handle!
XCAP error: Unauthorized
Advarsel fra vindushåndterer: Received a _NET_WM_MOVERESIZE message for 0x2600021 (Ekiga); these messages lack timestamps and therefore suck.
libv4lconvert: warning more framesizes then I can handle!
libv4lconvert: warning more framesizes then I can handle!
Advarsel fra vindushåndterer: Log level 16: invalid (NULL) pointer instance
Advarsel fra vindushåndterer: Log level 8: g_signal_handlers_disconnect_matched: assertion `G_TYPE_CHECK_INSTANCE (instance)' failed
Advarsel fra vindushåndterer: Log level 8: g_object_unref: assertion `G_IS_OBJECT (object)' failed
Advarsel fra vindushåndterer: Log level 16: invalid (NULL) pointer instance
Advarsel fra vindushåndterer: Log level 8: g_signal_handlers_disconnect_matched: assertion `G_TYPE_CHECK_INSTANCE (instance)' failed
Advarsel fra vindushåndterer: Log level 8: g_object_unref: assertion `G_IS_OBJECT (object)' failed
libv4lconvert: warning more framesizes then I can handle!
libv4lconvert: warning more framesizes then I can handle!
libv4l2: error setting pixformat: Enheten eller ressursen opptatt
Inconsistency detected by ld.so: dl-close.c: 741: _dl_close: Assertion `map->l_init_called' failed!

(gnome-shell:3701): Clutter-CRITICAL **: clutter_actor_queue_relayout: assertion `CLUTTER_IS_ACTOR (self)' failed
libv4lconvert: warning more framesizes then I can handle!
libv4lconvert: warning more framesizes then I can handle!
XCAP error: Unauthorized
libv4lconvert: warning more framesizes then I can handle!
libv4lconvert: warning more framesizes then I can handle!
libv4lconvert: warning more framesizes then I can handle!
libv4lconvert: warning more framesizes then I can handle!
libv4lconvert: warning more framesizes then I can handle!
libv4lconvert: warning more framesizes then I can handle!
libv4l2: error setting pixformat: Enheten eller ressursen opptatt
Inconsistency detected by ld.so: dl-close.c: 741: _dl_close: Assertion `map->l_init_called' failed!

(gnome-shell:3701): Clutter-CRITICAL **: clutter_actor_queue_relayout: assertion `CLUTTER_IS_ACTOR (self)' failed
libv4lconvert: warning more framesizes then I can handle!
libv4lconvert: warning more framesizes then I can handle!
XCAP error: Unauthorized
libv4lconvert: warning more framesizes then I can handle!
libv4lconvert: warning more framesizes then I can handle!
libv4lconvert: warning more framesizes then I can handle!
libv4lconvert: warning more framesizes then I can handle!
libv4lconvert: warning more framesizes then I can handle!
libv4lconvert: warning more framesizes then I can handle!
libv4lconvert: warning more framesizes then I can handle!
libv4lconvert: warning more framesizes then I can handle!
libv4l2: error setting pixformat: Enheten eller ressursen opptatt
libv4l2: error dequeuing buf: Ingen slik enhet
libv4l2: error dequeuing buf: Ingen slik enhet
libv4l2: error dequeuing buf: Ingen slik enhet
libv4l2: error dequeuing buf: Ingen slik enhet
libv4l2: error dequeuing buf: Ingen slik enhet
libv4l2: error dequeuing buf: Ingen slik enhet
libv4l2: error dequeuing buf: Ingen slik enhet
libv4l2: error dequeuing buf: Ingen slik enhet
libv4l2: error dequeuing buf: Ingen slik enhet
libv4l2: error dequeuing buf: Ingen slik enhet
libv4l2: error dequeuing buf: Ingen slik enhet
libv4l2: error dequeuing buf: Ingen slik enhet
libv4l2: error dequeuing buf: Ingen slik enhet
libv4l2: error dequeuing buf: Ingen slik enhet
libv4l2: error dequeuing buf: Ingen slik enhet
libv4l2: error dequeuing buf: Ingen slik enhet
libv4l2: error dequeuing buf: Ingen slik enhet
libv4l2: error dequeuing buf: Ingen slik enhet
libv4l2: error dequeuing buf: Ingen slik enhet
libv4l2: error dequeuing buf: Ingen slik enhet
libv4l2: error dequeuing buf: Ingen slik enhet
libv4l2: error dequeuing buf: Ingen slik enhet
libv4l2: error dequeuing buf: Ingen slik enhet
libv4l2: error dequeuing buf: Ingen slik enhet
libv4l2: error dequeuing buf: Ingen slik enhet
libv4l2: error dequeuing buf: Ingen slik enhet
libv4l2: error dequeuing buf: Ingen slik enhet
libv4l2: error dequeuing buf: Ingen slik enhet
libv4l2: error dequeuing buf: Ingen slik enhet
libv4l2: error dequeuing buf: Ingen slik enhet
libv4l2: error dequeuing buf: Ingen slik enhet
libv4l2: error dequeuing buf: Ingen slik enhet
libv4l2: error dequeuing buf: Ingen slik enhet
libv4l2: error dequeuing buf: Ingen slik enhet
libv4l2: error dequeuing buf: Ingen slik enhet
libv4l2: error dequeuing buf: Ingen slik enhet
libv4l2: error dequeuing buf: Ingen slik enhet
libv4l2: error dequeuing buf: Ingen slik enhet
libv4l2: error dequeuing buf: Ingen slik enhet
libv4l2: error dequeuing buf: Ingen slik enhet
libv4l2: error dequeuing buf: Ingen slik enhet
libv4l2: error dequeuing buf: Ingen slik enhet
libv4l2: error dequeuing buf: Ingen slik enhet
libv4l2: error dequeuing buf: Ingen slik enhet
libv4l2: error dequeuing buf: Ingen slik enhet
libv4l2: error dequeuing buf: Ingen slik enhet
libv4l2: error dequeuing buf: Ingen slik enhet
libv4l2: error dequeuing buf: Ingen slik enhet
libv4l2: error dequeuing buf: Ingen slik enhet
libv4l2: error dequeuing buf: Ingen slik enhet
libv4l2: error dequeuing buf: Ingen slik enhet
Inconsistency detected by ld.so: dl-close.c: 741: _dl_close: Assertion `map->l_init_called' failed!

(gnome-shell:3701): Clutter-CRITICAL **: clutter_actor_queue_relayout: assertion `CLUTTER_IS_ACTOR (self)' failed

** (gnome-settings-daemon:3671): WARNING **: Connection failed, reconnecting...

(gnome-shell:3701): Gvc-WARNING **: Connection failed, reconnecting...

(gnome-settings-daemon:3671): media-keys-plugin-WARNING **: Unable to get default sink
libv4lconvert: warning more framesizes then I can handle!
libv4lconvert: warning more framesizes then I can handle!
XCAP error: Unauthorized
libv4lconvert: warning more framesizes then I can handle!
libv4lconvert: warning more framesizes then I can handle!
libv4lconvert: warning more framesizes then I can handle!
libv4lconvert: warning more framesizes then I can handle!
libv4lconvert: warning more framesizes then I can handle!
libv4lconvert: warning more framesizes then I can handle!
libv4l2: error setting pixformat: Enheten eller ressursen opptatt
Advarsel fra vindushåndterer: Received a _NET_WM_MOVERESIZE message for 0x3200021 (Ekiga); these messages lack timestamps and therefore suck.
warning: The echo canceller started acting funny and got slapped (reset). It swears it will behave now.
Inconsistency detected by ld.so: dl-close.c: 741: _dl_close: Assertion `map->l_init_called' failed!

(gnome-shell:3701): Clutter-CRITICAL **: clutter_actor_queue_relayout: assertion `CLUTTER_IS_ACTOR (self)' failed
Gtk-Message: Failed to load module "pk-gtk-module": libpk-gtk-module.so: cannot open shared object file: Ingen slik fil eller filkatalog

(gnome-shell:3701): St-CRITICAL **: _st_paint_shadow_with_opacity: assertion `shadow_spec != NULL' failed
Advarsel fra vindushåndterer: Received a _NET_WM_MOVERESIZE message for 0x3600003 (f-secure-s); these messages lack timestamps and therefore suck.

(evolution:8521): GLib-WARNING **: GError set over the top of a previous GError or uninitialized memory.
This indicates a bug in someone's code. You must ensure an error is NULL before it's set.
The overwriting error message was: Operasjonen ble avbrutt
Advarsel fra vindushåndterer: Received a _NET_WM_MOVERESIZE message for 0xc00016 (Bugs (329 ); these messages lack timestamps and therefore suck.
Gtk-Message: Failed to load module "pk-gtk-module": libpk-gtk-module.so: cannot open shared object file: Ingen slik fil eller filkatalog
Advarsel fra vindushåndterer: Buggy client sent a _NET_ACTIVE_WINDOW message with a timestamp of 0 for 0x3600007 (Kontaktlis)
Advarsel fra vindushåndterer: meta_window_activate called by a pager with a 0 timestamp; the pager needs to be fixed.

(gnome-shell:3701): Clutter-WARNING **: The actor 'ClutterGroup' is currently inside an allocation cycle; calling clutter_actor_queue_relayout() is not recommended
** (epiphany:13296): DEBUG: NP_Initialize
** (epiphany:13296): DEBUG: NP_Initialize succeeded
** (epiphany:13296): DEBUG: NP_Initialize
** (epiphany:13296): DEBUG: NP_Initialize succeeded
** (epiphany:13296): DEBUG: NP_Initialize
** (epiphany:13296): DEBUG: NP_Initialize succeeded
** (epiphany:13296): DEBUG: NP_Initialize
** (epiphany:13296): DEBUG: NP_Initialize succeeded
Comment 7 Gabriel Burt 2011-04-15 20:43:25 UTC
Bjørn, should probably file a new bug with this info/crash.  I see somebody mentioned it on gstreamer-devel last July too, but there wasn't any follow up.
Comment 8 Stefan Sauer (gstreamer, gtkdoc dev) 2011-04-18 21:51:57 UTC
Would be nice to get a backtrace for it. Also worth to check on linux-media list regarding "warning more framesizes then I can handle!" I sincerely hope libv4l-convert is not using any fixed array sizes.

Unfortunately I see no way to use libv4l-convert consitionally (except ld_preload'ing it).
Comment 9 Bjørn Lie 2011-04-24 11:05:35 UTC
(In reply to comment #3)
> Oh, I misunderstood you about `gst-launch camerabin video-source="v4l2src !
> decodebin2"` - that indeed does not work, I get:
> 
> ERROR: from element /GstCameraBin:camerabin0/GstBin:bin0/GstV4l2Src:v4l2src0:
> Internal data flow error

I get the same error if I use that string.

However if I use camerabin2 everything works as expected

bjolie@embla:~> gst-launch camerabin2 video-source="v4l2src ! decodebin2"
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock


( note the above command performed with gst-plugins-good built without libv4l-devel as a buildreq.)
Comment 10 Stefan Sauer (gstreamer, gtkdoc dev) 2011-04-25 19:06:10 UTC
(In reply to comment #9)
> (In reply to comment #3)
> > Oh, I misunderstood you about `gst-launch camerabin video-source="v4l2src !
> > decodebin2"` - that indeed does not work, I get:
> > 
> > ERROR: from element /GstCameraBin:camerabin0/GstBin:bin0/GstV4l2Src:v4l2src0:
> > Internal data flow error
> 
> I get the same error if I use that string.
> 
> However if I use camerabin2 everything works as expected
> 
> bjolie@embla:~> gst-launch camerabin2 video-source="v4l2src ! decodebin2"
> Setting pipeline to PAUSED ...
> Pipeline is live and does not need PREROLL ...
> Setting pipeline to PLAYING ...
> New clock: GstSystemClock
> 
> 
> ( note the above command performed with gst-plugins-good built without
> libv4l-devel as a buildreq.)

This is a different issue (that should be dealt with in a separate bug).