Hi I just solved this, It was a permission problem, this is what I did:
To be sure that my webcam is taking photos with ffmpeg
enrique@ubilinux:~/workspaces$ ffmpeg -f video4linux2 -i /dev/v4l/by-id/usb-Microsoft_Microsoft®_LifeCam_HD-5000-video-index0 -vframes 1 test.jpeg
The ffmpeg program is only provided for script compatibility and will be removed
in a future release. It has been deprecated in the Libav project to allow for
incompatible command line syntax improvements in its replacement called avconv
(see Changelog for details). Please use avconv instead.
[video4linux2 @ 0x8c1a800] Cannot open video device /dev/v4l/by-id/usb-Microsoft_Microsoft®_LifeCam_HD-5000-video-index0 : Permission denied
/dev/v4l/by-id/usb-Microsoft_Microsoft®_LifeCam_HD-5000-video-index0: Permission denied
enrique@ubilinux:~/workspaces$ ls -l /dev/video0
crw-rw---T 1 root video 81, 0 Jun 30 15:17 /dev/video0
So, obviously It was a permission issue. So I added my user to video group:
enrique@ubilinux:~/workspaces$ sudo usermod -a -G video enrique
logout and login again, and thats all.