Merge branch 'master' of https://git.lumen.sh/Fierelier/fstream into master

This commit is contained in:
Fierelier 2021-04-14 05:15:25 +02:00
commit 8ebdc33407

18
README.md Normal file
View File

@ -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 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.
.
## 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.