Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only first virtual webcam shows up? #98

Closed
RKelln opened this issue Jun 5, 2023 · 6 comments
Closed

Only first virtual webcam shows up? #98

RKelln opened this issue Jun 5, 2023 · 6 comments

Comments

@RKelln
Copy link
Contributor

RKelln commented Jun 5, 2023

I was testing for my upcoming concert and need 2 virtual webcams at one point (using v4l2loopback), but I only get the first showing up in the Connected, select stream drop down?

$ sudo modprobe v4l2loopback devices=2 exclusive_caps=1 video_nr=2 card_label="Virtual Camera","Virtual Camera 2"

$ v4l2-ctl --list-devices

Virtual Camera (platform:v4l2loopback-000):
	/dev/video2

Virtual Camera 2 (platform:v4l2loopback-001):
	/dev/video3

Laptop Camera: Laptop Camera (usb-0000:00:14.0-7):
	/dev/video0
	/dev/video1
	/dev/media0

In the drop down there is only "Virtual Camera" if I use gsstreamer to send two different windows to the different /dev/videoN, e.g.:

$ gst-launch-1.0 ximagesrc xname=WindowNameHere use-damage=0 show-pointer=0 ! video/x-raw,framerate=30/1 ! videoconvert ! queue ! v4l2sink device=/dev/video2

Works but:

gst-launch-1.0 ximagesrc xname=WindowNameHere use-damage=0 show-pointer=0 ! video/x-raw,framerate=30/1 ! videoconvert ! queue ! v4l2sink device=/dev/video3

Does not show up in the list.

Any chance you could take at look at this asap?

@RKelln RKelln changed the title Only first virtual wecam shows up? Only first virtual webcam shows up? Jun 5, 2023
@RKelln
Copy link
Contributor Author

RKelln commented Jun 5, 2023

The other option would be adding window sharing instead of just screen sharing, but that seems like a much larger fix?

@brunoherbelin
Copy link
Owner

I will investigate your issue report, but for a quick solution, try creating a 'Generated' source with a 'Custom' generator.
For the generator, put the start of the pipeline source:

ximagesrc xid=0x4800002 use-damage=0 show-pointer=0 ! video/x-raw,framerate=30/1

This is a solution to create manually a single window capture source under linux :

image

I didn't have time to implement this with a 'clic window to capture' simplified user interface, and also it is not robust to saving the session (windows id change). What do you use as window name? It is also different everytime, no ?

(NB: I'm not even mentioning that I don't have the solution for OSX, which would also be good to implement for vimix)

@RKelln
Copy link
Contributor Author

RKelln commented Jun 6, 2023

Ah thanks, that's sweet, will give it a try. The window names are always the same (for the performance) so I can use xname which hopefully will allow saved sessions to work (since I'm hoping to switch between them during a song). Appreciate the quick reply!

@RKelln
Copy link
Contributor Author

RKelln commented Jun 6, 2023

Yes this is working for me. For whatever reason windows xname with multiple word titles doesn't work, but fortunately the window I need to reuse is my own software so set to a single word title, and the web browser I can stick into a single mix so I only have to set it once (for every time that window is opened).

@brunoherbelin
Copy link
Owner

Update on latest Beta 9ff5b90 ;
Now the selection of window is possible in GUI:

image

@RKelln
Copy link
Contributor Author

RKelln commented Aug 16, 2023

Nice! That will make things much easier for everyone, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants