phoebe is an adaptive, transcoding media robot for ICHC.
Plays media from most sites supported by youtube-dl, with interactive media playback and vote-controlled user moderation.
- phoebe connects using the ICHC API and the ICHC RTMP endpoint, both features available only to supporters. Thus, the account you configure the bot to use must be a supporter account.
- You'll likely encounter unexpected behavior trying to log in to the same channel with the same account the bot is connected with, and messages will appear in random places and the overall function of the bot is likely to break down. Thus, a dedicated account is necessary.
- Ensure Python 3.7+ is installed and updated.
- Compile from source and install gstreamer for your platform (or install it from packages, if the PyGObject/GLib support mentioned later are included), along with the base, good, bad, and ugly plugin packages, taking care to observe the following requirements when running
./configure
:- If compiling from source:
- Compile all packages with support for GObject introspection, and GLib asserts.
- Optional: Ensure orc is installed for orc optimization support (modest performance bump).
- If compiling from source:
- Compile from source and install (or install from packages) the gstreamer libva plugins at the same version as those gsteamer packages previously installed.
- Install youtube-dl; take note of where the executable is placed (e.g.,
which youtube-dl
) - Create a directory for phoebe to run, then extract the contents of the latest release archive into that directory.
- Copy
config.yaml
andpermissions.yaml
fromexamples/
and modify them to fit your installation. - Place an h264-encoded idle background video (in an MP4 container) in the root install path, and rename it to
idlebg.mp4
. - Ensure all files in the directory are owned by the same user that will run the application.
- Run phoebe with
./run.py
, or see thesystemd
directory for more information on setting up the bot as a service.
- !commands - list all unprivileged commands
- !direct - play media files by URL (e.g. .mp4)
- !help - display help [optionally about a specific command]
- !play url or keyords - play video/audio from supported sites
- !stop - stop playback of media you've queued
- !jump hh:mm:ss - jump to a specific time in currently playing media you've queued
- !ff [secs] - fast-forward 10 (or [secs]) seconds in currently playing media you've queued
- !rew [secs] - rewind 30 (or [secs]) seconds in currently playing media you've queued
- !now - show details about what's playing right now
- !next - list media coming up next
- !drop [#] - drop from the queue the most recent (or specified) item you've added
- !sites - list sites from which the bot plays media
- !yea - increase the rating of what's playing
- !nay - decrease the rating of what's playing
- Commands restricted in
permissions.yaml
:- !halt - stop playback of media others have queued
- !hello - generate a simple test message
- !stats - display various runtime statistics
- Asynchronous event handling with Circuits
- Media URL retrieval with youtube-dl
- Media transcoding and transmission with Gstreamer, bound to Python with PyGObject and GObject introspection
- Python 2.7+, with modules:
- Circuits
- lxml
- OpenSSL
- requests
- yaml
- Gstreamer 1.14+, compiled with support for GObject introspection, with non-base elements:
- flvmux
- h264parse
- lamemp3enc
- mpegaudioparse
- rtmpsink
- x264enc
- youtube-dl, kept up to date
- bin/ -- binaries
- play.py -- phoebe-player runtime
- filters/ -- keyword search filter modules (see
filters/filter.py.example
) - lib/ -- application modules (a.k.a., "the good stuff")
- commands.py -- command parsing and handlers
- core.py -- ICHC API handler, message processing, player supervision, core event handlers
- events.py -- Circuits Event classes for all generated events
- player.py -- Gst-based player module
- utils.py -- play-request container class, site filter methods
- config.yaml -- example main configuration file
- permissions.yaml -- example permissions configuration file
- run.py -- main runtime
- Ensure Python 2.7+ is installed and updated.
- Compile and install gstreamer for your platform, along with the base, good, bad, and ugly plugin packages, taking care to observe the following requirements when running
./configure
:- Compile all packages with support for GObject introspection, and GLib asserts.
- Optional: Ensure orc is installed for orc optimization support (modest performance bump).
- Compile and install the gstreamer libva plugins at the same version as those gsteamer packages previously installed.
- Install youtube-dl; take note of where the executable is placed (e.g.,
which youtube-dl
) - Create a directory for phoebe to run, then use
git checkout
to checkout the release branch into that directory. - Copy
config.yaml
andpermissions.yaml
and modify to fit your installation. - Ensure all files in the directory are owned by the same user that will run the application.
- Run phoebe with
./run.py