Linux UVC Bandwidth - jackspaceBerkeley/pupil GitHub Wiki

modify the UVC driver to run Pupil from a single USB controller

The default setting of the linux UVC driver strictly adheres to the camera dictated bandwidth requirements. For MJPEG compressed streams these are usually wrong. This patch introduces a more realistic estimation instead. This allows using multiple cameras on one USB controller.

sudo apt-get install patchutils libproc-processtable-perl git
git clone git://linuxtv.org/media_build.git 
cd media_build 
./build --main-git
cd media
wget https://gist.githubusercontent.com/mkassner/10134241/raw/5ea34a0269d5b4bc12ec3ee466238cf82000e29d/mjepg_bandwidth.patch
git apply --ignore-space-change --ignore-whitespace mjepg_bandwidth.patch  
cd ../
make -C v4l/
sudo make install
sudo rmmod uvcvideo
sudo make rmmod
sudo modprobe uvcvideo quirks=0x4040 jpg_compression=2
sudo sh -c 'echo "options uvcvideo quirks=0x4040 jpg_compression=2" > /etc/modprobe.d/pupil_uvc_cam.conf'

(jpg_compression=3 should work as well.)

##Linux Auto-Updates Disable Linux Auto Updates as they undo the patch!

##When the Patch does not work If this does not work for you. Specifically the patch application please raise an issue in the Pupil repository and we will update the patch to work with the latest version of the Linux Kernel Source.