Did you try this : https://processing.org/reference/libraries/video/Capture_list_.html
Please also show your code