720P video lagging, massive framedrops and out of sync

Bug #981803 reported by iGadget
28
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Cheese
Expired
Medium
OEM Priority Project
Fix Released
Medium
James M. Leddy
Precise
Fix Released
Medium
James M. Leddy
cheese (Ubuntu)
Fix Released
Undecided
Unassigned
Precise
Fix Released
Undecided
Unassigned
gst-plugins-bad0.10 (Ubuntu)
Fix Released
Undecided
Unassigned
Precise
Fix Released
Undecided
Unassigned

Bug Description

[ Impact ]

This affects the entire distribution, on any laptop with a camera. The default "camera app" doesn't work well on Ubuntu. Cheese takes up all most all cpu cycles, and even so the recorded video is choppy. This reflects poorly on Ubuntu as an OS

[ Test Case ]

* Record video with cheese. t
* Play back in Totem
* Notice how choppy it is

[ Regression Potential ]

Low: The patch just adds another profile to gstreamer that makes it a higher priority process, and then tells cheese to use that profile. It's just a configuration change. I have tested and the patches have the intended result, the video is smoother than before.

The side effect is that, on a fully loaded system, other processes will not be able to get cpu time as effectively. This should not be a problem because it's assumed that when you're recording the video, you won't be using other applications on your machine.

[ Original Report ]

When recording a video with Cheese with a 1280x720 resolution, the image is blurry whenever there is motion (this might be a webcam limitation) but after a few seconds there are also massive framedrops. This results in a jerky video at best, where the audio is at times completely out of sync with the video.

When scaling back to 640x480 (the next 'best' thing), things are smoother (at least there are no massive framedrops). But 640x480 is not widescreen and not even close to HD, making Cheese useless for my aim of being able to create quick-yet-good-enough-looking headshot videos for online use.

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: cheese 3.4.0-0ubuntu1
ProcVersionSignature: Ubuntu 3.2.0-23.36-generic 3.2.14
Uname: Linux 3.2.0-23-generic x86_64
ApportVersion: 2.0.1-0ubuntu3
Architecture: amd64
Date: Sat Apr 14 20:30:34 2012
EcryptfsInUse: Yes
ExecutablePath: /usr/bin/cheese
InstallationMedia: Ubuntu 12.04 LTS "Precise Pangolin" - Beta amd64 (20120328)
MachineType: Hewlett-Packard HP ProBook 6550b
ProcEnviron:
 PATH=(custom, no user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
RelatedPackageVersions:
 cheese 3.4.0-0ubuntu1
 cheese-common 3.4.0-0ubuntu1
SourcePackage: cheese
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 10/04/2010
dmi.bios.vendor: Hewlett-Packard
dmi.bios.version: 68CDE Ver. F.03
dmi.board.name: 146D
dmi.board.vendor: Hewlett-Packard
dmi.board.version: KBC Version 73.11
dmi.chassis.type: 10
dmi.chassis.vendor: Hewlett-Packard
dmi.modalias: dmi:bvnHewlett-Packard:bvr68CDEVer.F.03:bd10/04/2010:svnHewlett-Packard:pnHPProBook6550b:pvr:rvnHewlett-Packard:rn146D:rvrKBCVersion73.11:cvnHewlett-Packard:ct10:cvr:
dmi.product.name: HP ProBook 6550b
dmi.sys.vendor: Hewlett-Packar

Revision history for this message
iGadget (igadget) wrote :
Revision history for this message
Brendan_P (brendan-p) wrote :

Video recording is seriously compromised for me and any resolution above 640x480. Frame drops, choppy etc.

12.04, AMD64

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in cheese (Ubuntu):
status: New → Confirmed
Revision history for this message
fittzwing (fittzwing) wrote :

Video recording and video chat both are seriously compromised for me as well with the same symptoms. I'm not using Cheese, however, but see the exact same symptoms in normal webcam usage on Precise Pangolin 12.04, AMD64.

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

This is a patch for Cheese on Ubuntu 12.04.

Changed in gst-plugins-bad0.10 (Ubuntu):
status: New → Confirmed
Revision history for this message
Shih-Yuan Lee (fourdollars) wrote :

This is a patch for gst-plugins-bad0.10 on Ubuntu 12.04.

affects: gst-plugins-bad → cheese
Revision history for this message
Shih-Yuan Lee (fourdollars) wrote :

This issue should be able to be fixed by applying two patches above.
Please help to sponsor or review them, thanks.

Changed in oem-priority:
status: New → Incomplete
status: Incomplete → Confirmed
Revision history for this message
James M. Leddy (jm-leddy) wrote :

Hi fourdollars,

It would be a great help if you created a quantal and precise branch for this, as well as a precise ppa. After that's done, we can get the upload sponsored and move it into -proposed for verification.

tags: added: rls-q-incoming
Changed in oem-priority:
assignee: nobody → James M. Leddy (jm-leddy)
status: Confirmed → Triaged
Changed in oem-priority:
status: Triaged → Won't Fix
status: Won't Fix → Incomplete
importance: Undecided → Critical
importance: Critical → Medium
Changed in cheese:
importance: Unknown → Medium
status: Unknown → Expired
Iain Lane (laney)
Changed in gst-plugins-bad0.10 (Ubuntu):
status: Confirmed → In Progress
assignee: nobody → Iain Lane (laney)
Changed in cheese (Ubuntu):
status: Confirmed → In Progress
assignee: nobody → Iain Lane (laney)
status: In Progress → Fix Released
assignee: Iain Lane (laney) → nobody
Revision history for this message
Iain Lane (laney) wrote :

Looks like the Cheese part is already in the Quantal package. If you'd like a Precise SRU for this, then please fill out the bug description with the required information from https://wiki.ubuntu.com/StableReleaseUpdates and I can sponsor for you.

Thanks!

Changed in gst-plugins-bad0.10 (Ubuntu):
assignee: Iain Lane (laney) → nobody
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gst-plugins-bad0.10 - 0.10.22.3-2ubuntu3

---------------
gst-plugins-bad0.10 (0.10.22.3-2ubuntu3) quantal; urgency=low

  * Add patch cherrypicked from upstream commit 53735eaa to add a "realtime"
    profile to vp8. (LP: #981803)
  * Drop ltmain_as_needed patch and do this through dh-autoreconf.
 -- Iain Lane <email address hidden> Thu, 26 Jul 2012 11:36:49 +0100

Changed in gst-plugins-bad0.10 (Ubuntu):
status: In Progress → Fix Released
description: updated
Changed in gst-plugins-bad0.10 (Ubuntu Precise):
status: New → Confirmed
Revision history for this message
James M. Leddy (jm-leddy) wrote :
Revision history for this message
James M. Leddy (jm-leddy) wrote :

Hi Iain,

Thanks for targeting precise and agreeing to sponsor. I've attached two debdiffs against the precise version of the package, and put the sru justification in the bug description. Please let me know if there is anything else I can do to help move this SRU along. I've also subscribed ubuntu-sru and ubuntu-sponsors

Revision history for this message
James M. Leddy (jm-leddy) wrote :
Changed in cheese (Ubuntu Precise):
assignee: nobody → Iain Lane (laney)
Changed in gst-plugins-bad0.10 (Ubuntu Precise):
assignee: nobody → Iain Lane (laney)
Revision history for this message
Iain Lane (laney) wrote :

It turned out that shipping a file with that name in gst conflicted with a file in the transmageddon package with the same name. Would naming the preset file something else work?

Revision history for this message
Iain Lane (laney) wrote :

Also, don't forget to install the new file by adding it to the the debian/…install file (I can't remember the exact package name right now) :-)

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

