From 36afc62a386dd3d39b6ce6458b5298587ece7593 Mon Sep 17 00:00:00 2001 From: Fierelier Date: Wed, 14 Apr 2021 01:15:10 +0000 Subject: [PATCH 1/3] Add 'README.md' --- README.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..e69de29 From 332cf84535cf54f31539efcefbd25e8b1dddd5c3 Mon Sep 17 00:00:00 2001 From: Fierelier Date: Wed, 14 Apr 2021 02:32:50 +0000 Subject: [PATCH 2/3] Update 'README.md' --- README.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/README.md b/README.md index e69de29..fdfa14d 100644 --- a/README.md +++ b/README.md @@ -0,0 +1,18 @@ +# fstream +A TCP multi-broadcast media streaming server/client. + +# Client +- `fstream-client.py 127.0.0.1:1337 watch fier 123 | ffplay -i - -fflags nobuffer -flags low_delay -infbuf -fast -framedrop` - Watch `fier`'s stream at `127.0.0.1:1337`, supplying `123` as a password, and pipe it into ffplay for playback. +- `ffmpeg -f dshow -audio_buffer_size 10 -i audio=virtual-audio-capturer -f gdigrab -framerate 30 -i desktop -vf scale=-1:480 -c:v libx264 -pix_fmt yuv420p -preset fast -tune zerolatency -c:a aac -bufsize 2M -maxrate 1M -f mpegts - | fstream-client.py 127.0.0.1:1337 broadcast fier 123` - Broadcast as `fier` to `127.0.0.1:1337`, supplying `123` as a password. Pipe the output from ffmpeg. + +# Server Protocol +The protocol is currently in an early stage, and is bound to change. +. +## Establishing a connection +Establish a TCP connection with the server, and send the payload. If the server likes your payload, it will stream data to you, or accept more of your data. + +## The payload +Send a UTF-8 string identifying the client's intentions. **Fill the request with trailing spaces until the request is 1000 bytes.** + +- `watch,fier,123` - Watch `fier`'s stream, supplying `123` as the watch password (optional). It will blast you with the media data. +- `broadcast,fier,123` - Broadcast as `fier`, supplying `123` as the broadcast password, as configured on the server. May be optional if not set. Just blast the data to the server after this. \ No newline at end of file From 851bb737b41457d941f99076c65d3c76bb210e94 Mon Sep 17 00:00:00 2001 From: Fierelier Date: Wed, 14 Apr 2021 02:33:27 +0000 Subject: [PATCH 3/3] Update 'README.md' --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index fdfa14d..4758d7b 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ A TCP multi-broadcast media streaming server/client. # Client - `fstream-client.py 127.0.0.1:1337 watch fier 123 | ffplay -i - -fflags nobuffer -flags low_delay -infbuf -fast -framedrop` - Watch `fier`'s stream at `127.0.0.1:1337`, supplying `123` as a password, and pipe it into ffplay for playback. -- `ffmpeg -f dshow -audio_buffer_size 10 -i audio=virtual-audio-capturer -f gdigrab -framerate 30 -i desktop -vf scale=-1:480 -c:v libx264 -pix_fmt yuv420p -preset fast -tune zerolatency -c:a aac -bufsize 2M -maxrate 1M -f mpegts - | fstream-client.py 127.0.0.1:1337 broadcast fier 123` - Broadcast as `fier` to `127.0.0.1:1337`, supplying `123` as a password. Pipe the output from ffmpeg. +- `ffmpeg -f dshow -audio_buffer_size 10 -i audio=virtual-audio-capturer -f gdigrab -framerate 30 -i desktop -vf scale=-1:480 -c:v libx264 -pix_fmt yuv420p -preset fast -tune zerolatency -c:a aac -bufsize 2M -maxrate 1M -f mpegts - | fstream-client.py 127.0.0.1:1337 broadcast fier 123` - Broadcast Windows desktop as `fier` to `127.0.0.1:1337`, supplying `123` as a password. Pipe the output from ffmpeg. # Server Protocol The protocol is currently in an early stage, and is bound to change.