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 722165 - Error playing video: libv4l2 and libjpeg frame decode failure
Error playing video: libv4l2 and libjpeg frame decode failure
Status: RESOLVED OBSOLETE
Product: cheese
Classification: Applications
Component: general
3.10.x
Other Linux
: Normal major
: ---
Assigned To: Cheese Maintainer(s)
Cheese Maintainer(s)
: 710703 729569 743689 747109 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2014-01-14 11:55 UTC by Claudio
Modified: 2020-11-12 07:12 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
huge log file tarball (1.08 MB, application/x-compressed-tar)
2014-01-14 18:42 UTC, Claudio
Details

Description Claudio 2014-01-14 11:55:59 UTC
How to reproduce:

1-plug in a logitech c170 webcam
2-start cheese

Cheese starts and gives a generic  error:

"There was an error playing video from the webcam"

If started from the terminal here's the output:

(cheese:2482): GStreamer-CRITICAL **: gst_bin_add: assertion 'GST_IS_ELEMENT (element)' failed

(cheese:2482): GLib-GObject-CRITICAL **: g_object_ref_sink: assertion 'G_IS_OBJECT (object)' failed

(cheese:2482): GStreamer-CRITICAL **: gst_bin_add: assertion 'GST_IS_ELEMENT (element)' failed

(cheese:2482): GLib-GObject-CRITICAL **: g_object_ref_sink: assertion 'G_IS_OBJECT (object)' failed

(cheese:2482): GStreamer-CRITICAL **: gst_bin_add: assertion 'GST_IS_ELEMENT (element)' failed

(cheese:2482): GLib-GObject-CRITICAL **: g_object_ref_sink: assertion 'G_IS_OBJECT (object)' failed

(cheese:2482): GStreamer-CRITICAL **: gst_bin_add: assertion 'GST_IS_ELEMENT (element)' failed

(cheese:2482): GLib-GObject-CRITICAL **: g_object_ref_sink: assertion 'G_IS_OBJECT (object)' failed

(cheese:2482): GStreamer-CRITICAL **: gst_bin_add: assertion 'GST_IS_ELEMENT (element)' failed

(cheese:2482): GLib-GObject-CRITICAL **: g_object_ref_sink: assertion 'G_IS_OBJECT (object)' failed

(cheese:2482): GStreamer-CRITICAL **: gst_bin_add: assertion 'GST_IS_ELEMENT (element)' failed

(cheese:2482): GLib-GObject-CRITICAL **: g_object_ref_sink: assertion 'G_IS_OBJECT (object)' failed

(cheese:2482): GStreamer-CRITICAL **: gst_bin_add: assertion 'GST_IS_ELEMENT (element)' failed

(cheese:2482): GLib-GObject-CRITICAL **: g_object_ref_sink: assertion 'G_IS_OBJECT (object)' failed

(cheese:2482): cheese-WARNING **: Missing element 'encodebin' - check your GStreamer installation.: gstcamerabin2.c(1861): gst_camera_bin_create_elements (): /GstCameraBin:camerabin

It has been tested across multiple distributions, it used to work fine on gnome 3.4 to 3.8 .
Comment 1 David King 2014-01-14 12:48:28 UTC
The Cheese warning at the end of the output is the most useful, and suggests that something is wrong with your GStreamer installation. Please paste the output of the command "gst-inspect-1.0 encodebin" into this bug report
Comment 2 Claudio 2014-01-14 18:13:15 UTC
I'd like to point out that this happens on archlinux, fedora 20 and opensuse 13.1 so I don't think it's a local or a distro  specific issue.

Currently I'm on fedora 20.

Here's the output:

Factory Details:
  Rank                     none (0)
  Long-name                Encoder Bin
  Klass                    Generic/Bin/Encoder
  Description              Convenience encoding/muxing element
  Author                   Edward Hervey <edward.hervey@collabora.co.uk>

