Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/wizardishungry/hls-await
Twitter bot for monitoring HLS streams
https://github.com/wizardishungry/hls-await
bots ffmpeg hls juche perceptual-hashes twitter
Last synced: 10 days ago
JSON representation
Twitter bot for monitoring HLS streams
- Host: GitHub
- URL: https://github.com/wizardishungry/hls-await
- Owner: wizardishungry
- License: agpl-3.0
- Created: 2021-03-26T20:26:40.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-12-18T21:12:13.000Z (almost 2 years ago)
- Last Synced: 2024-10-11T02:44:34.967Z (27 days ago)
- Topics: bots, ffmpeg, hls, juche, perceptual-hashes, twitter
- Language: Go
- Homepage: https://twitter.com/KCTV_bot
- Size: 3.46 MB
- Stars: 9
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# hls-await
This is a work-in-progress monitor for [HLS](https://en.wikipedia.org/wiki/HTTP_Live_Streaming) streams
to detect activity via [perceptual hashing](https://en.wikipedia.org/wiki/Perceptual_hashing).Currently it monitors a feed of [North Korea TV](https://kcnawatch.org/korea-central-tv-livestream/)
and [posts screencaps to Twitter](https://twitter.com/KCTV_bot).## Features / TODO
- [ ] [Roku Stream Tester](http://devtools.web.roku.com/stream_tester/html/index.html) launching *partially*
- [x] HTTP cache for segments *saves bandwidth*
- [x] Twitter
- [ ] Command via DM *Increases rate, kill switch, change perceptual hashing threshold*
- [ ] Resume threads on restart.
- [x] Process separation of ffmpeg / CGO. *This deserves a writeup!*
- [Passing FDs over Unix sockets](https://github.com/mindreframer/golang-stuff/blob/master/github.com/youtube/vitess/go/umgmt/fdpass.go)
- [Internals of Go's new fuzzing system](https://jayconrod.com/posts/123/internals-of-go-s-new-fuzzing-system) - example of how to use a child process as an rpc service
- [x] Find the most interesting images *avoid blank screens*
- [x] Tweak the perceptual hash thresholds
- [x] Revise the clunky FSM code.
- [x] [Test pattern detection](https://twitter.com/KCTV_bot/status/1496722859904978948)## State Machine
![alt](./fsm.svg)
## Cgo dependencies
```bash
sudo apt-get install -y libavfilter7 libavdevice58 libavformat-dev libavcodec-dev libavdevice-dev libavutil-dev libswscale-dev libswresample-dev libavfilter-dev
```# Known to work on
- Ubuntu 21.10
- macOS - ffmpeg libraries installed via Hombrew. Not validated recently; suspect a bunch of work to be done.# System requirements
- Probably > 2 gigabytes of free memory?