445 Commits

Author SHA1 Message Date
Kamil Trzciński
400e036ea2 webrtc: check datachannel label for ping/pong 2025-07-04 18:07:50 +02:00
Kamil Trzciński
520350ed67 package: update to 0.3.x 2025-07-03 00:11:03 +02:00
Kamil Trzciński
a4bcc14283 webrtc: introduce timeout_s by default set to 1h
Client can overwrite this value to set `timeout_s` as part of webrtc request.

The `0` completely disables the timeout.
2025-07-03 00:07:59 +02:00
Kamil Trzciński
2d3a488437 webrtc: add ping/pong when sending a frame 2025-07-03 00:07:59 +02:00
Joshua Piccari
e4fe25fdb6 webrtc: add liveness check to WebRTC output using data channel
Previously, there was no way to detect if WebRTC clients were still
connected to the stream. This lead to the RTC streams being kept
open indefinitely when clients focibly closed the stream. This can
happen with Chrome, Edge, Safari, etc when the tab is closed or on
mobile devices when the screen is locked or browser closed.

This change adds a data channel to the stream and requires users to
respond to ping requests. While sending a frame the ping might be
sent to the client. If clients do not respond to these ping requests before
the timeout duration the stream is closed and the client is removed
from the server. This causes the client to reinitiate the connection.

The timeout defaults to 30 seconds.