Plugin Details:
  Name                     encoding
  Description              various encoding-related elements
  Filename                 /usr/lib64/gstreamer-1.0/libgstencodebin.so
  Version                  1.2.2
  License                  LGPL
  Source module            gst-plugins-base
  Source release date      2013-12-26
  Binary package           Fedora GStreamer-plugins-base package
  Origin URL               http://download.fedoraproject.org

GObject
 +----GInitiallyUnowned
       +----GstObject
             +----GstElement
                   +----GstBin
                         +----GstEncodeBin

Implemented Interfaces:
  GstChildProxy

Pad Templates:
  SRC template: 'src'
    Availability: Always
    Capabilities:
      ANY

  SINK template: 'video_%u'
    Availability: On request
      Has request_new_pad() function: gst_encode_bin_request_new_pad
    Capabilities:
      ANY

  SINK template: 'audio_%u'
    Availability: On request
      Has request_new_pad() function: gst_encode_bin_request_new_pad
    Capabilities:
      ANY

  SINK template: 'private_%u'
    Availability: On request
      Has request_new_pad() function: gst_encode_bin_request_new_pad
    Capabilities:
      ANY


Element Flags:
  no flags set

Bin Flags:
  no flags set

Element Implementation:
  Has change_state() function: gst_encode_bin_change_state

Element has no clocking capabilities.
Element has no indexing capabilities.
Element has no URI handling capabilities.

Pads:
  SRC: 'src'
    Implementation:
      Has getrangefunc(): gst_proxy_pad_getrange_default
      Has custom eventfunc(): gst_pad_event_default
      Has custom queryfunc(): gst_pad_query_default
      Has custom iterintlinkfunc(): gst_proxy_pad_iterate_internal_links_default
    Pad Template: 'src'

Element Properties:
  name                : The name of the object
                        flags: readable, writable
                        String. Default: "encodebin0"
  parent              : The parent of the object
                        flags: readable, writable
                        Object of type "GstObject"
  async-handling      : The bin will handle Asynchronous state changes
                        flags: readable, writable
                        Boolean. Default: false
  message-forward     : Forwards all children messages
                        flags: readable, writable
                        Boolean. Default: false
  profile             : The GstEncodingProfile to use
                        flags: readable, writable
                        Object of type "GstEncodingProfile"
  queue-buffers-max   : Max. number of buffers in the queue (0=disable)
                        flags: readable, writable
                        Unsigned Integer. Range: 0 - 4294967295 Default: 200 
  queue-bytes-max     : Max. amount of data in the queue (bytes, 0=disable)
                        flags: readable, writable
                        Unsigned Integer. Range: 0 - 4294967295 Default: 10485760 
  queue-time-max      : Max. amount of data in the queue (in ns, 0=disable)
                        flags: readable, writable
                        Unsigned Integer64. Range: 0 - 18446744073709551615 Default: 1000000000 
  audio-jitter-tolerance: Amount of timestamp jitter/imperfection to allow on audio streams before inserting/dropping samples (ns)
                        flags: readable, writable
                        Unsigned Integer64. Range: 0 - 18446744073709551615 Default: 20000000 
  avoid-reencoding    : Whether to re-encode portions of compatible video streams that lay on segment boundaries
                        flags: readable, writable
                        Boolean. Default: false
  flags               : Flags to control behaviour
                        flags: readable, writable
                        Flags "GstEncodeBinFlags" Default: 0x00000000, "(none)"
                           (0x00000001): no-audio-conversion - Do not use audio conversion elements
                           (0x00000002): no-video-conversion - Do not use video conversion elements

Element Actions:
  "request-pad" :  GstPad * user_function (GstElement* object,
                                           GstCaps* arg0);
  "request-profile-pad" :  GstPad * user_function (GstElement* object,
                                                   gchararray arg0);
Comment 3 David King 2014-01-14 18:19:35 UTC
Please run Cheese with GStreamer debuggin enabled, and attach the output, for example with:

