Search code examples
javamacoswebcamvideo-capturevlcj

Using VLCJ to capture video from camera on mac osx


Does anyone know how to specify the MRL for the default camera on mac osx (lion) in the call to mediaPlayerComponent.getMediaPlayer().playMedia(mrl)? For example I can do it under Windows and Linux using MRLs like dshow:// and v4l2:///dev/video0 as indicated in the CaptureTest sample at

http://code.google.com/p/vlcj/source/browse/trunk/vlcj/src/test/java/uk/co/caprica/vlcj/test/capture/CaptureTest.java

But there is no information on using this on osx. I am fairly new to this area of video capture, so please excuse me if I am not framing the question properly.

The answer post at Get webcam stream on Mac Os X in Java seems to indicate that it is possible. Thanks for any help.


Solution

  • For OSX lion use:

    String[] options= {"encoding etc"}; mediaPlayer.playMedia("qtcapture://", options)

    Link to where I found it: http://forum.videolan.org/viewtopic.php?f=12&t=89140&p=312840&hilit=qtcapture%3A%2F%2F#p312840