Serious video performance regression in cheese (2.28.1->2.30.1)

Bug #610600 reported by James Ferguson
104
This bug affects 18 people
Affects Status Importance Assigned to Milestone
Cheese
Fix Released
Critical
GStreamer
Fix Released
Undecided
Unassigned
OEM Priority Project
Won't Fix
High
Gary Ekker
Release Notes for Ubuntu
Fix Released
Undecided
Unassigned
cheese (Fedora)
Invalid
Medium
gstreamer0.10 (Ubuntu)
Won't Fix
High
Ubuntu Desktop
Nominated for Precise by James M. Leddy
Nominated for Quantal by James M. Leddy
Lucid
Won't Fix
High
Unassigned
Maverick
Won't Fix
High
Robert Ancell

Bug Description

Binary package hint: cheese

Ubuntu version: 10.04
Cheese version: 2.30.1
Hardware: Dell Latitude 2110 netbook - Intel Pinetrail CPU
Settings: minimum resolution - 160x120

Expected behavior: Start recording movie, recording starts promptly.

Actual behavior:

Screen is mostly frozen for ~14 seconds, and then recording appears to start tolerably. Karmic's (2.28.1) performance was pretty poor, but the delay was around 4 seconds.

To give the netbook a chance I set resolution to a minimum resolution. At higher resolutions, like 640x480, the machine just can't keep up at all.

This has been observed on other hardware, and on a Core2Duo machine this startup performance is still very bad (though not quite so bad). Other apps, and gstreamer from the command line, do not seem to suffer the same problems.

Revision history for this message
In , A. (a.-redhat-bugs) wrote :

Description of problem:
I have an asus eee 1000hd, with a built in webcam (according to kinfocenter it is from Vendor ID 0x4f2, Product ID 0xb071, Revision 15.44). The webcam works well (I used it recently for a video call with skype, under Fedora 10, and just recorded a clip under windows XP. It also worls well under cheese as long as the "start recording" button is not pressed). However, when attempting to record video with cheese, once the button "start recording" is pressed, the video display within the cheese window goes dark, and afterwards, as the image reappears, it seems to do one frame per minute or so, and barely records any audio, which is of a totally useless quality.

Version-Release number of selected component (if applicable):
$ rpm -q cheese
cheese-2.26.2-1.fc11.i586

How reproducible:
every time

Steps to Reproduce:
1.start cheese
2.click video
3.click start recording
4.see how it breaks down, as above
5.also, check the resulting recording, and see how there is no useful output, perhaps only two or three frames and some clicking audio

Actual results:
useless recording, as per point 5 above

Expected results:
a useful ogv recording with 30 frames per second video at the chosen resolution, and useful audio, all in a ogv file.

Additional info:
I read some of the other bug reports on cheese, but couldn't find one that matched my bug

Revision history for this message
In , A. (a.-redhat-bugs) wrote :

I just updated to rwahide's cheese, and while the problem is less severe, it is still very much present, and the resulting video is still useless. However, perhaps the developers are already onto improving something, which needs to be continued, as I can see *some* improvement.

Revision history for this message
In , A. (a.-redhat-bugs) wrote :

I just updated to Fedora 12, and I still get the same problem. Recording video with cheese is choppy and broken. I updated the distribution this bug relates to, to Fedora 12.

James Ferguson (jamesf)
Changed in oem-priority:
importance: Undecided → High
status: New → Confirmed
Revision history for this message
Robbie Williamson (robbiew) wrote :

I just downloaded and compiled 2.28.1 on Maverick and had the same poor performance that I get with 2.30.1, and I suspect the same will hold true for Lucid. This seems to indicate a regression in one of the packages cheese depends on.

Revision history for this message
Tony Espy (awe) wrote :

Robbie, we discussed this on a call with Dell this morning, and they commented that this really needs to be tested on a low-horsepower machine like a Dell Mini in order to see the difference between 2.28 and 2.30. Testing to date has been on 10.04 only.

Revision history for this message
Robbie Williamson (robbiew) wrote :

Tony, sure...I believe them. I was simply saying the performance sucks for me on 2.28 and 2.30...on a Thinkpad X301! So I can only imagine how much worse it is on a low horsepower machine. I wonder if this has anything to do with writing to an ext4 filesystem, as it only occurs when you start recording. It's either the filesystem, or how cheese is using v4l2.

Changed in cheese (Ubuntu):
status: New → Confirmed
importance: Undecided → High
Changed in cheese (Ubuntu Lucid):
status: New → Confirmed
importance: Undecided → High
Changed in cheese (Ubuntu Maverick):
assignee: nobody → Canonical Desktop Team (canonical-desktop-team)
Changed in cheese (Ubuntu Lucid):
assignee: nobody → Canonical Desktop Team (canonical-desktop-team)
summary: - Serious video performance regression 2.28.1->2.30.1
+ Serious video performance regression in cheese (2.28.1->2.30.1)
Revision history for this message
Sebastien Bacher (seb128) wrote :

Robert, could you try to figure what the issue is there?

