Fetches Live tv streams from all Dutch public broadcast channels (Nederlandse Publieke Omroep), and re-streams them, whilst also providing an HDHomerun emulation for use in Emby or Plex. The Proxy runs as a small flask app.
I made this application as I watch tv very rarely, and when I do don't want to use the npo website. Using this service you can stream the following channels:
- NPO 1,2,3
- NPO 1,2,3 extra
- NPO nieuws
- NPO politiek
- NPO Radio 1,2,3,4 webcams
More chanels could be added later. The channels are retransmitted as if they came from an HDHomerun, which is a commonly used cable tv rebroadcaster for which Emby and Plex have good support.
I recommend using pipenv to install the required dependencies;
- Make sure you have pip installed, on ubuntu/debian install with
apt install python-pip
- Make sure you have FFMPEG installed, see https://www.ffmpeg.org/download.html for more information
- Install pipenv
pip install pipenv
- Clone this repo into a directory
git clone https://github.com/JortdeBokx/NPO-streams.git
, you can also download and unpack the zip - Change directory to the downloaded folder
cd NPO-streams
- Create a pipenv usign
pipenv --python3.6
(you can also use python3.7) - Install the dependencies usign
pipenv install
- Copy the template configuration files using
cp config/config.json.default config/config.json
andcp config/channels.json.default config/channels.json
- You can verify the app works by running
pipenv run python npo-streams.py
, if you go tolocalhost:5004
you should get a response from the server.
If you want to run NPO streams as a systemd service, I included a template service file.
You should edit this file such that the paths match the installation location.
After that copy the file to /etc/systemd/system/
and run systemctl enable NPOstreams.service
to enable the service on startup
In Emby or Plex you can now add a new tv tuner by entering the ip of the proxy as well as the port.
The configuration is split into 2 files
This file contains the general configuration of the flask app. Any flask configuration entries can be placed here, see the flask documentation for more info You can change the port and host to allow access from outside the machine.
You can also specify a quality number, this number can be 0 for the maximum quality, or an amount of vertical pixels, if that amount is available (see the gear icon on the npo player for avaiable qualities)
This file contains all the channels available. They are grouped by the class name of the stream handler that handle's their streams (this is to allow future expandibility) Each channel consists of 4 attrbutes: a number (this must be unique), a name, a key (unique identification for streaming service) and a flag to enable/disable specific channels.
I very happily accept contributions to this project, A lot can be done to improve the overal structure and add new features such as EPG, channel logos, etc... Please check the Contributing Guidelines for more information.
All content is released under the MIT license, see LICENSE for more information.
If you need any help installing/running/configuring/altering this project don't hesitate to contact me by creating an issue, or sending me an email.