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 619409 - Cheese video recording laggy [on netbooks]
Cheese video recording laggy [on netbooks]
Status: RESOLVED DUPLICATE of bug 564957
Product: cheese
Classification: Applications
Component: general
2.30.x
Other Linux
: Normal normal
: 2.28
Assigned To: Cheese Maintainer(s)
Cheese Maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2010-05-23 08:42 UTC by Vish
Modified: 2010-05-29 06:22 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Vish 2010-05-23 08:42:20 UTC
Bug first reported on lp:
https://bugs.launchpad.net/netbook-remix/+bug/385344

Summary:
When recording a video with cheese, the resulting video is extremely choppy, to the point where it drops more frames than it captures.

Steps to Reproduce:
1. Install OS from USB
2. Go through config
3. Open cheese, record a video
4. Notice very laggy video

Expected result:
Video is watchable

Actual result:
Video unwatchable

Output of
 GST_DEBUG=*cheese*:3 cheese -v 2>&1

0:00:00.587476420 [332m11449[00m  0x9bf0438 [32;01mINFO   [00m [00mcheese-device-monitor cheese-camera-device-monitor.c:231:cheese_camera_device_monitor_coldplug:[00m Probing devices with udev...
0:00:00.588640674 [332m11449[00m  0x9bf0438 [32;01mINFO   [00m [00mcheese-device-monitor cheese-camera-device-monitor.c:121:cheese_camera_device_monitor_added:[00m Checking udev device '/devices/pci0000:00/0000:00:1d.7/usb1/1-2/1-2:1.0/video4linux/video0'
0:00:00.588752141 [332m11449[00m  0x9bf0438 [32;01mINFO   [00m [00mcheese-device-monitor cheese-camera-device-monitor.c:138:cheese_camera_device_monitor_added:[00m Found device 04f2:04f2, getting capabilities...
0:00:00.672077892 [332m11449[00m  0x9bf0438 [32;01mINFO   [00m [00mcheese-camera-device cheese-camera-device.c:184:cheese_camera_device_add_format:[00m 640x480
0:00:00.673443987 [332m11449[00m  0x9bf0438 [32;01mINFO   [00m [00mcheese-camera-device cheese-camera-device.c:184:cheese_camera_device_add_format:[00m 352x288
0:00:00.673956833 [332m11449[00m  0x9bf0438 [32;01mINFO   [00m [00mcheese-camera-device cheese-camera-device.c:184:cheese_camera_device_add_format:[00m 320x240
0:00:00.674493842 [332m11449[00m  0x9bf0438 [32;01mINFO   [00m [00mcheese-camera-device cheese-camera-device.c:184:cheese_camera_device_add_format:[00m 176x144
0:00:00.675348839 [332m11449[00m  0x9bf0438 [32;01mINFO   [00m [00mcheese-camera-device cheese-camera-device.c:184:cheese_camera_device_add_format:[00m 160x120
0:00:05.852946826 [332m11449[00m  0x9bf0438 [32;01mINFO   [00m [00mcheese-camera-device cheese-camera-device.c:609:cheese_camera_device_get_caps_for_format:[00m Getting caps for 0x0
0:00:05.854215284 [332m11449[00m  0x9bf0438 [32;01mINFO   [00m [00mcheese-camera-device cheese-camera-device.c:632:cheese_camera_device_get_caps_for_format:[00m Got EMPTY
0:00:05.854815988 [332m11449[00m  0x9bf0438 [32;01mINFO   [00m [00mcheese-camera-device cheese-camera-device.c:595:cheese_camera_device_get_best_format:[00m 640x480
0:00:05.855218903 [332m11449[00m  0x9bf0438 [32;01mINFO   [00m [00mcheese-camera-device cheese-camera-device.c:609:cheese_camera_device_get_caps_for_format:[00m Getting caps for 640x480
0:00:05.855909423 [332m11449[00m  0x9bf0438 [32;01mINFO   [00m [00mcheese-camera-device cheese-camera-device.c:632:cheese_camera_device_get_caps_for_format:[00m Got video/x-raw-rgb, width=(int)640, height=(int)480, bpp=(int)24, depth=(int)24, red_mask=(int)255, green_mask=(int)65280, blue_mask=(int)16711680, endianness=(int)4321, framerate=(fraction){ 30/1, 20/1, 10/1 }; video/x-raw-rgb, width=(int)640, height=(int)480, bpp=(int)24, depth=(int)24, red_mask=(int)16711680, green_mask=(int)65280, blue_mask=(int)255, endianness=(int)4321, framerate=(fraction){ 30/1, 20/1, 10/1 }; video/x-raw-yuv, width=(int)640, height=(int)480, format=(fourcc)YV12, framerate=(fraction){ 30/1, 20/1, 10/1 }; video/x-raw-yuv, width=(int)640, height=(int)480, format=(fourcc)I420, framerate=(fraction){ 30/1, 20/1, 10/1 }; video/x-raw-yuv, width=(int)640, height=(int)480, format=(fourcc)YUY2, framerate=(fraction){ 30/1, 20/1, 10/1 }
0:00:23.558486984 [332m11449[00m  0x995e078 [32;01mINFO   [00m [00mcheese-camera-device cheese-camera-device.c:609:cheese_camera_device_get_caps_for_format:[00m Getting caps for 640x480
0:00:23.559501847 [332m11449[00m  0x995e078 [32;01mINFO   [00m [00mcheese-camera-device cheese-camera-device.c:632:cheese_camera_device_get_caps_for_format:[00m Got video/x-raw-rgb, width=(int)640, height=(int)480, bpp=(int)24, depth=(int)24, red_mask=(int)255, green_mask=(int)65280, blue_mask=(int)16711680, endianness=(int)4321, framerate=(fraction){ 30/1, 20/1, 10/1 }; video/x-raw-rgb, width=(int)640, height=(int)480, bpp=(int)24, depth=(int)24, red_mask=(int)16711680, green_mask=(int)65280, blue_mask=(int)255, endianness=(int)4321, framerate=(fraction){ 30/1, 20/1, 10/1 }; video/x-raw-yuv, width=(int)640, height=(int)480, format=(fourcc)YV12, framerate=(fraction){ 30/1, 20/1, 10/1 }; video/x-raw-yuv, width=(int)640, height=(int)480, format=(fourcc)I420, framerate=(fraction){ 30/1, 20/1, 10/1 }; video/x-raw-yuv, width=(int)640, height=(int)480, format=(fourcc)YUY2, framerate=(fraction){ 30/1, 20/1, 10/1 }
0:01:54.459528523 [332m11449[00m  0x995e078 [33;01mWARN   [00m [00m       cheese-camera cheese-camera.c:869:cheese_camera_force_stop_video_recording:[00m Cannot cleanly shutdown recording pipeline, forcing
0:01:55.830819644 [332m11449[00m  0x995e078 [32;01mINFO   [00m [00mcheese-camera-device cheese-camera-device.c:609:cheese_camera_device_get_caps_for_format:[00m Getting caps for 640x480
0:01:55.831147968 [332m11449[00m  0x995e078 [32;01mINFO   [00m [00mcheese-camera-device cheese-camera-device.c:632:cheese_camera_device_get_caps_for_format:[00m Got video/x-raw-rgb, width=(int)640, height=(int)480, bpp=(int)24, depth=(int)24, red_mask=(int)255, green_mask=(int)65280, blue_mask=(int)16711680, endianness=(int)4321, framerate=(fraction){ 30/1, 20/1, 10/1 }; video/x-raw-rgb, width=(int)640, height=(int)480, bpp=(int)24, depth=(int)24, red_mask=(int)16711680, green_mask=(int)65280, blue_mask=(int)255, endianness=(int)4321, framerate=(fraction){ 30/1, 20/1, 10/1 }; video/x-raw-yuv, width=(int)640, height=(int)480, format=(fourcc)YV12, framerate=(fraction){ 30/1, 20/1, 10/1 }; video/x-raw-yuv, width=(int)640, height=(int)480, format=(fourcc)I420, framerate=(fraction){ 30/1, 20/1, 10/1 }; video/x-raw-yuv, width=(int)640, height=(int)480, format=(fourcc)YUY2, framerate=(fraction){ 30/1, 20/1, 10/1 }
Cheese 2.30.1 
received 1 items to delete


Other information:
lsusb : http://launchpadlibrarian.net/48521215/Lsusb.txt

The issue can also be noticed due to 100% cpu usage just to display the video stream from the webcam in cheese's photo mode. I believe that the cause of the problem is the lack of hardware acceleration. Pixels are drawn on the screen using only the cpu instead of going through the regular display interface.
I'm able to play a 720p movies on my hardware (decoding+display), so why can't cheese display a low resolution video stream ?

Architecture: i386
DistroRelease: Ubuntu 10.04
MachineType: Acer, inc. Aspire 1690
Package: cheese 2.30.1-0ubuntu1
PackageArchitecture: i386
PccardctlIdent:
 Socket 0:
   no product info available
PccardctlStatus:
 Socket 0:
   no card
ProcCmdLine: root=UUID=7486395b-f8da-4ce7-868f-c18084dc81dc ro quiet splash
ProcEnviron:
 PATH=(custom, user)
 LANG=fr_FR.UTF-8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 2.6.32-22.33-generic 2.6.32.11+drm33.2
Tags: lucid
Uname: Linux 2.6.32-22-generic i686
UserGroups: adm admin audio cdrom dialout dip floppy fuse lpadmin plugdev pulse-access sambashare video
dmi.bios.date: 01/06/05
dmi.bios.vendor: Acer
dmi.bios.version: 3C11
dmi.board.name: Crane
dmi.board.vendor: Acer, Inc.
dmi.board.version: Not Applicable
dmi.chassis.asset.tag: No Asset Tag XXX
dmi.chassis.type: 1
dmi.chassis.vendor: , Inc.
dmi.chassis.version: N/A
dmi.modalias: dmi:bvnAcer:bvr3C11:bd01/06/05:svnAcer,inc.:pnAspire1690:pvrNotApplicable:rvnAcer,Inc.:rnCrane:rvrNotApplicable:cvn,Inc.:ct1:cvrN/A:
dmi.product.name: Aspire 1690
dmi.product.version: Not Applicable
dmi.sys.vendor: Acer, inc.
Comment 1 Vish 2010-05-23 08:45:40 UTC
Other hardwares mentioning the same problem:
Acer Aspire D250
Acer Aspire One
Dell Inspiron 9300
Dell Inspiron Mini 1011
Asus eeepc 1000he
Toshiba NB205
Comment 2 Filippo Argiolas 2010-05-23 09:47:11 UTC
(In reply to comment #0)
> Bug first reported on lp:
> https://bugs.launchpad.net/netbook-remix/+bug/385344
> 
> Summary:
> When recording a video with cheese, the resulting video is extremely choppy, to
> the point where it drops more frames than it captures.

This is a well known bug. Using a netbook for live video encoding is not really what they are meant to. We should anyway warn the user about dropped frames and tell him his cpu is not suited for this task. There is some promising work going on about this in bug https://bugzilla.gnome.org/show_bug.cgi?id=564957 (and I'm going to mark this bug as duplicate once you answer my following question).
By the way, we should experiment with the new VP8 codec, maybe at low bitrates give good results while being easier than theora on the cpu.

> The issue can also be noticed due to 100% cpu usage just to display the video
> stream from the webcam in cheese's photo mode. I believe that the cause of the
> problem is the lack of hardware acceleration. Pixels are drawn on the screen
> using only the cpu instead of going through the regular display interface.
> I'm able to play a 720p movies on my hardware (decoding+display), so why can't
> cheese display a low resolution video stream ?

Are we talking about video recording or video displaying? For the former see above. The latter is simply false. Cheese uses the video sink configured in gconf through gstreamer-properties. If it is set to XVideo it uses hardware acceleration, XImage doesn't. If the reporter sees 100% cpu with just displaying I guess he's either using the wrong video sink, or xvideo doesn't work (gpu driver issue), or the webcam uses some strange format quite difficult to decode.
Anyway I doubt he's really able to play 720p videos without any hardware acceleration for decoding with an atom netbook.
Comment 3 Filippo Argiolas 2010-05-23 10:02:10 UTC
> Anyway I doubt he's really able to play 720p videos without any hardware
> acceleration for decoding with an atom netbook.

Uh, apparently it's not an atom but a pentium m at 1,6 GHz with a radeon gpu. Not that it changes anything, but he's definitely not using xvideo.
Comment 4 Vish 2010-05-24 07:46:57 UTC
Comments from down stream:
"I can take good pictures, i can see perfectly when im using video, but when i press record, the image goes black (maybe is normal), 3s after, i can see the webcam for ~1s and freeze for 40s~1.2m and freeze again... show a picture again on 40s~1.2m and freeze... etc etc...

When im going to see the final video... i can hear a good audio, but with freezed images.

Strangly, i can record a good video with a ultra bad resolution (160x120), my webcam is 640x480."

Since this is a mention about the recording , marking it as a dup of bug 564957

*** This bug has been marked as a duplicate of bug 564957 ***
Comment 5 Max Herrera 2010-05-29 06:22:19 UTC
(In reply to comment #1)
> Other hardwares mentioning the same problem:
> Acer Aspire D250
> Acer Aspire One
> Dell Inspiron 9300
> Dell Inspiron Mini 1011
> Asus eeepc 1000he
> Toshiba NB205

and also Acer Aspire 5534 the same error, no record video, webcam take photo but no recording video, the video is freeze