You are not logged in.

#1 2021-02-18 05:34:40

devmrfitz
Member
Registered: 2021-01-13
Posts: 54

Webcam and mic in SSH

I am using localhost ssh to forward a gnome session to xephyr, as shown here. The only difference is that I'm forwarding user A's session while logged into the main session of user B. Both are local users. Is there a way for me to access webcam and mic in xephyr?

Using client's hardware or using server's hardware are both fine as, in my case, they are the same

Offline

#2 2021-02-18 09:46:42

post-factum
Member
From: /cz
Registered: 2008-09-12
Posts: 149
Website

Re: Webcam and mic in SSH

Do I get you correctly: you wanna use webcam and microphone over network?

If so, then for microphone your solution is pulseaudio, and for webcam there's v4l2loopback+ffmpeg streaming.


uname == latest pf-kernel

Offline

#3 2021-02-18 09:50:24

devmrfitz
Member
Registered: 2021-01-13
Posts: 54

Re: Webcam and mic in SSH

post-factum wrote:

Do I get you correctly: you wanna use webcam and microphone over network?

If so, then for microphone your solution is pulseaudio, and for webcam there's v4l2loopback+ffmpeg streaming.

Not network. I've started a Xephyr session in which I want to use webcam. The session runs using `ssh user@localhost`

Offline

#4 2021-02-18 10:04:57

post-factum
Member
From: /cz
Registered: 2008-09-12
Posts: 149
Website

Re: Webcam and mic in SSH

Then nothing prevents you from using it directly.


uname == latest pf-kernel

Offline

#5 2021-02-18 10:06:31

devmrfitz
Member
Registered: 2021-01-13
Posts: 54

Re: Webcam and mic in SSH

post-factum wrote:

Then nothing prevents you from using it directly.

The Xephyr session doesn't detect the mic as it is essentially a SSH session

Offline

#6 2021-02-18 10:16:52

post-factum
Member
From: /cz
Registered: 2008-09-12
Posts: 149
Website

Re: Webcam and mic in SSH

That depends on whether your application relies on pulseaudio or not. If it does, pulseaudio should be started. Otherwise, direct access via ALSA may just work.


uname == latest pf-kernel

Offline

#7 2021-02-18 10:18:58

devmrfitz
Member
Registered: 2021-01-13
Posts: 54

Re: Webcam and mic in SSH

post-factum wrote:

That depends on whether your application relies on pulseaudio or not. If it does, pulseaudio should be started. Otherwise, direct access via ALSA may just work.

Thank you. The same problem with webcam remains

Offline

#8 2021-02-18 10:21:35

post-factum
Member
From: /cz
Registered: 2008-09-12
Posts: 149
Website

Re: Webcam and mic in SSH

If the webcam cannot be accessed, this might be a permission issue. Check whether the user has an access to /dev/video* files.


uname == latest pf-kernel

Offline

#9 2021-02-18 11:16:40

progandy
Member
Registered: 2012-05-17
Posts: 5,190

Re: Webcam and mic in SSH

For audio: https://wiki.archlinux.org/index.php/Pu … _same_time
(If you use ~/.config/pulse/default.pa, you'll have to .include the default similar to this: https://wiki.archlinux.org/index.php/Pu … default.pa )

For video, I suggest you add your secondary user to the video group or give the users permissions with sudo setfacl to "/dev/video#" As far as I know, systemd-logind only allows the first active user  access through its automatic rules.

Last edited by progandy (2021-02-18 11:22:16)


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Offline

Board footer

Powered by FluxBB