All tech and Linux blog, under the flag of open source world....

May 20, 2020

Virtual camera with v4l2loopback for meetings


 Setting up a virtual camera in Linux is fairly, virtual camera makes you play a video as a video input from a webcam, or screen share, most use cases are when you want to share multiple screens but your video chat client has limitations.

To start:

Get v4l2loopback module from here.

Note: to run the module you need kerenl-devel and kernel-headers, the package name might vary depending on your distro.

unzip the tar, open a terminal in the directory and run the following commands.
sudo make 
sudo make && sudo make install  
sudo depmod -a 
Congrats, the module is now installed, if you encounter errors, do a  "sudo make clean"  and retry. Note that if you do a kernel update you should rebuild this for the given kernel.
to enable the module:
sudo modprobe v4l2loopback exclusive_caps=1
Now there must be a fake webcam detected in your system, to test this run:
v4l2-ctl --list-devices
if you see devices other than the system webcam that is your virtual camera. now to run a video from it you need "ffmpeg". install it from your package manager then to input a desired video to the fake webcam run:
sudo ffmpeg -re -i /path/to/Video -map 0:v -f v4l2 /dev/videoX
Note: you should put the rename the videoX device as the fake dummy device name in previous list command. (for example for me /dev/video0 is my webcam and /dev/video1 is the fake camera so I rename X to 1)

To cast your screen use the following ffmpeg command:

ffmpeg -f x11grab -r 15 -s 1920x1080 -i :0.0+0,0 -vcodec rawvideo -pix_fmt yuv420p -threads 0 -f v4l2 /dev/videoX

Note: Keep the module and the ffmpeg running or the video chat app won't detect it and it will not work!

Note2: change the screen resolution to the one you are using. And it is preferred to use Xorg as your window manager!

Tested Clients for usage: 

  • Zoom
  • Google Meet
  • Jitsi
  • Bluejeans
Others might work to but I haven't tested them. Comment below and I answer your issues ASAP.
Share:

May 1, 2020

Using Tor system wide in Fedora

Tor Project


 If you like to be anonymous and not be visible by hackers and much more, you will like Tor, the concept is that your data travels through nodes and encrypted layer by layer, this can be achieved by both Tor Browser and system wide Tor.
 If you have apps that are not very secure you can try tor system wide to get a layer of protection.

Installation:

The required Packages are "torsocks", and standalone "tor" bundle from dnf.
sudo dnf install tor
sudo dnf install torsocks

Running: 

When the required packages are downloaded and installed you can now start tor by running
systemctl start tor
But we are not done yet, you need to assign a proxy in order to make tor function, so we head over to settings => network => proxy => set to manual

and use the configuration as shown:

Well done, check if tor is functional by visiting "check.torproject.org"

To revert back to local network, run
systemctl stop tor
and revert your proxy settings back to disabled.
Share:

Labels