we’ve recently spun up an owncast server for online video streaming at miru.miyaku.media, and wanted to share our notes with some bumps and tips we’ve encountered along the way in case they’re useful to anyone else looking to do something similar!
- video configuration: this is probably the most context-specific setting you’ll need to deal with for your owncast server. what kind of video are you planning on streaming? what kind of hardware are you running on? what does your typical user expect? i can’t answer those questions for you, but i can tell you what i’m doing for my configuration. owncast defaults to a 1200kbps unscaled stream. i changed this to the owncast webUI maximum of 6000kbps with high quality. i then added a 1200kbps 720p downscale stream at low quality. this seems to be working fine for now but i could probably tweak these settings more (can i get away with medium/high quality on the downscale stream without introducing buffering? should the downscale stream be 480p @ 1200kbps instead? maybe). likewise if you know you’ll only be streaming e.g. 480p content you can set your stream settings accordingly
- streaming to owncast: you might have some constraints here depending on what you want to do, but for showing pre-recorded content on a livestream the best solution is probably OBS. i tried
ffmpeg
for some test streams but it’s difficult to “run a stream” with because if anything goes wrong the stream will break and your options for resuming it without interrupting or confusing clients are limited. right now i have OBS set to stream to owncast at the exact same 1080p @ 24fps @ 6000kbps stream settings to reduce re-encoding and load on the owncast server, which seems to work well. i also pre-transcode my video to do any subtitle burning, and use the VLC source in OBS to act as a media playlist (NB: if you have media with different sizes or aspect ratios, they probably won’t play together nicely in a single OBS VLC playlist). i use the OBS advanced scene switcher plugin to schedule automatically starting a stream, switching scenes, and stopping a stream. one advantage of OBS is that you can still alter and interact with OBS while it’s streaming if something goes wrong or you need to change what you’re streaming/playing. OBS “studio mode” will even let you stage and alter scenes before switching to them live on stream
- owncast S3 integration: owncast seemed to scale surprisingly well with my configuration even without this so i don’t know what the limits are, but i wanted to switch to S3 + CDN for video delivery to make sure we could scale past my upstream limits without issue. for S3, you will need to enable ACLs on the bucket for owncast’s uploads to work, because owncast tries to set a public-read ACL by default and will error out confusingly if ACLs aren’t enabled on the bucket (you may see this in the logs as messages about “Giving up uploading” to object storage). you also need to make sure Access-Control-Allow-Origin is set appropriately for your S3 or CDN responses
- owncast federation & chat: both of these can be difficult to configure if you’re using an HTTP(S) proxy in front of your owncast server, so we haven’t gotten around to configuring them yet! luckily owncast works just fine with them disabled
- enabling verbose logging in a dockerized owncast: set
command: -enableVerboseLogging
for the owncast/owncast
image in your docker-compose.yml
. you can see other command-line options here
now get out there and stream some obscure cool shit of your own!