Add gitlab issue/merge request templates
[apps/camera-gstreamer.git] / README.md
1 - [how to run camera-gstreamer app](#how-to-run-camera-gstreamer-app)
2   - [With PipeWire](#with-pipewire)
3   - [With V4L2](#with-v4l2)
4   - [Without a physical camera device](#without-a-physical-camera-device)
5   - [Other Details](#other-details)
6   - [cmd examples](#cmd-examples)
7
8 how to run camera-gstreamer app
9 ===============================
10
11 With PipeWire
12 -------------
13 - PipeWire is the default path
14 - attach camera
15         - attach a camera to Hardware.
16         - make sure it is enumerated properly with `wpctl status` cmd
17         - make the desired device node the default node with `wpctl set-default
18         <camera-node-id>` cmd
19 - run
20         - start camera-gstreamer from the UI.
21         - The app can also be run from cmd prompt, make sure you login with `agl-driver` usr name.
22
23 With V4L2
24 ---------
25 - login with `agl-driver` and start the app with `ENABLE_V4L2_PATH=true camera-gstreamer` cmd
26 - V4L2 path cannot be taken when the app is run from the UI.
27
28 Without a physical camera device
29 ---------------------------------
30
31 The Virtual Video Test Driver (vivid) can be used for this purpose.
32
33 - run `modprobe vivid allocators=0x1` cmd
34 - check dmesg to know the capture device created.
35 - with PipeWire this device has to be made a default device, check [above](#with-pipewire) on how
36   to do it.
37 - with V4L2 use DEFAULT_V4L2_DEVICE to pass this new device
38
39 Other Details
40 -------------
41 - For V4L2 path assumes that /dev/video0 is present and is set as a capture device.
42   - Use DEFAULT_V4L2_DEVICE environmental variable to change it.
43 - use DEFAULT_DEVICE_WIDTH and DEFAULT_DEVICE_HEIGHT environmental variable to
44 override the default dimensions.
45
46 cmd examples
47 ------------
48 run app with V4L2 path and on `/dev/video24`
49
50 ```
51 DEFAULT_V4L2_DEVICE=/dev/video24 ENABLE_V4L2_PATH=true camera-gstreamer
52 ```
53 run app with default path(PipeWire) with a video frame of height 480
54 ```
55 DEFAULT_DEVICE_HEIGHT=480 camera-gstreamer
56 ```
57