blob: b9ac009a3ba56026f94537a0ba004e2c43156787 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
|
# sshcamera
A program to view a real-time stream of remote-camera,
through ssh or other bi-directional byte stream,
without any additional encodings.
Usage: sshcamera ssh user@remote usshcamera /dev/video0
## About Contents
This program uses a modified version of v4l2-sys crate in v4l2-sys/.
Look at v4l2-sys/README.md and v4l2-sys/Cargo.toml to know about
v4l2-sys and its modification.
Other parts (sshcamera crate) are written by dyknon in 2025, 2026.
sshcamera is marked Creative Commons Zero v1.0 Universal (CC0).
You can freely use this according to CC0.
To view a copy of this mark, visit:
https://creativecommons.org/publicdomain/zero/1.0/
## How to Build
Do:
```
cargo build --release
```
It will make an executable in target/release/sshcamera
Additionally, you can do:
```
cargo build --release --no-default-features
```
It will make an executable with
smaller run-time dependencies in target/release/usshcamera
Without --no-default-features, usshcamera will be generated with
fill of dependency (as like sshcamera).
## How to Use
This:
```
target/release/sshcamera target/release/sshcamera /dev/video0
```
will read video frames from /dev/video0, and show it in a Gtk window.
Second sshcamera can be usshcamera:
```
target/release/sshcamera target/release/usshcamera /dev/video0
```
And can be in remote:
```
target/release/sshcamera ssh user@remote path/to/usshcamera /dev/video0
```
### Description
sshcamera command has two modes.
Invoke it with two or more arguments to execute given program
and stream video from the inner program.
(Using sshcamera specific simple protocol)
Received video will be shown in Gtk window.
Invoke it with one argument to read video frames from given v4l2 device.
Read video frames are passed to stdio (using sshcamera protocol).
usshcamera command only has this feature.
sshcamera protocol tries to reduce delays by dropping frames.
It streams v4l2 frames without any processing.
Decoding of frames is duty of outer program (with Gtk window).
|