https://github.com/sanix-darker/castthat
Cast an area of your screen over network with a single bash script
https://github.com/sanix-darker/castthat
display linux rtmp-server rtmp-stream x11
Last synced: 3 months ago
JSON representation
Cast an area of your screen over network with a single bash script
- Host: GitHub
- URL: https://github.com/sanix-darker/castthat
- Owner: Sanix-Darker
- Created: 2025-05-11T18:22:48.000Z (5 months ago)
- Default Branch: master
- Last Pushed: 2025-05-24T14:57:42.000Z (4 months ago)
- Last Synced: 2025-06-14T05:37:30.487Z (4 months ago)
- Topics: display, linux, rtmp-server, rtmp-stream, x11
- Language: Shell
- Homepage:
- Size: 268 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## CASTHAT

A basic script to stream an area of your screen over network accessible via http/tcp/udb (locally or over internet).
## REQUIREMENTS
- Any rtmp/rtsp server (in my case i used the docker mediamtx)
- [ffmpeg](https://ffmpeg.org)
- [slop](https://github.com/naelstrof/slop) (To select, drag to extract X, Y, W, H coordinates) for the portion of the screen that will be extract from display by ffmpeg.## HOW TO RUN CASTTHAT
### NO DOCKER
```console
# First, start the mediamtx docker (or any other rtsp/rtmp server)
$ docker run --rm -it --network=host bluenviron/mediamtx:latest
``````console
# Then run castthat script$ ./castthat/casthat.sh
> Drag to select the area you want to stream…
Failed to detect a compositor, OpenGL hardware-accelleration disabled... (you can ignore this error)
▶ Streaming 938x638@40 → rtmp://192.168.1.30:1935/live/stream
HLS playlist: http://192.168.1.30:8888/live/stream/index.m3u8
Low-latency HLS http://192.168.1.30:8888/live/stream/llhls.m3u8
```### OR WITH DOCKER COMPOSE
Only if you have X11 server up and running for you.
see the ./docker-compose.yml for more details```console
docker compose up --build
```## TROUBLESHOOTHING
If you find yourself unable to read/get frames from the X server,
try those commands :
```bash
xhost +local: # Allow local connections to X server
export DISPLAY=:0 # Set default display
```