Package: offstream
offstreamRecord your favorite twitch streams automatically and watch them later.There is no web UI, just use curl and your favorite video player.Streams are recorded as is, without re-transcoding.Recordings are never muted.Ads are optional.You can run it on Heroku (completely free) or locally.Recordings are stored on IPFS.RSS feed of all recordings is available. It can be consumed by youtube-dl,
VLC, and other feed readers.Streams are available while recording is in progress.InstallingOption 1: HerokuYou can deploy the app to Heroku by clicking the button below and following the
instructions. IMPORTANT: When the app is deployed, click on the "View" button at
the bottom to complete the setup.Option 2: Local installationInstall the package.$pipinstalloffstreamSetup your local sqlite database located at~/.offstream/offstream.db.$offstreamsetupYou will get credentials to control the app. I recommend adding them to your~/.netrcfile (or_netrcon Windows):machine <your-app-hostname>
    login offstream
    password <your-password>Start the app.$offstreamUsageOnce your app is ready, you can add your favorite streamers.$curl-nhttps://your-app-name.herokuapp.com/streamers-dname=garybernhardt
$curl-nhttps://your-app-name.herokuapp.com/streamers-dname=esl_sc2-dmax_quality=720p60Themax_qualityparameter is optional and defaults tobest. Typical stream
quality options areaudio_only,160p,360p,480p,720p,720p60,1080p60,best.When any of the streamers goes live, the app will record the stream.An RSS feed of all recordings is available athttps://your-app-name.herokuapp.com/rss.Finally, to watch the latest recording, open the following URL in mpv, VLC,
QuickTime, or any other video player.$mpvhttps://your-app-name.herokuapp.com/latest/{streamer_name}APIPOST /streamers -d name=<streamer_name> -d max_quality=<quality>Track a new streamer.Requires auth.DELETE /streamers/{streamer_name}Delete a streamer. WARNING: Deletes all associated recordings too.Requires auth.GET /latest/{streamer_name}Get the latest recorded stream.POST /settings -d ping_start_hour=<hour> -d ping_end_hour=<hour>Modify ping settings. On Heroku, offstream keeps itself awake 24/7 by pinging
itself periodically. You can save some dyno hours by changing theping_start_hourandping_end_hoursettings to let the app sleep when no
one is streaming.Requires auth.GET /rssorGET /rss?limit=100RSS feed of recent recordings.ConfigurationThe following environment variables are supported.OFFSTREAM_FLUSH_THRESHOLDDefault: automatically calculated, normally100000000bytes (100M).OFFSTREAM_CHECK_INTERVALDefault:120secondsOFFSTREAM_IPFS_API_ADDRDefault:/dns/ipfs.infura.io/tcp/5001/httpsOFFSTREAM_IPFS_GATEWAY_URI_TEMPLATEDefault:https://{cid}.ipfs.infura-ipfs.io/{path}OFFSTREAM_MAX_CONCURRENT_RECORDERSDefault:5DATABASE_URLDefault:sqlite:///$HOME/.offstream/offstream.dbTZPreferred timezone, e.g.America/New_York. Please seehttps://en.wikipedia.org/wiki/List_of_tz_database_time_zones#ListFAQQ: My video player reports the following error:keepalive request failed for 'https://bafybeie3v6lomkfti2b4zsa4yj35nypojllvjrzpbzyxhn5tkfoqaswmbm.ipfs.infura-ipfs.io/18846.ts'A: This warning can be safely ignored. It's because Infura keeps the root
content identifier (CID) in a subdomain, rather than in the path portion of
the URL.See AlsoPlease also check out thestreamlinkproject.