Changed in cheese (Ubuntu Maverick):
assignee: Canonical Desktop Team (canonical-desktop-team) → Robert Ancell (robert-ancell)
Revision history for this message
Robert Ancell (robert-ancell) wrote :

Confirming the issue on my Dell mini.

Revision history for this message
Robert Ancell (robert-ancell) wrote :

Cheese is running a pipeline very similar to:
$ gst-launch-0.10 v4l2src ! theoraenc ! oggmux ! filesink location=test.ogg

Running this on my Dell mini and Studio laptop show very unreliable video being recorded.

It appears is the v4l component and/or the interaction with theoraenc that is the problem as a test signal encodes reliably:
$ gst-launch-0.10 videotestsrc ! theoraenc ! oggmux ! filesink location=test.ogg

Revision history for this message
Sebastien Bacher (seb128) wrote :

Reassigning to gstreamer, we don't have anybody knowing gstreamer well in the team but upstream might have an idea on the issue

affects: cheese (Ubuntu Lucid) → gstreamer0.10 (Ubuntu Lucid)
Revision history for this message
Sebastien Bacher (seb128) wrote :

slomo (debian maintainer) said on it that it might be fixed with latest good release, "v4l2src had a bug since many release, that made it prefer color format conversion over the native format of the camera"

Revision history for this message
Sebastien Bacher (seb128) wrote :

the new gstreamer has been uploaded to maverick, I can test the difference though since cheese has stopped detecting my webcam some days ago in maverick for some reason, could somebody try with the update?

Revision history for this message
Robbie Williamson (robbiew) wrote :

just updated and no change in behavior seen with cheese...still poor video recording.

Revision history for this message
Robbie Williamson (robbiew) wrote :

ftr, this was tested on a Thinkpad X301 with built-in webcam.

Revision history for this message
Robert Ancell (robert-ancell) wrote :
Changed in cheese:
status: Unknown → Confirmed
Changed in oem-priority:
assignee: nobody → Canonical Platform QA Team (canonical-platform-qa)
Changed in oem-priority:
assignee: Canonical Platform QA Team (canonical-platform-qa) → nobody
Changed in oem-priority:
assignee: nobody → Canonical Platform QA Team (canonical-platform-qa)
Revision history for this message
Rick Spencer (rick-rickspencer3) wrote :

Last night we confirmed this issue and a Dell mini 10v running Lucid as well as on Maverick. An update to cheese yesterday seems to have ameliorated the issue on my Maverick Desktop though.

Revision history for this message
Robert Ancell (robert-ancell) wrote :

The update shows the following results on my Dell mini:

At resolution 160x120:
- Pause of about 4s where no video is displayed
- Between 4-7s erratic frame rate
- 7s+ reliable video

At 1280x1024
- Occasionally frame shown (>15s per frame)

It seems an improvement on the 14s delay previously seen. Note that in both cases <100% of CPU is being used.

Revision history for this message
Robert Ancell (robert-ancell) wrote :

As a comparison I switched out the vorbis/theora codec and replaced it MP3/MPEG - the performance was even worse.

Revision history for this message
Robert Ancell (robert-ancell) wrote :

Taking out the videorate and videoscale components both of which should not be doing anything I don't think (i.e. the rate and resolution from the camera is fine) makes the video work faster. These elements have not changed from cheese 2.28.1 indicating a possible GStreamer problem. Removing these elements may not work on differing hardware?

Changed in oem-priority:
assignee: Canonical Platform QA Team (canonical-platform-qa) → nobody
Revision history for this message
Rick Spencer (rick-rickspencer3) wrote :

I don't see this getting fixed for Maverick, though it is a very unfortunate situation. For natty, we may need to change the system to first capture video without any encoding, and then encode it after the fact (rather than do it on the fly as cheese tries to now).

Changed in gstreamer0.10 (Ubuntu Maverick):
status: Confirmed → Won't Fix
Changed in gstreamer0.10 (Ubuntu Lucid):
status: Confirmed → Won't Fix
status: Won't Fix → Confirmed
Changed in cheese:
importance: Unknown → Critical
Revision history for this message
In , Adam (adam-redhat-bugs) wrote :

closing as a dupe of the newer bug more informative 572169.

*** This bug has been marked as a duplicate of bug 572169 ***

Changed in ubuntu-release-notes:
status: New → In Progress
Changed in ubuntu-release-notes:
status: In Progress → Fix Released
Revision history for this message
andeyejah (andrewclarke12000) wrote :

My cheese is buggy as well im on an acer 8930g no sound and rubbish video quality very slow .I uninstalled it.

Revision history for this message
Yves Dorfsman (dorfsmay) wrote :

Same issue on a Thinkpad T60.

Changed in gstreamer0.10 (Ubuntu):
assignee: Robert Ancell (robert-ancell) → Ubuntu Desktop (ubuntu-desktop)
Jamie Chang (jamie315)
tags: added: guandu
Jamie Chang (jamie315)
tags: removed: guandu
Revision history for this message
Shih-Yuan Lee (fourdollars) wrote :
Revision history for this message
Shih-Yuan Lee (fourdollars) wrote :

