Church_AutoStream/README.md

2.0 KiB

Church Autostream

The goal of this project is to fully automatically stream a church service without any user input required. This is for people who do not understand how a computer works but still want to join the service.

See https://wiki.herreweb.nl/e/en/Projects/Church_AutoStream for an extended overview of the project.

Basic setup overview

Each person who wants a setup at our church will receive a prepared RPI4, which will be used to automatically run this script on startup.

Requirements

Any computer that can run a recent browser and python3. I highly recommend a Linux OS and even better a RPI.

Adding streaming service

Both Youtube and Kerkdienstgemist are provided as streaming service in this auto streamer. However, if you want to implement your own streamer for a different streaming service you can do that by adding a file to streaming with code for the streaming service. You will need to create class that inherits the StreamService class in streaming/base_stream.py and add the following functions:

class NewStreamingService:
    def __init__(self, churchid) -> None:
        pass

    def livestream_url(self):
        #Code to get livestream url
        
    def post_load_actions(self, driver):
        # Actions to do after loading the page. Like clicking on the video to start playing.

Next you will need to tell the streamer to use this service when specified in the config. Edit streamer.py and add the line according to your service

    elif self.streaming_method == "yourservice":
        self.stream_service = NewStreamingService(churchid)

You will also need to specify this service your config file.

The stream for youtube can also be started using streamlink. This is less resource intensive but currently there is no way of showing that no stream is active and it might be less stable then the browser.

Todo

  • Add fallback option for the streamer. For example: If youtube does not work, fall back to KDG