|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.xuggle.mediatool.demos.DisplayWebcamVideo
public class DisplayWebcamVideo
Using IMediaReader
, takes a FFMPEG device driver name (ex:
"video4linux2"), and a device name (ex: /dev/video0), and displays
video from that device. For example, a web camera.
For example, to play the default camera on these operating systems:
java -cp %XUGGLE_HOME%\share\java\jars\xuggle-xuggler.jar com.xuggle.mediatool.demos.DisplayWebcamVideo vfwcap 0
java -cp $XUGGLE_HOME/share/java/jars/xuggle-xuggler.jar com.xuggle.mediatool.demos.DisplayWebcamVideo video4linux2 /dev/video0
Constructor Summary | |
---|---|
DisplayWebcamVideo(String driverName,
String deviceName)
Construct a DisplayWebcamVideo which reads and plays a video from an attached webcam. |
Method Summary | |
---|---|
static void |
main(String[] args)
Takes a FFMPEG webcam driver name, and a device name, opens the webcam, and displays its video in a Swing window. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DisplayWebcamVideo(String driverName, String deviceName)
driverName
- the name of the webcan drivedeviceName
- the name of the webcan deviceMethod Detail |
---|
public static void main(String[] args)
Examples of device formats are:
OS | Driver Name | Sample Device Name |
Windows | vfwcap | 0 |
Linux | video4linux2 | /dev/video0 |
Webcam support is very limited; you can't query what devices are available, nor can you query what their capabilities are without actually opening the device. Sorry, but that's how FFMPEG rolls.
args
- Must contain two strings: a FFMPEG driver name and a
device name (which is dependent on the FFMPEG driver).
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |