From ae35ba451480a4516afe7c50ba34878e567450a9 Mon Sep 17 00:00:00 2001 From: dyknon Date: Mon, 26 Jan 2026 23:01:05 +0900 Subject: Preparing for release --- Cargo.toml | 2 ++ README | 72 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 74 insertions(+) create mode 100644 README diff --git a/Cargo.toml b/Cargo.toml index a8d2cb4..10c3128 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,6 +2,8 @@ name = "sshcamera" version = "0.1.0" edition = "2021" +authors = ["dyknon "] +license = "CC0-1.0" [dependencies] libc = "0.2" diff --git a/README b/README new file mode 100644 index 0000000..b9ac009 --- /dev/null +++ b/README @@ -0,0 +1,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). -- cgit v1.2.3