Hi Iain & James,

Thanks for your help.
However 'speed=2' doesn't work properly on most low power ATOM processors.
'speed=7' works better, but it is not included in upstream.
Any idea?

Revision history for this message
Iain Lane (laney) wrote :

Can you file a bug with upstream to ask why they chose '2' instead of '7' and request the change? If there aren't any reasons against then we can have 7 in Ubuntu.

Revision history for this message
Shih-Yuan Lee (fourdollars) wrote :
Changed in cheese (Ubuntu Precise):
status: New → Confirmed
Revision history for this message
Iain Lane (laney) wrote :

No need to rename the file; I proposed a transmission SRU in bug #945987 that makes that obsolete. I'm going away tomorrow for the rest of the week but feel free to have someone else upload speed=7 to Quantal and then SRU this all.

Thanks for your persistence.

Revision history for this message
James M. Leddy (jm-leddy) wrote :

I've done a little research, and this is more complicated than I thought. First of all, all codecs are supposed to be shipping with their own presets:

> We define 3 quality level profiles, Quality Low,Quality Normal and Quality High. All codecs should define this.

http://gstreamer.freedesktop.org/wiki/PresetDesign

Even so, it looks like transmageddon is the default home for all of these profiles. The PresetDesign page has a few presets that are "canonical" that mirror those in transmageddon That means in order to get the best use of your gstreamer codecs on Ubuntu, you have to install transmageddon, which is counterintuitive and obscure.

Secondly, speed=7 doesn't even look like a valid value

> The "speed" property
>
> "speed" gint : Read / Write
>
> Speed.
>
> Allowed values: [0,2]
>
> Default value: 0

http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-bad-plugins/html/gst-plugins-bad-plugins-vp8enc.html#GstVP8Enc--speed

But if you look at the documentation from google, the values allowed for --rt (realtime) are [0-15].

http://www.webmproject.org/tools/encoder-parameters/#2-encode-quality-vs-speed

Based on what fourdollars said, 7 is probably an allowed value, just the gstreamer documentation is wrong.

Revision history for this message
James M. Leddy (jm-leddy) wrote :

Thanks for the help Iain, enjoy your time off.

Revision history for this message
Iain Lane (laney) wrote :

Transmageddon just ships them for its own use. They've acknowledged this in their latest release by moving their presets off to a private directory (the fix I'm trying to SRU to Precise). It's not right for other software to be relying on their settings. gstreamer is the right eventual home for sane defaults to live. So a good outcome of this bug would be us coming up with some sane distribution defaults for the vp8 preset that gstreamer can continue to ship for all software to rely on.

