DVR for internet radio
Go to file
dave a057d9d13b Updated readme 2014-08-30 10:45:21 -07:00
jstemplates hid recorder status number 2014-08-29 19:56:42 -07:00
libs Store sqlite connection instead of losing it 2014-08-26 17:37:45 -07:00
static Specify jPlayer solution order 2014-08-29 17:05:39 -07:00
templates Begin adding player on files page 2014-08-28 22:11:01 -07:00
Readme.md Updated readme 2014-08-30 10:45:21 -07:00
app.py Correct podcast date format 2014-08-28 21:51:49 -07:00

Readme.md

Streamrecord


A python3 web app to record internet radio streams and present them in a podcast

Requirements

  • python3
  • sqlite3
  • jinja2
  • cherrypy
  • uwsgi
  • mkvmerge
  • avconv

Installation

  • Checkout the source to somewhere on your hard disk. In the examples below, the path to the root of the source is /home/streamrecord/app/. Cd to here.
  • Use the sqlite3 command line client to called "db.sqlite", and execute the two create table queries in lib/database.py. Syntax is: `sqlite3 db.sqlite ''.
  • Write the config for uwsgi, start that daemon
  • Write the config for nginx, and view the page.

Podcast usage: each schedule has a numerical id. To view the podcast, http://my.server/api/getPodcast?id=

Uwsgi config

Something like:

[uwsgi]
uid = streamrecord
pid = streamrecord
plugins = python3
touch-reload = /home/streamrecord/app/app.py
chdir = /home/streamrecord/app/
wsgi-file = /home/streamrecord/app/app.py
callable = application
master = true
processes = 1
socket = 127.0.0.1:3330
pidfile = /tmp/streamrecord.pid
enable-threads = true
no-threads-wait = true
die-on-term = true

Nginx config

Something like:

server {
	listen 30000;
	listen [::]:30000 ipv6only=on;
	include uwsgi_params;
	access_log /var/log/nginx/stremrecord.log;
	location / {
		uwsgi_pass 127.0.0.1:3330;
	}
	location /streamrecord/static/ {
		autoindex on;
		alias /home/streamrecord/app/static/;
	}
}