To lower video frame rate can get acceptable result.

<cmd>
gst-launch \
    autoaudiosrc ! queue ! audioconvert ! vorbisenc ! oggmux name=mux ! filesink location=webcam.ogv \
    v4l2src ! 'video/x-raw-yuv,width=640,height=480,framerate=5/1' ! tee name=webcam \
    webcam. ! queue ! timeoverlay ! xvimagesink \
    webcam. ! queue ! videorate ! theoraenc ! mux.
</cmd>

Test on Asus EeePC 1011PX.

Revision history for this message
Shih-Yuan Lee (fourdollars) wrote :

Test on Lenovo IdeaPad S10-3.

<cmd>
gst-launch \
                        autoaudiosrc ! queue ! audioconvert ! vorbisenc ! oggmux name=mux ! filesink location=webcam.ogv \
                        v4l2src ! videorate ! timeoverlay ! 'video/x-raw-yuv,width=320,height=240,framerate=15/1' ! tee name=webcam \
                        webcam. ! queue ! xvimagesink \
                        webcam. ! queue ! theoraenc ! mux.

</cmd>

<cmd>
gst-launch \
                        autoaudiosrc ! queue ! audioconvert ! vorbisenc ! oggmux name=mux ! filesink location=webcam.ogv \
                        v4l2src ! videorate ! timeoverlay ! 'video/x-raw-yuv,width=640,height=480,framerate=5/1' ! tee name=webcam \
                        webcam. ! queue ! xvimagesink \
                        webcam. ! queue ! theoraenc ! mux.
</cmd>

Revision history for this message
Shih-Yuan Lee (fourdollars) wrote :

Comment #22 can also get acceptable result.
If I can integrate Comment #20 and Comment #22, it should fix cheese performance issue on Atom CPUs.

Revision history for this message
Shih-Yuan Lee (fourdollars) wrote :

Although reducing video frame rate can get acceptable result on Atom CPUs, it also affects the quality of video recording on other CPUs that they can get better quality originally.

Revision history for this message
Shih-Yuan Lee (fourdollars) wrote :

Comment #22 can also get acceptable result on Asus EeePC 1011PX.

Revision history for this message
Shih-Yuan Lee (fourdollars) wrote :

http://paste.ubuntu.com/688909/ check_atom_cpu() can be used to check Intel ATOM CPU.

Revision history for this message
Shih-Yuan Lee (fourdollars) wrote :

bzr commit -m "Checking Intel ATOM CPU to determine video frame rate. (LP: #610600)" --fixes lp:610600 # Committed revision 61.
bzr push lp:~fourdollars/cheese/bug-610600/ # Pushed up to revision 61.
dput ppa:fourdollars/cheese cheese_2.32.0-0ubuntu2.1~natty3_source.changes

Revision history for this message
Goyo (goyodiaz) wrote :

This seems to be fixed in oneiric. I get an aceptable performance now.

Revision history for this message
Martin Pitt (pitti) wrote :

Thanks for reporting back. Closing.

Changed in gstreamer0.10 (Ubuntu):
status: Confirmed → Fix Released
Changed in gstreamer:
status: New → Fix Released
Revision history for this message
Frederik Elwert (frederik-elwert) wrote :

I can *not* confirm that his is fixed. I still have very poor video performance when recording from my webcam with Oneiric on an HP 625. The symptoms are the same as in the original description. First, a freeze of some seconds, and the recorded video is unusable.

Revision history for this message
Martin Pitt (pitti) wrote :

OK, reopening.

Changed in gstreamer0.10 (Ubuntu):
status: Fix Released → Confirmed
Changed in oem-priority:
assignee: nobody → Ekkart (e-leschke)
Changed in oem-priority:
assignee: Ekkart (e-leschke) → Gary Ekker (gekker)
Changed in cheese:
status: Confirmed → Fix Released
Martin Pitt (pitti)
Changed in gstreamer0.10 (Ubuntu Lucid):
assignee: Canonical Desktop Team (canonical-desktop-team) → nobody
Revision history for this message
Rick Spencer (rick-rickspencer3) wrote :

Setting to "won't fix" because I don't think anyone is going to be backporting such changes.

Changed in gstreamer0.10 (Ubuntu Lucid):
status: Confirmed → Won't Fix
Changed in gstreamer0.10 (Ubuntu):
status: Confirmed → Won't Fix
Revision history for this message
James M. Leddy (jm-leddy) wrote :

I've confirmed that this is still an issue in Precise.

What happens is that cheese starts recording. Everything is good for about 5 seconds. Then an icon appears under the main webcam viewing thing and (I assume) cheese starts transcoding/flushing to disk. At this point everything gets really choppy, both in the eventual recording, and in the display.

Changed in oem-priority:
status: Confirmed → Won't Fix
Changed in cheese (Fedora):
importance: Unknown → Medium
status: Unknown → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.