Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update README.md: Added netcat oneliners for audio/video calls and colored chat #423

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
43 changes: 43 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3794,6 +3794,49 @@ nc -l -u -p 2000 -c "nc -u [ip|hostname] 3000"
nc -l -u -p 2000 -c "nc [ip|hostname] 3000"
```
###### Video and Audio call
```bash
server> PORT=1234
server> ffmpeg \
-f alsa -i hw:1 \
-acodec flac \
-f matroska \
-f video4linux2 -i /dev/video0 \
-vcodec mpeg4 \
-f matroska \
-tune zerolatency -y /dev/stdout \
2>/dev/null | nc -l ${PORT} | mplayer - &>/dev/null \
```
```bash
client> SERVER_IP=192.168.1.4
client> PORT=1234
client> ffmpeg \
-f alsa -i hw:1 \
-acodec flac \
-f matroska \
-f video4linux2 -i /dev/video0 \
-vcodec mpeg4 \
-f matroska \
-tune zerolatency -y /dev/stdout \
2>/dev/null | nc ${SERVER_IP} ${PORT} | mplayer - &>/dev/null
```
Requirements
* `ffmpeg` - to record video and audio
* `mplayer` - to play recieved video and audio
###### Colorfull network chat
```bash
server> PORT=1234
server> sed -u "s/^/\x1b\[31m/g; s/$/\x1b\[0m/g" | nc -l ${PORT} | sed "s/^/\x1b\[0m/g; s/$/\x1b\[31m/g"
client> PORT=1234
client> SERVER_IP=192.168.1.4
client> nc ${SERVER_IP} ${PORT}
```
___
##### Tool: [gnutls-cli](https://gnutls.org/manual/html_node/gnutls_002dcli-Invocation.html)
Expand Down