GST_DEBUG=*:5 GST_DEBUG_NO_COLOR=1 cheese &> output.log
Comment 4 Claudio 2014-01-14 18:42:46 UTC
Created attachment 266290 [details]
huge log file tarball
Comment 5 Claudio 2014-01-14 18:44:17 UTC
I had to compress it, it was 18Mb of logs.
Comment 6 David King 2014-01-15 10:29:44 UTC
It seems like there were errors decoding JPEG data from the webcam:

libv4l2: error got 4 consecutive frame decode errors, last error: v4l-convert: libjpeg error: End Of Image

which then lead to lots of other errors. Can you try setting the camera resolution in Cheese to 640×480 and seeing whether it makes a difference?
Comment 7 Claudio 2014-01-15 11:05:18 UTC
Indeed it works fine with that resolution.
Comment 8 David King 2014-01-15 11:52:18 UTC
*** Bug 710703 has been marked as a duplicate of this bug. ***
Comment 9 David King 2014-05-05 14:54:35 UTC
*** Bug 729569 has been marked as a duplicate of this bug. ***
Comment 10 Yan Pashkovsky 2015-01-20 11:12:19 UTC
Comment on Launchpad by corradoventu "cheese same problem changing webcam resolution with internal webcam on HP620 and external philips vesta on ubuntu 14.04 amd 64.
works fine with 14.10 and 15.04 installed on same hardware different partitions.
note in 14.04 cheese preference lists many photo and video resolutions from 1600x1200 to 176x144 while in 14.10 and 15.04 resolutions listed are only these supported by the webcam."
I think new cheese fixes should be backported to older versions
Comment 11 David King 2015-01-29 12:34:06 UTC
*** Bug 743689 has been marked as a duplicate of this bug. ***
Comment 12 David King 2015-03-31 13:17:31 UTC
*** Bug 747109 has been marked as a duplicate of this bug. ***
Comment 13 Amir Mohammadi 2015-11-10 10:54:22 UTC
Hi, anyone having a video problem in Hangouts due to this bug can disable HD Video by clicking on the antenna icon in video Hangouts.
Comment 14 eldergabriel 2018-04-23 04:57:27 UTC
Wow, looks like this problem has been going on for some time now... tardy to the party, I guess. I encountered this problem for the first time just recently running cheese v.3.26.0 on a GNOME v.3.26.2 desktop.

Same as everyone else, cheese works fine with 640x480 resolution. Selecting any higher resolutions results briefly in a partial, but mostly garbled image in the cheese application window image display region, followed by a black/blank image display region containing only the "There was an error playing video from the webcam" error message.

The full text of the relevant error messages I get when launching cheese via terminal are as follows:

"libv4l2: error got 4 consecutive frame decode errors, last error: v4l-convert: libjpeg error: End Of Image

(cheese:5480): cheese-WARNING **: Failed to allocate a buffer: gstv4l2src.c(866): gst_v4l2src_create (): /GstCameraBin:camerabin/GstWrapperCameraBinSrc:camera_source/GstBin:bin35/GstV4l2Src:v4l2src1"

It seems to me that the problem originates in one or more software components that cheese uses and relies upon (gstreamer and/or v4l), and propagates up to the user's face.

FWIW, hardware that I'm seeing this with is a Lenovo EasyCamera built-in webcam with usb id = 13d3:5173, but I suspect that does not matter.

See also: https://bugzilla.redhat.com/show_bug.cgi?id=1560707

LMK if I can be of any help.
Comment 15 André Klapper 2020-11-12 07:12:17 UTC
bugzilla.gnome.org is being replaced by gitlab.gnome.org. We are closing all
old bug reports and feature requests in GNOME Bugzilla which have not seen
updates for a long time.

If you still use cheese and if you still see this bug / want this feature in a
recent and currently supported version, then please feel free to report it at
https://gitlab.gnome.org/GNOME/cheese/-/issues/

Thank you for creating this report and we are sorry it could not be implemented
(volunteer workforce and time is quite limited).