VLC GUI shows the list of available webcams, like v4l2:///dev/video0
and v4l2:///dev/video1
, I am wondering is there a way to get a list of available webcams? what about their default resolution?
I tried this but md.MediaList
is empty.
var mds = libVlc.MediaDiscoverers(MediaDiscovererCategory.Devices);
if (mds.Any(x => x.LongName == "Video capture"))
{
var devices = mds.First(x => x.LongName == "Video capture");
var md = new MediaDiscoverer(libVlc, devices.Name);
foreach (var media1 in md.MediaList)
{
// Nothing ...
}
}