Bonjour,

Je désire réaliser un programme simple en JAVA qui en cliquant sur un bouton, la webcam s'active, prends une photo et l'affiche!
Après quelques recherches sur Internet, j'ai installé le Framework JMF avec succès et j'ai utilisé un code trouvé sur internet qui semble correct :

http://www.fobec.com/java/1068/prend...ne-webcam.html


Cependant j'ai la fameuse erreur " Cannot find a Player for :vfw://0 " , donc ça détecte pas ma webcam intégrée, et en lançant JMSTUDIO j'ai bien

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
Name = vfw:Microsoft WDM Image Capture (Win32):0
 
Locator = vfw://0
 
Output Formats---->
 
0. javax.media.format.YUVFormat
  YUV Video Format: Size = java.awt.Dimension[width=640,height=400] MaxDataLength = 512000 DataType = class [B yuvType = 32 StrideY = 1280 StrideUV = 1280 OffsetY = 0 OffsetU = 1 OffsetV = 3
 
1. javax.media.format.YUVFormat
  YUV Video Format: Size = java.awt.Dimension[width=160,height=120] MaxDataLength = 38400 DataType = class [B yuvType = 32 StrideY = 320 StrideUV = 320 OffsetY = 0 OffsetU = 1 OffsetV = 3
 
2. javax.media.format.YUVFormat
  YUV Video Format: Size = java.awt.Dimension[width=320,height=240] MaxDataLength = 153600 DataType = class [B yuvType = 32 StrideY = 640 StrideUV = 640 OffsetY = 0 OffsetU = 1 OffsetV = 3
 
3. javax.media.format.YUVFormat
  YUV Video Format: Size = java.awt.Dimension[width=640,height=480] MaxDataLength = 614400 DataType = class [B yuvType = 32 StrideY = 1280 StrideUV = 1280 OffsetY = 0 OffsetU = 1 OffsetV = 3
 
4. com.sun.media.format.AviVideoFormat
  MJPG, 160x120, Length=57600 0 extra bytes
5. com.sun.media.format.AviVideoFormat
  MJPG, 320x240, Length=230400 0 extra bytes
6. com.sun.media.format.AviVideoFormat
  MJPG, 640x480, Length=921600 0 extra bytes

Pouvez vous m'aider à résoudre ce problème ? ou y'a t'il une autre alternative pour prendre une photo avec ma webcam?

Merci beaucoup