Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/superkabuki/gums
https://github.com/superkabuki/gums
Last synced: 4 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/superkabuki/gums
- Owner: superkabuki
- License: bsd-2-clause
- Created: 2024-12-17T20:27:12.000Z (18 days ago)
- Default Branch: main
- Last Pushed: 2024-12-26T09:35:19.000Z (10 days ago)
- Last Synced: 2024-12-26T10:26:03.950Z (10 days ago)
- Language: Python
- Size: 22.5 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# `G`rande `U`nicast `M` ulticast `S` ender
### `gums` is multicast that just works, right out of the box.
---## gums is designed for multicast mpegts video, but works with any multicast stream.
### Latest is v.`0`.`0`.`31`
![image](https://github.com/futzu/gums/assets/52701496/f8bfad92-2e1e-47c1-a5b2-53e5d3152e0f)
## __Install__
```smalltalk
python3 -mpip install gums
```
### Use gums (Sender) programmatically
```py3
a@debian:~/gums$ pypy3
Python 3.9.16 (7.3.11+dfsg-2, Feb 06 2023, 16:52:03)
[PyPy 7.3.11 with GCC 12.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>> from gums import GumS
>>>> gummie = GumS("235.35.3.5:3535")
>>>> gummie.send_stream("/home/a/mpegts/pcrvid.ts")Multicast Stream
udp://@235.35.3.5:3535Source
0.0.0.0:3883549636512 Bytes Sent
>>>>
```
## __gums (Sender) cli__
* Supported input mpegts URIs:
* files `gums -i /home/me/vid.ts`
* http(s) `gums -i https://futzu.com/xaa.ts`
* udp `gums -i udp://127.0.0.1:4000`* multicast `gums -i udp://@235.1.2.3:4567`
* reading from stdin `cat myvideo.ts | gums````smalltalk
usage: gums [-h] [-i INPUT] [-a ADDR] [-b BIND_ADDR] [-t TTL] [-v]optional arguments:
-h, --help Show this help message and exit-i INPUT, --input INPUT
Like "/home/a/vid.ts" or "udp://@235.35.3.5:3535" or "https://futzu.com/xaa.ts"-a ADDR, --addr ADDR
Destination IP:Port like "227.1.3.10:4310"-b BIND_ADDR, --bind_addr BIND_ADDR
Local IP to bind to like "192.168.1.34". Default is 0.0.0.0-t TTL, --ttl TTL
Multicast TTL 1 - 255-v, --version
Show version```
#### __start gums (Sender) cli__
```smalltalk
a@debian:~/gums$ gums -i any.file
stream uri: udp://@235.35.3.5:3535
a@debian:~/gums$
```
## __gumc (Client) cli__
```lua
usage: gumc [-h] [-i INSTUFF]options:
-h, --help show this help message and exit
-i INSTUFF, --instuff INSTUFF
default is 'udp://@235.35.3.5:3535'```
### start gumc (Client) cli
```lua
a@debian:~/build/clean/gums$ gumc -i udp://@235.35.3.5:3535 -b 1024```
### Test gums and gumc together
* first terminal, start the client, __gumc__
```lua
a@debian:~/build/clean/gums$ gumc -i udp://@235.35.3.5:3535
```
* second terminal,start the sender, gums, and send a "hello"
```lua
a@debian:~/build/clean/gums$ printf 'hello' | gums -a 235.35.3.5:3535
stream uri: udp://@235.35.3.5:3535
```
### read all bytes from multicast stream and write to file with gumc (Client)
```lua
gumc -i udp://@235.35.3.5:3535 -o output.ts
```___
___
![image](https://user-images.githubusercontent.com/52701496/166299701-72ee908a-5053-45fc-a716-4b8ca4b1ef32.png)