Revision history for this message
James M. Leddy (jm-leddy) wrote :

Just realized that in the other bug. I'm going to resubmit the patch for gstreamer with the right .install file.

Revision history for this message
James M. Leddy (jm-leddy) wrote :

I've attached a new patch, which has a proper modification to the .install file. Additionally, speed=7 as opposed to the upstream patch where speed=2. Please review.

Changed in oem-priority:
status: Incomplete → In Progress
Revision history for this message
James M. Leddy (jm-leddy) wrote :

We're still blocking on bug 945987.

Revision history for this message
Iain Lane (laney) wrote :

Both uploaded to precise-proposed unapproved. @ubuntu-sru, you probably don't want to release gst to -updates without transmageddon due to the new Conflicts (users will get their transmageddon removed by dpkg if the new one isn't available for them).

Changed in cheese (Ubuntu Precise):
assignee: Iain Lane (laney) → nobody
Changed in gst-plugins-bad0.10 (Ubuntu Precise):
assignee: Iain Lane (laney) → nobody
Revision history for this message
James Page (james-page) wrote :

Un-subscribing ubuntu-sponsors - please re-subscribe if any further sponsoring is required.

Revision history for this message
Brian Murray (brian-murray) wrote : Please test proposed package

Hello Matthijs, or anyone else affected,

Accepted gst-plugins-bad0.10 into precise-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/gst-plugins-bad0.10/0.10.22.3-2ubuntu2.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please change the bug tag from verification-needed to verification-done. If it does not, change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in gst-plugins-bad0.10 (Ubuntu Precise):
status: Confirmed → Fix Committed
tags: added: verification-needed
Changed in cheese (Ubuntu Precise):
status: Confirmed → Fix Committed
Revision history for this message
Brian Murray (brian-murray) wrote :

Hello Matthijs, or anyone else affected,

Accepted cheese into precise-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/cheese/3.4.1-0ubuntu2.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please change the bug tag from verification-needed to verification-done. If it does not, change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Revision history for this message
Alan Pope 🍺🐧🐱 πŸ¦„ (popey) wrote :

Much better!

tags: added: verification-done
removed: verification-needed
Revision history for this message
Brendan_P (brendan-p) wrote :

Better but not 100% for me.

Changed in oem-priority:
status: In Progress → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package cheese - 3.4.1-0ubuntu2.1

---------------
cheese (3.4.1-0ubuntu2.1) precise-proposed; urgency=low

  * Apply upstream commit e7f9908166b64c6755437b825eb010806c043d21 supplied by
    Shih-Yuan Lee (fourdollars) to use a realtime profile (if available) in
    order to produce smoother videos (LP: #981803)
 -- Iain Lane <email address hidden> Thu, 06 Sep 2012 13:47:21 +0100

Changed in cheese (Ubuntu Precise):
status: Fix Committed → Fix Released
Revision history for this message
Colin Watson (cjwatson) wrote : Update Released

The verification of this Stable Release Update has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regresssions.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gst-plugins-bad0.10 - 0.10.22.3-2ubuntu2.1

---------------
gst-plugins-bad0.10 (0.10.22.3-2ubuntu2.1) precise-proposed; urgency=low

  [ James M Leddy ]
  * Add patch cherrypicked from upstream commit 53735eaa to add a "realtime"
    profile to vp8. (LP: #981803)

  [ Iain Lane ]
  * Add Conflicts/Replaces on old versions of transmageddon which shipped a
    file with this name, to ensure that users are upgraded to versions without
    the conflict.
 -- James M Leddy <email address hidden> Thu, 06 Sep 2012 14:20:24 +0100

Changed in gst-plugins-bad0.10 (Ubuntu Precise):
status: Fix Committed → Fix Released
Revision history for this message
Brendan_P (brendan-p) wrote :

Not sure what to do now, should I open another bug report as this still affects me?

Changed in oem-priority:
status: Fix Committed → Fix Released
Revision history for this message
James M. Leddy (jm-leddy) wrote :

Hi Brendan,

We already have bug385344 for overall bad cheese performance. Please add your comments there. It should be noted that cheese is in the [universe] pocket, and while we're accepting patches and can backport changes from upstream, there isn't any dedicated person working on this at the moment.

Revision history for this message
Scott O'Nanski (s-onanski) wrote :

This is how I fixed my poor FPS in cheese, on Ubuntu 12.04;

1) sudo apt-get install guvcview;

2) Under image controls look for the drop-down menu item "Exposure, Auto" and select "Manual Mode";

                     "TAB" select the next option!!!

3) You should "TAB" select to the slider bar beneath "Exposure, Auto" labeled "Exposure (Absolute) - use your right arrow key to bump up the selection. Mine was set to "156" so I knocked it up to "157" then down to "155", and back again to "156". Now my exposure it fine, and I get a solid 30fps at 1280x720.

I'm not sure how or why this works, but it seems the exposure it set way too high or something.

Anyway, just quit out of guvcview and launch cheese. Everything should be working now. Or at least it did for me.

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.