Vlc.DotNet.Forms.VlcControl cc = new Vlc.DotNet.Forms.VlcControl (); Cc. Width =; Cc. Height = n; Cc. Top = +; Cc. left = +; Vlc.DotNet.Core.Medias.MediaBase media = new Vlc.DotNet.Core.Medias.LocationMedia ("dshow://"); Media. AddOption (":d show-size=1600*1200"); Media. AddOption (":d show-vdev=usb CAM2"); Cc. Play (media); This. Controls.Add (cc); Cc. BringToFront (); Cc. Takesnapshot ("D:\\111.jpg", 1600, 1200);//
Attention
Vlc.DotNet.Core.Medias.MediaBase media = new Vlc.DotNet.Core.Medias.LocationMedia ("dshow://");
When initializing Mediabase, simply
"dshow://"
Can
Choose which camera needs addoption
, select parameters such as resolution to AddOption
But does not support camera index, must camera name, can refer to using the Aforge.net framework to open the camera C # get the name of the corresponding index
Using Vlc.dotnet to open the camera and C #