The client needs to send `keepAlive: true` as part of webrtc request.
On the received `ping` send back the `pong` over data-channel.
2025-07-03 00:07:59 +02:00
Kamil Trzciński
9379ffde78
libcamera: parse arrays for options (#180)
This does that by trying to parse value,
and then advancing pointer. It checks if the
string ends or is split by comma.

With collaboration from @arekm. Take a look at:

- https://github.com/ayufan/camera-streamer/pull/170
- https://github.com/ayufan/camera-streamer/pull/172
- https://github.com/ayufan/camera-streamer/pull/176
2025-07-02 21:43:47 +02:00
Arkadiusz Miśkiewicz
5e689449d4
http: decode POST parameters before applying options. (#174)
Code greatly reduced by @ayufan.

Fixes https://github.com/ayufan/camera-streamer/issues/115
2025-07-02 20:59:27 +02:00
Kamil Trzcinski
f7b673cb94 workflow: run only on pull request if push 2025-07-02 20:57:20 +02:00
Kamil Trzcinski
e4a84207a4 rtsp: disable RTSP support if using old livemedia version 2025-07-02 20:55:47 +02:00
Kamil Trzcinski
142de03770 workflow: fix ccache error when running docker as non-root 2025-06-08 22:51:49 +02:00
Kamil Trzcinski
60aa207562 workflow: do not fail fast on build_test.yaml 2025-06-08 19:43:00 +02:00
Kamil Trzcinski
bef4755bbe workflow: use arm runners for arm64 builds 2025-06-08 19:35:09 +02:00
Kamil Trzcinski
50bb175ca4 workflow: add missing --platform to Dockerfile 2025-06-08 19:35:09 +02:00
Bryan O'Donoghue
350304e4c4
service: add ArduCAM 5MP NoIR sensor configuration (#108)
* service: Add 5MP noir arducam sensor configuration

Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@nexus-software.ie>

* Update camera-streamer-arducam-noir-5MP.service

---------

Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@nexus-software.ie>
Co-authored-by: Kamil Trzciński <ayufan@ayufan.eu>
2025-06-08 18:49:24 +02:00
Denix
4f60293876
service: create camera-streamer-raspi-v1.3-5MP.service (#116)
* Create camera-streamer-raspi-v1.3-5MP.service

* now syntax with double dashes for options
2025-06-08 18:48:10 +02:00
Christoph Wiechert
3fe5d2106f
html: fix id_key to use device.name (#92)
* html: use const/let; add baseURL constant

* html: fix id_key [Object object]
2025-06-08 18:47:38 +02:00
Zeyu Dong
f73ac32944
build: use printf instead of echo (#110) 2025-06-08 18:46:11 +02:00
2114L3
598dd6b922
service: change examples to avoid using deprecated argument syntax (#127)
* Update camera-streamer-arducam-64MP.service

deprecated argument syntax

* Update camera-streamer-arducam-16MP.service

deprecated argument syntax

* Update camera-streamer-generic-usb-cam.service

deprecated argument syntax

* Update camera-streamer-raspi-usb-cam.service

deprecated argument syntax

* Update camera-streamer-raspi-v2-8MP.service

deprecated argument syntax

* Update camera-streamer-raspi-v3-12MP.service

deprecated argument syntax
2025-06-08 18:45:04 +02:00
ayourk
3d2085c4b2
workflow: update README.md for submodule clone instructions (#132)
Adding the command required to clone the entire repository with submodules makes it less likely to error out when building.
2025-06-08 18:44:19 +02:00
Kamil Trzcinski
39c89134eb workflow: update actions/upload-artifact to v4 2025-06-08 17:46:30 +02:00
Patrick Gehrsitz
4e466057e6
libcamera: fix compilation errors for libcamera v0.5.0 (#169)
* libcamera: add support for ControlTypePoint

Signed-off-by: Patrick Gehrsitz <mryel00.github@gmail.com>

* libcamera: fix compile error on missing ControlType

This adds a runtime error for missing ControlTypes to fix compilation errors if there are new ControlTypes that are not implemented yet.

Signed-off-by: Patrick Gehrsitz <mryel00.github@gmail.com>

* chore: remove whitespaces

Signed-off-by: Patrick Gehrsitz <mryel00.github@gmail.com>

* libcamera: only use ControlTypePoint for libcamera>=0.3.2

Signed-off-by: Patrick Gehrsitz <mryel00.github@gmail.com>

* fix: add version check to second switch case

Signed-off-by: Patrick Gehrsitz <mryel00.github@gmail.com>

* fix: add version check to libcamera_parse_point

Signed-off-by: Patrick Gehrsitz <mryel00.github@gmail.com>

* Add AeState to stable LIBCAMERA_CONTROL block

Moved AeState from the draft control list to the stable control block for better alignment with finalized controls.

* fix: fix backwards compatibility

Signed-off-by: Patrick Gehrsitz <mryel00.github@gmail.com>

---------

Signed-off-by: Patrick Gehrsitz <mryel00.github@gmail.com>
Co-authored-by: Surion79 <102791900+Surion79@users.noreply.github.com>
2025-06-08 17:34:59 +02:00
Patrick Gehrsitz
68de1189df
libcamera: fix compilation errors for libcamera v0.3.2+rpt20241119 (#168)
* libcamera: add support for ControlTypePoint

Signed-off-by: Patrick Gehrsitz <mryel00.github@gmail.com>

* libcamera: fix compile error on missing ControlType

This adds a runtime error for missing ControlTypes to fix compilation errors if there are new ControlTypes that are not implemented yet.

Signed-off-by: Patrick Gehrsitz <mryel00.github@gmail.com>

* chore: remove whitespaces

Signed-off-by: Patrick Gehrsitz <mryel00.github@gmail.com>

* libcamera: only use ControlTypePoint for libcamera>=0.3.2

Signed-off-by: Patrick Gehrsitz <mryel00.github@gmail.com>

* fix: add version check to second switch case

Signed-off-by: Patrick Gehrsitz <mryel00.github@gmail.com>

* fix: add version check to libcamera_parse_point

Signed-off-by: Patrick Gehrsitz <mryel00.github@gmail.com>

---------

Signed-off-by: Patrick Gehrsitz <mryel00.github@gmail.com>
2025-06-08 17:34:29 +02:00
Kamil Trzciński
4203f89df1
Create btt-pi2.txt 2024-05-07 11:41:59 +02:00
Ruslan Sayfutdinov
6deb9c513c
libcamera: fix bytesperline calculation for libcamera0.2 (#140)
For libcamera0.2 configuraiton.stride is already set to some incorrect value and configurations->validate() doesn't update it if it's not 0.

For libcamera0.1 it was set to 0. So set it to 0 manually to make sure configurations->validate() computes the correct value.
2024-03-08 08:30:59 +01:00
Kamil Trzcinski
54bdd9d4d6 workflow: properly generate version.h 2023-12-06 10:05:58 +01:00
Kamil Trzcinski
bc231917d8 libcamera: support transform to orientation rename 2023-11-27 22:21:18 +01:00
Kamil Trzcinski
3c116f2307 device: some v4l2 cameras do not accept parameters unless streaming
This fixes 3DO camera not accepting `--camera-options=focus_absolute=100`
and `--camera-options=focus_automatic_continuous=0`, and not properly
configuring the sensor.

The settings are applied twice (if failed) to ignore ordering problems
related to auto-focus and focus-absolute value command line order.
2023-11-20 21:28:31 +01:00
Kamil Trzcinski
82dea910bc tools: fix usb_camera.sh not accepting parameters 2023-11-20 21:28:14 +01:00
Kamil Trzcinski
9cb0a474e4 tools: add rpi_debug.sh script 2023-11-20 21:27:58 +01:00
Kamil Trzcinski
e43e93c236 libcamera: disable SceneFlicker in bookworm 2023-10-14 20:34:44 +02:00
Kamil Trzcinski
7d43fb7e3c workflow: automatically generate changelog 2023-10-14 20:34:44 +02:00
Kamil Trzcinski
e5e4c34e7c workflow: compile debian bookworm 2023-10-14 17:09:46 +02:00
Gina Häußge
ff539cda26
build: Remove temporary libssl package workaround (#86)
It seems to no longer be needed against current RPi
arm32 packages and in fact makes the build fail as the
package cannot be found any more.
2023-07-22 11:05:01 +09:00
Kamil Trzcinski
dafffc769e workflow: use DAG for release 2023-07-22 10:57:58 +09:00
Kamil Trzcinski
8143fa97dc workflows: allow to test via workflow_dispatch 2023-07-22 10:49:29 +09:00
Kamil Trzcinski
98aa208930 workflow: update README.md 2023-07-01 16:52:45 +02:00
Kamil Trzciński
f04e9311ab
ffmpeg: remuxer: fix "initialization discards 'const' qualifier from pointer target type" (#80)
* ffmpeg: fix compilation on `bookworm`
* workflows: test on `bookworm`

Co-authored-by: FacuM <facumo.fm@gmail.com>
2023-07-01 16:49:33 +02:00
Kamil Trzciński
8d0c04ccd5
http: add --http-listen=<ip4>, and listen by default on 127.0.0.1 (#81)
Co-authored-by: AndrolGenhald <AndrolGenhald@gmail.com>
2023-07-01 16:38:36 +02:00
Gina Häußge
f1966ab2b9
debian: add Breaks/Conflicts/Replaces to overwrite old version of camera-streamer (#79)
As discussed on Discord a while ago, adding
Breaks/Conflicts/Replaces entries against
camera-streamer (<< 0.2) allows for a smooth
migration from the camera-streamer package
built for OctoPi to camera-streamer-raspi, through
a transitional camera-streamer version 0.2 on
OctoPi's side.

An upgrade of camera-streamer from OctoPrint's
apt repo will pull in an updated transitional
camera-streamer package version 0.2 that depends
on camera-streamer-raspi. For that to install
flawlessly in all cases, it needs to be installed
*before* the camera-streamer-raspi dependency
(as some files between that and the former
camera-streamer package overlap). By
declaring Breaks/Conflicts/Replaces relationships
on camera-streamer-raspi this is ensured.
2023-07-01 15:39:22 +02:00
Zeyu Dong
afff8b9d78
html: fix syntax problem in iceServers (#77) 2023-06-26 13:46:41 +02:00
Kamil Trzcinski
01b0e969b3 webrtc: always use iceServers instead of ice_servers 2023-06-14 00:18:56 +02:00
Kamil Trzciński
836d3177b0 build: fix Dockerfile for raspi/arm32v7 2023-06-13 21:22:04 +00:00
Kamil Trzcinski
272b16ee1c webrtc: accept iceServers: [] provided in POST /webrtc, support trickle ICE
Thanks https://github.com/ayufan/camera-streamer/pull/65
2023-06-13 20:35:48 +02:00
Kamil Trzcinski
e8ffe47343 webrtc: allow to specify ice-servers on command line 2023-06-13 20:35:44 +02:00
Kamil Trzcinski
589c5fa602 html: fix control endpoints 2023-06-12 23:46:03 +02:00
Kamil Trzcinski
6719cc448f docs: update project requirements 2023-06-12 22:39:54 +02:00
Kamil Trzcinski
f7a15ce68a device: estimate stddev of frames capture 2023-06-12 22:39:53 +02:00
Kamil Trzcinski
a26542da39 readme: add references 2023-06-12 22:39:30 +02:00
Kamil Trzcinski
7cb28d810d html: add control.html and change POST /option interface 2023-06-12 22:39:28 +02:00
Kamil Trzcinski
67832e526c libcamera: ignore some controls 2023-06-12 22:38:35 +02:00