Default system camera selector?

how to setup e.g /dev/video3 to be a default system camera?
by default thhe camera that is the default readsd rom /dev/video0
Moreover, it seems that previously there was a tool named gstreamer-properties - Multimedia systems selector

hello Andrey1984,

may I know what’s your use-case?
how many cameras in your environments, and what’s the application you prefer to used.

given concern was do to a a following situation
a guy have a /dev/video0 CSI sensor
they also have some post processing, so that processed video feed is /dev/video2 device made by loopback
when they start mozilla firefox hangout/ other video chat in web browser they wish to have the default camera not the source /dev/video0, but the augmented reality or something /dev/video2;
as for now it requires them to select manually every time the camera from the list
they would like to get it set up as the default camera so there will be no need to select manually the augmented stream from the camera devices list

hello Andrey1984,

please have a try to update position property in the device tree for verification.

you may refer to Camera Modules and the Device Tree session, modify the position values of your default camera (i.e. /dev/video2)
for example,
if you’re working with a three-camera system, setting the position of /dev/video2 as bottom.

it seems that position takes arguments:
•In a two-camera system: rear and front.

•In a three-camera system: bottom, top, and center.

•In a six-camera system: bottomleft, bottomright, centerleft, centerright, topleft, and topright.
So if it is a one CSI camera system with extra camera loopback device added with v4l2loopback as /dev/videoN, it would be possible to get the default CSI sensor to have /dev/video2 identifier, so that /dev/video0 wil be vacant for virtual camera loopback device so that it will be the default system device?
However, for implementing the proposed solution, it seems that the file that will need to be edited needs to be located first somehow.
The example from the url seems to reffer to

Locate or create a tegra-camera-platform device tree node in the kernel source tree at:

The question emerges - how to identify the file that needs to be edited in case the system has CSI camera & virtualloopback camera [ or two virtual loopback cameras, whatever is easier to implement]. Considering that the CSI camera is HighReS arducamera


Have you explored the possibility of udev rules? I’m not certain it will meet your needs but I did something similar a while back. I wrote some udev rules to create symlinks based on the i2c addresses so that I could have file paths that were consistent with the physical hardware layout (e.g. sensor5 was /dev/d3_cam_5 which was a symlink to, perhaps, /dev/video0, or /dev/video4 or whatever it happened to be depending on the connected cameras and registration order).


1 Like

Hi Greg,
Thank you for sharing!
I shall explore udev option altogether with the dtb tree modification option.
However, it might be tricky to locate the i2c address of arducam highres to map it manually.

I dug up the rules I had:


# Provide symlinks that correspond to the physical connections.
# Match against the image sensor address. This is fixed on a per-port basis.

SUBSYSTEM=="video4linux",ATTR{name}=="vi-output, * 2-0048", SYMLINK+="d3-cam0"
SUBSYSTEM=="video4linux",ATTR{name}=="vi-output, * 2-004a", SYMLINK+="d3-cam1"
SUBSYSTEM=="video4linux",ATTR{name}=="vi-output, * 2-004c", SYMLINK+="d3-cam2"
SUBSYSTEM=="video4linux",ATTR{name}=="vi-output, * 2-004e", SYMLINK+="d3-cam3"
SUBSYSTEM=="video4linux",ATTR{name}=="vi-output, * 2-0050", SYMLINK+="d3-cam4"
SUBSYSTEM=="video4linux",ATTR{name}=="vi-output, * 2-0052", SYMLINK+="d3-cam5"

I recall that there are many different ways to match using udev and there’s a convenient mode to see the attributes but I do not recall how.


trying to find an identifier of camera device I found