简体   繁体   中英

Using Xuggler to detect Webcam with Java

I'm trying to use Xuggler library to handle webcam video stream in Java.

My project contains these files:

  • Xuggler Jar ( xuggle-xuggler-5.4.jar )
  • SLF4J Jars (required by Xuggler and downloadable here ):
    • jcl-over-slf4j-1.6.4.jar
    • jul-to-slf4j-1.6.4.jar
    • log4j-over-slf4j-1.6.4.jar
    • slf4j-api-1.6.4.jar
    • slf4j-ext-1.6.4.jar
    • slf4j-migrator-1.6.4.jar
    • slf4j-simple-1.6.4.jar
  • DisplayWebcamVideo.java as main class

I run the main method using "vfwcap" and "0" as arguments.
Application starts correctly, i can see myself from the webcam but it's just the first frame : the stream freezes and i see this output:

5022 [Thread-3] ERROR org.ffmpeg - [vfwcap @ 000000000039A320] real-time buffer 75% full! frame dropped!

5622 [Thread-3] ERROR org.ffmpeg - [vfwcap @ 000000000039A320] real-time buffer 85% full! frame dropped!

6522 [Thread-3] ERROR org.ffmpeg - [vfwcap @ 000000000039A320] real-time buffer 95% full! frame dropped!

6822 [Thread-3] ERROR org.ffmpeg - [vfwcap @ 000000000039A320] real-time buffer 101% full! frame dropped!

6822 [Thread-3] ERROR org.ffmpeg - [vfwcap @ 000000000039A320] real-time buffer 101% full! frame dropped!


What's the problem here? :(

通过将此作为主类来解决

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM