Can't produce data in UYVY

Bug #706039 reported by thiagoss
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
gst-plugins-good
Fix Released
High
iSight Firmware Tools
Confirmed
Undecided
Unassigned
Gentoo Linux
Expired
Medium
gst-plugins-good0.10 (Ubuntu)
Confirmed
Undecided
Unassigned
isight-firmware-tools (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

v4l-info shows that my isight supports UYVY format, but when trying to configure it on this format it doesn't produce any data.

The problem gets worse because this seems to be its preferred format, so gstreamer tries to use it and it fails.

gst-launch autovideosrc ! ffmpegcolorspace ! autovideosink

Using other formats work.

$ v4l-info

### v4l2 device info [/dev/video0] ###
general info
    VIDIOC_QUERYCAP
 driver : "uvcvideo"
 card : "Built-in iSight"
 bus_info : "usb-0000:00:1d.7-4"
 version : 0.1.0
 capabilities : 0x4000001 [VIDEO_CAPTURE,STREAMING]

standards

inputs
    VIDIOC_ENUMINPUT(0)
 index : 0
 name : "Camera 1"
 type : CAMERA
 audioset : 0
 tuner : 0
 std : 0x0 []
 status : 0x0 []

video capture
    VIDIOC_ENUM_FMT(0,VIDEO_CAPTURE)
 index : 0
 type : VIDEO_CAPTURE
 flags : 0
 description : "YUV 4:2:2 (UYVY)"
 pixelformat : 0x59565955 [UYVY]
    VIDIOC_G_FMT(VIDEO_CAPTURE)
 type : VIDEO_CAPTURE
 fmt.pix.width : 640
 fmt.pix.height : 480
 fmt.pix.pixelformat : 0x59565955 [UYVY]
 fmt.pix.field : NONE
 fmt.pix.bytesperline : 1280
 fmt.pix.sizeimage : 614400
 fmt.pix.colorspace : unknown
 fmt.pix.priv : 0

controls
    VIDIOC_QUERYCTRL(BASE+0)
 id : 9963776
 type : INTEGER
 name : "Brightness"
 minimum : 0
 maximum : 255
 step : 1
 default_value : 63
 flags : 0

### video4linux device info [/dev/video0] ###
general info
    VIDIOCGCAP
 name : "Built-in iSight"
 type : 0x1 [CAPTURE]
 channels : 1
 audios : 0
 maxwidth : 640
 maxheight : 480
 minwidth : 48
 minheight : 32

channels
    VIDIOCGCHAN(0)
 channel : 0
 name : "Camera 1"
 tuners : 0
 flags : 0x0 []
 type : CAMERA
 norm : 0

tuner
ioctl VIDIOCGTUNER: Invalid argument

audio
ioctl VIDIOCGAUDIO: Invalid argument

picture
    VIDIOCGPICT
 brightness : 16191
 hue : 0
 colour : 54613
 contrast : 0
 whiteness : 0
 depth : 16
 palette : UYVY

buffer
ioctl VIDIOCGFBUF: Invalid argument

window
    VIDIOCGWIN
 x : 0
 y : 0
 width : 640
 height : 480
 chromakey : 0
 flags : 0

Revision history for this message
thiagoss (thiagossantos) wrote :

By the way, this is on a Macbook 4,1

Revision history for this message
In , Eddy-n (eddy-n) wrote :
Download full text (5.7 KiB)

Gstreamer apps like Cheese (media-video/cheese) which uses v4l2src and ffmpegcolorspace in the pipeline are not working.

I know v4l2 is working right because I am using GUVCViewer (media-video/guvcview) without problems.

Reproducible: Always

Steps to Reproduce:
1. Install media-libs/gst-plugins-base-0.10.32 and media-plugins/gst-plugins-v4l2-0.10.28-r1
2. Open a terminal
3. Execute "gst-launch-0.10 -v v4l2src ! ffmpegcolorspace ! xvimagesink"

Actual Results:
No window is displayed.

Expected Results:
It should display a window with the capture from my camera.
Camera capture is shown if you remove ffmpegcolorspace part from the pipeline:
$ gst-launch-0.10 -v v4l2src ! xvimagesink
This works as expected.

Portage 2.1.9.46 (default/linux/x86/10.0/desktop/gnome, gcc-4.5.2, libc-0-r0, 2.6.38.4 i686)
=================================================================
System uname: Linux-2.6.38.4-i686-Genuine_Intel-R-_CPU_1600_@_2.16GHz-with-gentoo-2.0.2
Timestamp of tree: Tue, 26 Apr 2011 17:30:01 +0000
app-shells/bash: 4.2_p8
dev-java/java-config: 2.1.11-r3
dev-lang/python: 2.6.6-r2, 2.7.1-r1, 3.1.3-r1
dev-util/cmake: 2.8.4-r1
sys-apps/baselayout: 2.0.2
sys-apps/openrc: 0.8.2
sys-apps/sandbox: 2.5
sys-devel/autoconf: 2.13, 2.68
sys-devel/automake: 1.9.6-r3, 1.10.3, 1.11.1-r1
sys-devel/binutils: 2.21
sys-devel/gcc: 4.5.2
sys-devel/gcc-config: 1.4.1
sys-devel/libtool: 2.4-r1
sys-devel/make: 3.82
sys-kernel/linux-headers: 2.6.38
virtual/os-headers: 0
ACCEPT_KEYWORDS="x86 ~x86"
ACCEPT_LICENSE="* -@EULA"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.3/ext-active/ /etc/php/cgi-php5.3/ext-active/ /etc/php/cli-php5.3/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=native -O2 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests binpkg-logs distlocks fixlafiles fixpackages metadata-transfer news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS=""
GENTOO_MIRRORS="http://gentoo.netnitco.net"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/var/lib/layman/gnome /var/lib/layman/keruspe /var/lib/layman/x11 /var/lib/layman/java-overlay /usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X a52 aac aalib acl acpi aiglx alsa amr amrnb amrwb asf autoipd avahi avi bash-completion beagle berkdb bidi bitmap-fonts bittorrent blender-game bluetooth bonjour branding bzip2 cairo caps cdda cddb cdio cdparanoia...

Read more...

Revision history for this message
In , Eddy-n (eddy-n) wrote :

Created attachment 271291
gst-launch output

Output from
$ gst-launch-0.10 -v v4l2src ! ffmpegcolorspace ! xvimagesink

Revision history for this message
In , Leio-gentoo (leio-gentoo) wrote :

I can't reproduce on my system with my gspca webcam.

"WARNING: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Got unexpected frame size of 262529 instead of 614400." looks to be the suspect; perhaps xvimagesink could handle that mmap memory and ffmpegcolorspace not with your v4l2src chosen video caps or something of that sort.

Maybe the output of

GST_DEBUG=*:5,GST_REGISTRY:2 gst-launch-0.10 -v v4l2src num-buffers=1 ! ffmpegcolorspace ! xvimagesink

could get us further?

Revision history for this message
In , Eddy-n (eddy-n) wrote :

Created attachment 271495
Output using GST_DEBUG=*:5,GST_REGISTRY:2

I'm using a macbook pro with isight built-in camera.

Revision history for this message
Dave Vasilevsky (djvasi) wrote :

I'm seeing this too, running Ubuntu 11.04 or Fedora 15 on a MacBook4,1

Changed in gentoo:
importance: Unknown → Medium
status: Unknown → New
Revision history for this message
Dave Vasilevsky (djvasi) wrote :

I believe this is caused by a bug in video4linux: https://bugzilla.kernel.org/show_bug.cgi?id=36152

Revision history for this message
In , filmor (filmor-gentoo-bugs) wrote :

I also have this problem on a Macbook 1,1. Substituting ffmpegcolorspace by videoscale gives the same results. According to the Ubuntu Bugtracker this is a kernel bug:

https://bugzilla.kernel.org/show_bug.cgi?id=36152

Does anyone have a kernel where this setup actually works? Mine is 2.6.39.

Changed in isight-firmware-tools:
status: New → Confirmed
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

Changed in isight-firmware-tools (Ubuntu):
status: New → Confirmed
Revision history for this message
Steffen Röcker (sroecker) wrote :

Camera works in cheese with the patches for gst-plugins-good.

Changed in gst-plugins-good0.10 (Ubuntu):
status: New → Confirmed
Changed in gst-plugins-good:
importance: Unknown → High
status: Unknown → Fix Released
Revision history for this message
Steffen Röcker (sroecker) wrote :

Strange, it only works if I apply both patches.
I've uploaded a fixed version to my PPA (https://launchpad.net/~sroecker/+archive/oneiric).

Revision history for this message
In , leio (leio-gentoo-bugs) wrote :

gstreamer 0.10 has been finally removed from the tree. If this is an issue with the 1.0 series too, please file a new bug against that version.

Changed in gentoo:
status: New → Expired
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.