ubuntu macbook camera

C++
sudo apt-get install git
sudo apt-get install curl xzcat cpio
git clone https://github.com/patjak/facetimehd-firmware.git
cd facetimehd-firmware
make
sudo make install
cd ..
sudo apt-get install kmod libssl-dev checkinstall
git clone https://github.com/patjak/bcwc_pcie.git
cd bcwc_pcie
make
sudo make install
sudo depmod
sudo modprobe -r bdc_pci
sudo modprobe facetimehd
sudo nano /etc/modules
**add line "facetimehd", write out (ctl+o) & close**
sudo apt-get install cheese

#There is a built in app called cheese webcam booth in Ubuntu 14.04. You can open it from launcher. It can be used to take photographs as well as videos.


Webcam Tools
Webcamoid	Full featured and multi-platform webcam suite with a simple interface
ZoneMinder	All-in-one security camera solution
Motion	V4L capture program supporting motion detection
Kerberos.io	Video surveillance solution
Clight	Webcam becomes light sensor
Cheese	Take pictures and videos from your webcam
Ekiga	VoIP and video conferencing application
Kamoso	Qt-based webcam utility
HasciiCam	ASCII cam streaming

Source

Also in C++: