You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
Johan Vandegriff 724f6430e8
updated links
1 month ago
.gitignore initial files 1 year ago
Dockerfile added Dockerfile to deploy on johanv.net 1 month ago
LICENSE added chatroom 1 year ago
README.md added required packages for audio 1 year ago
chat.html added separate chat page 1 year ago
chat.js added separate chat page 1 year ago
index.html updated links 1 month ago
package.json changes from a while ago 1 month ago
server.js changes from a while ago 1 month ago
style.css changes from a while ago 1 month ago

README.md

Commands

Run this command to stream the terminal to the server:

exec &> >(tee /dev/tty | nc localhost 1337)

In a separate terminal, run this command to stream audio:

arecord -f cd -t raw | oggenc -r -q 0 - | nc localhost 1338

For the above command, you will need to install vorbis-tools and netcat.

Other options

#pipe just stdout to the server
exec > >(tee /dev/tty | nc localhost 1337)

#run bash and pipe its stdout to the server
bash | tee /dev/tty | nc localhost 1337

#pipe everything in the current terminal to the server
exec &> >(tee /dev/tty | nc localhost 1337)
# https://unix.stackexchange.com/questions/634350/understanding-exec-command
# this one causes resizing issues with nethack


#wav audio, 8000 Hz
arecord | nc localhost 1338

#wav audio, 44100 Hz
arecord -f cd -t raw | nc localhost 1338


#ogg audio, 44100 Hz compressed 😀
arecord -f cd -t raw | oggenc -r -q 0 - | nc localhost 1338
#arecord opts:
# -f cd (16 bit little endian, 44100, stereo)
# -t, --file-type TYPE    file type (voc, wav, raw or au)
#oggenc opts:
# -r, --raw            Raw mode. Input files are read directly as PCM data
# -q, --quality        Specify quality, between -1 (very low) and 10 (very
#                      high), instead of specifying a particular bitrate.
#                      This is the normal mode of operation.
#                      Fractional qualities (e.g. 2.75) are permitted
#                      The default quality level is 3.