So what I need is something like capture devices list.
And some function to get from user on which device he wants to stream.
How to do such thing with open
Try using some OS functions to enumerate webcams. It might take some work, but this approach will guarantee that you get a list every time (unlike the OpenCV hack, which sometimes doesn't work, for some reason).