This commit is contained in:
Maxim Devaev
2022-10-22 07:01:21 +03:00
parent c87ad5703c
commit f4f57cce38

View File

@@ -81,30 +81,41 @@ $ ./ustreamer \
You can always view the full list of options with ```ustreamer --help```. You can always view the full list of options with ```ustreamer --help```.
-----
# Docker (Raspberry Pi 4 HDMI) # Docker (Raspberry Pi 4 HDMI)
## Preparations
## Preparations
Add following lines to /boot/firmware/usercfg.txt: Add following lines to /boot/firmware/usercfg.txt:
``` ```
gpu_mem=128 gpu_mem=128
dtoverlay=tc358743 dtoverlay=tc358743
``` ```
Check size of CMA: Check size of CMA:
```bash ```bash
$ dmesg | grep cma-reserved $ dmesg | grep cma-reserved
[ 0.000000] Memory: 7700524K/8244224K available (11772K kernel code, 1278K rwdata, 4320K rodata, 4096K init, 1077K bss, 281556K reserved, 262144K cma-reserved) [ 0.000000] Memory: 7700524K/8244224K available (11772K kernel code, 1278K rwdata, 4320K rodata, 4096K init, 1077K bss, 281556K reserved, 262144K cma-reserved)
``` ```
If it is smaller than 128M add following to /boot/firmware/cmdline.txt: If it is smaller than 128M add following to /boot/firmware/cmdline.txt:
``` ```
cma=128M cma=128M
``` ```
Save changes and reboot. Save changes and reboot.
## Launch ## Launch
Start container: Start container:
```bash ```bash
$ docker run --device /dev/video0:/dev/video0 -e EDID=1 -p 8080:8080 pikvm/ustreamer:latest $ docker run --device /dev/video0:/dev/video0 -e EDID=1 -p 8080:8080 pikvm/ustreamer:latest
``` ```
Then access the web interface at port 8080 (e.g. http://raspberrypi.local:8080). Then access the web interface at port 8080 (e.g. http://raspberrypi.local:8080).
## Custom config ## Custom config
```bash ```bash
$ docker run --rm pikvm/ustreamer:latest \ $ docker run --rm pikvm/ustreamer:latest \
@@ -114,11 +125,13 @@ $ docker run --rm pikvm/ustreamer:latest \
--dv-timings \ --dv-timings \
--drop-same-frames=30 --drop-same-frames=30
``` ```
## EDID ## EDID
Add `-e EDID=1` to set HDMI EDID before starging ustreamer. Use together with `-e EDID_HEX=xx` to specify custom EDID data. Add `-e EDID=1` to set HDMI EDID before starging ustreamer. Use together with `-e EDID_HEX=xx` to specify custom EDID data.
----- -----
# Raspberry Pi Camera Example # Raspberry Pi Camera Example
Example usage for the Raspberry Pi v1 camera: Example usage for the Raspberry Pi v1 camera:
```bash ```bash
$ sudo modprobe bcm2835-v4l2 $ sudo modprobe bcm2835-v4l2