Jae's Website
Random Beeps'n Boops


OSP, the alternative to Twitch

- Published on 15th June, 2020 -

Tags: software

This article is older than a year and might be outdated!

Not so long ago, I discovered the Open Streaming Platform (or OSP) projects that aims to bring an alternative to the website Twitch or Youtube for livestreams with a self-hosted solution.

After doing some research and asking the Tedomum team, we deployed an instance in order to test ourselves.
Just like Peertube, OSP allows the user to create multiple channels without having to create multiple accounts which is practical if you want to sort your channels by topic (gaming, drawing, talk shows…).
OSP also allows you to record automatically your streams, post videos and record clips, just like the other platforms.

The software itself was easy to run since we are using Docker & docker-compose. The problems we ran into were database problems, because the software is still in beta, the migration scripts are the ones by default for a flask project and are not migrating the DB correctly. If you run into this problem, you might have to downgrade the version, go to the admin panel, download a copy of the database, reset the instance with the new version and restore the database file at the installation process.
Here is what the Dockerfile looks like (Note: the latest revision, 0.7, is currently not supported by Docker):

version: '2.1'

    image: redis:latest

    image: deamos/openstreamingplatform:latest
      - ./data:/var/www
      - traefik.enable=true
      - traefik.frontend.rule=Host:${hostname}
      - traefik.port=80
      - traefik.frontend.headers.STSSeconds=315360000
      - traefik.frontend.headers.browserXSSFilter=true
      - traefik.frontend.customResponseHeaders=Server:www||X-Powered-By:www
      - REDIS_HOST=redis
      - FLASK_SALT
      - "db"
      - "redis"
      - "${ipv4}:1935:1935"
      - "${ipv6}:1935:1935"

    image: postgres:11
      - ./db:/var/lib/postgresql/data
      - ./wal:/wal
      - ./postgresql.conf:/var/lib/postgresql/data/postgresql.conf

    enable_ipv6: true
    driver: bridge
      driver: default
        - subnet: "${prefix}/80"
          gateway: "${prefix}1"

Also take note that postgres isn’t used officially by OSP, see their wiki for the official supported databases.
The port 1935 must be open so OBS (or any other streaming software) can send the data to rmtp://<your domain name>/stream

At the end, OSP is a really good piece of software, for instance, I am usually streaming (from my desktop) with a resolution of 1080p at 60 frames per second with a bitrate of 5000Kbps and OSP handles it right.
On the releases 0.6, the devs also added an option to transcode in real-time the stream so it can be viewed in much more resultion but we didn’t activated it on our instance since it consumes a shit ton of CPU.

The latest version at the time (0.7) adds a really interesting feature: the chat is now served with XMPP and other users from other XMPP servers can join and interract with the chat without needing an account on the instance. Sadly, as said earlier, this release isn’t ‘Docker-ready’ yet so we’ll have to play the waiting game.

For me OSP is a project you need to follow closely if you are into streaming but also want to be able to share your content on libre platforms.

That’s all for today, I’ll se you next time!