Skip to content

Commit c9ec4cc

Browse files
committed
Add README and LICENSE
Signed-off-by: kfei <kfei@kfei.net>
1 parent 4b6a878 commit c9ec4cc

File tree

2 files changed

+97
-0
lines changed

2 files changed

+97
-0
lines changed

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License
2+
3+
Copyright (c) 2014 Lin, Ke-fei (kfei). http://kfei.net
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in
13+
all copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21+
THE SOFTWARE.

README.md

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
# sshcam
2+
3+
Webcam live streaming in SSH terminal.
4+
5+
[DEMO](https://asciinema.org/a/14968)
6+
7+
## Install
8+
9+
**Install binary from GitHub** if you don't have a Go development environment:
10+
11+
```bash
12+
curl -sL https://github.com/kfei/sshcam/releases/download/v1.0.0/sshcam-v1.0.0-x64.tar.bz | tar xj
13+
```
14+
15+
**Build from source** (also requires GCC):
16+
17+
```bash
18+
go get -u github.com/kfei/sshcam
19+
cd $GOPATH/src/github.com/kfei/sshcam
20+
go build
21+
go install
22+
```
23+
24+
## Quick Start
25+
26+
Preview the live stream locally via `sshcam` (without any argument). Also note
27+
that you should run `sshcam` as an user with privilege to open `/dev/videoX`.
28+
29+
Start the SSH server with all default settings:
30+
31+
```bash
32+
sshcam --server
33+
```
34+
35+
Then on the client-side, run:
36+
37+
```bash
38+
ssh sshcam@your.server.ip -p 5566 # Default login: sshcam/p@ssw0rd
39+
```
40+
41+
Note that there are more configurable settings for server, have a look at
42+
`sshcam -h` for more details. For example,
43+
44+
```bash
45+
sshcam --server --listen=127.0.0.1 --port=22222 \
46+
--user=john --pass=nhoj \
47+
--device=/dev/video0 --size=1280x720
48+
```
49+
50+
## Requirements
51+
52+
- On the client-side, a standard `ssh` utility is enough.
53+
- Video device is supported by
54+
[V4L2](https://www.kernel.org/doc/Documentation/video4linux/v4l2-framework.txt),
55+
which means the server is currently Linux only.
56+
57+
## TODO
58+
59+
There are still lots of interesting works to be done. Discussions and pull
60+
requests are both welcome. :)
61+
62+
- *P2P functions*: So that it can be a terminal video messenger.
63+
- *Higher resolution*: Can this be done by using the Unicode block
64+
characters?
65+
- *Colors*: In a *xterm-256color* terminal, display images with colors.
66+
- *Port to other platforms*, maybe QT?
67+
- *Improve algorithm*: Currently the image scaling is inefficient and lossy.
68+
69+
## Credits
70+
71+
This project is inspired from [txtcam](https://github.com/dhotson/txtcam) and
72+
[Star Wars Movie in Telnet](telnet://towel.blinkenlights.nl).
73+
74+
## License
75+
76+
The MIT License (MIT)

0 commit comments

Comments
 (0)