mirror of
https://github.com/pikvm/ustreamer.git
synced 2025-12-23 18:50:00 +00:00
set HDMI EDID before starting ustreamer (#179)
* build docker image * Push each image to an user github registry. It can be used during development for testing. * set HDMI EDID before starting ustreamer * Update README.md
This commit is contained in:
parent
17f54a7977
commit
36c9ff22b3
@ -7,3 +7,4 @@
|
|||||||
!python/**
|
!python/**
|
||||||
!janus/**
|
!janus/**
|
||||||
!man/**
|
!man/**
|
||||||
|
!pkg/docker/entry.sh
|
||||||
|
|||||||
6
.github/workflows/docker-alpine-image.yaml
vendored
6
.github/workflows/docker-alpine-image.yaml
vendored
@ -2,7 +2,7 @@ name: Build Alpine
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [master]
|
branches: [master, build_*]
|
||||||
tags: [v*]
|
tags: [v*]
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [master]
|
branches: [master]
|
||||||
@ -59,8 +59,8 @@ jobs:
|
|||||||
-
|
-
|
||||||
name: Test
|
name: Test
|
||||||
run: |
|
run: |
|
||||||
echo version: $(docker run --rm -t ustreamer --version)
|
echo version: $(docker run --rm -e NO_EDID=1 -t ustreamer --version)
|
||||||
echo -e "features:\n$(docker run --rm -t ustreamer --features)"
|
echo -e "features:\n$(docker run --rm -e NO_EDID=1 -t ustreamer --features)"
|
||||||
-
|
-
|
||||||
name: Build multi arch
|
name: Build multi arch
|
||||||
uses: docker/build-push-action@v3
|
uses: docker/build-push-action@v3
|
||||||
|
|||||||
@ -100,16 +100,13 @@ cma=128M
|
|||||||
```
|
```
|
||||||
Save changes and reboot.
|
Save changes and reboot.
|
||||||
## Launch
|
## Launch
|
||||||
Set HDMI EDID (it is not saved between reboots):
|
|
||||||
```bash
|
|
||||||
$ wget https://raw.githubusercontent.com/pikvm/kvmd/master/configs/kvmd/tc358743-edid.hex
|
|
||||||
$ sudo v4l2-ctl --device=/dev//dev/video0 --set-edid=file=tc358743-edid.hex --fix-edid-checksums --info-edid
|
|
||||||
```
|
|
||||||
Start container:
|
Start container:
|
||||||
```bash
|
```bash
|
||||||
$ docker run --device /dev/video0:/dev/video0 -p 8080:8080 pikvm/ustreamer:latest
|
$ docker run --device /dev/video0:/dev/video0 -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).
|
||||||
|
## EDID
|
||||||
|
Container will set HDMI EDID before starging ustreamer. Use `-e NO_EDID=1` to not set EDID. Use `-e EDID_HEX=xx` to specify custom EDID data.
|
||||||
|
|
||||||
-----
|
-----
|
||||||
# Raspberry Pi Camera Example
|
# Raspberry Pi Camera Example
|
||||||
|
|||||||
@ -18,13 +18,17 @@ RUN apk add --no-cache \
|
|||||||
libjpeg-turbo \
|
libjpeg-turbo \
|
||||||
libevent \
|
libevent \
|
||||||
libgpiod \
|
libgpiod \
|
||||||
libbsd
|
libbsd \
|
||||||
|
v4l-utils
|
||||||
|
|
||||||
WORKDIR /ustreamer
|
WORKDIR /ustreamer
|
||||||
COPY --from=build /build/ustreamer/src/ustreamer.bin ustreamer
|
COPY --from=build /build/ustreamer/src/ustreamer.bin ustreamer
|
||||||
|
|
||||||
|
RUN wget https://raw.githubusercontent.com/pikvm/kvmd/master/configs/kvmd/tc358743-edid.hex -O /edid.hex
|
||||||
|
COPY pkg/docker/entry.sh /
|
||||||
|
|
||||||
EXPOSE 8080
|
EXPOSE 8080
|
||||||
ENTRYPOINT ["./ustreamer", "--host=0.0.0.0"]
|
ENTRYPOINT ["/entry.sh"]
|
||||||
CMD ["--dv-timings", "--format", "UYVY"]
|
CMD ["--dv-timings", "--format", "UYVY"]
|
||||||
|
|
||||||
# vim: syntax=dockerfile
|
# vim: syntax=dockerfile
|
||||||
|
|||||||
14
pkg/docker/entry.sh
Executable file
14
pkg/docker/entry.sh
Executable file
@ -0,0 +1,14 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
[ -z "$NO_EDID" ] && {
|
||||||
|
[ -n "$EDID_HEX" ] && echo "$EDID_HEX" > /edid.hex
|
||||||
|
while true; do
|
||||||
|
v4l2-ctl --device=/dev/video0 --set-edid=file=/edid.hex --fix-edid-checksums --info-edid && break
|
||||||
|
echo 'Failed to set EDID. Reetrying...'
|
||||||
|
sleep 1
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
./ustreamer --host=0.0.0.0 $@
|
||||||
Loading…
x
Reference in New Issue
Block a user