Support 2 web-cams into Windows

225 views
Skip to first unread message

Dmitriy Zavodnikov

unread,
Oct 1, 2012, 9:46:44 AM10/1/12
to xuggle...@googlegroups.com
Hi!

I am try to use 2 web-cams on Windows machine and using example DisplayWebcamVideo.java. I use string

vfwcap 0

to get access to the first camera and

vfwcap 1

to get access to the second camera but get an error:

931 [main] ERROR org.ffmpeg - [vfwcap @ 0000000000262B20] Could not connect to device.
Exception in thread "main" java.lang.IllegalArgumentException: could not open file: 1; Error: No such device
    at DisplayWebcamVideo.main(DisplayWebcamVideo.java:126)
    at RunWebCams.main(RunWebCams.java:8)

When I call the same code on Linux machine using:

video4linux2 /dev/video0

and

video4linux2 /dev/video1

everything works fine!

What is a problem?

Dmitriy Zavodnikov

unread,
Oct 1, 2012, 11:02:38 AM10/1/12
to xuggle...@googlegroups.com
I found the reason of this error:

I run same access string on ffmpeg.exe and get the same error.

To correct access to web-camera on Windows you should run:

$ ffmpeg -list_devices true -f dshow -i dummy

And find NAMES of web-cameras (like this -i video="Logitech Webcam C100" or -i video="Logitech HD Webcam C270").

But now we get 2 problems:

1) This call don't working on Xuggler. Always called first camera. Can it be fixed?

2) How I can get names of all available cameras (analog $ ffmpeg -list_devices true -f dshow -i dummy)?


понедельник, 1 октября 2012 г., 19:46:44 UTC+6 пользователь Dmitriy Zavodnikov написал:
Reply all
Reply to author
Forward
0 new messages