Now I come across the same thing. I use VLCJ for my project and it works great on Windows, Linux Mint, Linux Ubuntu and Mac OSX Lion. As you probably read, VLCJ is a java wrapper around libvlc that the VLC player also uses.
The fact is that when you open the option of capturing a VLC player, it fills the combo box with available cameras (with a USB connection). But this is what the VLC player does only for itself, it does not give you an API for this. And if you do not pass the camera ID to VLCJ, VLC will use the system camera by default. I use VLCJ to stream from USB-connected cameras or the desktop to a file.
I had to find a way to โscanโ USB cameras on my system, and this is something that depends on the OS.
In windows I use DirectShowJava .
On Linux, you just need to read / dev / video * for the available cameras, and if you want to display the user with a "convenient name", you can use video4linux4java
And the third, and the one that interests you the most, I have not tried it yet, but I will try with this: stack , example .
It would be better if libvlc would give this, since I do not need to use 3 more APIs (for 3 OS), and each of them can do what VLCJ can (only on this platform), and I use them just to read devices .
EDIT . The current official version of VLC is 1.1.x, and it has limited camera support on Mac. You can only work with the default Mac camera (iSight, FaceTime Built In) without sound. VLC 1.2.0 will be released very soon, and it will have much better Mac support (known about other connected cameras, desktop stream, audio). You can see my thread on the VideoLAN forum. I downloaded the VLC version for Mac version 1.2.0-git and it looks so cool and has a real โMac feelโ. You can download it from here . But keep in mind that this is a development version, and it drops a lot.
vale4674
source share