No Description

boyska 597b9ba798 clarify whats needed 1 year ago
contrib dba069d757 moved away from github 2 years ago
docker e138d6b567 liquidsoap: pin version 1 year ago
techrec ab472daf5e fix missing validator 1 year ago
.gitignore bb8e4cdbfa Generate first empty file at container startup 2 years ago
.gitlab-ci.yml ef97c952d2 port tests to new async interface 2 years ago
12factors.md 4d6324e328 12factors.md format fixed 10 years ago
Dockerfile 85a53b4e53 docker: move to alpine 1 year ago
LICENSE e58997a1cf AGPL license and better readme 10 years ago
MANIFEST.in 0c254dabe2 FIX packaging to include static files 4 years ago
Makefile fd1e5df655 Make: allow specifying dir owner 2 years ago
README.md 597b9ba798 clarify whats needed 1 year ago
RELEASE.md 1350dad450 More information about release 10 years ago
docker-compose.yaml 59d84eafe2 Use dedicated db volume to avoid stale files 2 years ago
publish-release d8c8520950 publish release script 4 years ago
requirements.txt 137f6e050f update requirements for python 3.11 1 year ago
setup.cfg d0a5b7ed54 mypy can be run via gitlab-runner 2 years ago
setup.py d302596d73 nose → py.test 2 years ago
techrec.spec 5a40d24798 pyinstaller funzionante 4 years ago

README.md

TechRec

A Python3 web application that assist radio speakers in recording their shows. Meant to be simple to install and to maintain.

It basically takes a directory with the continuous recording and create new files "cutting/pasting" with ffmpeg.

Features

  • little system dependencies: python3 and ffmpeg
  • The interface is extremely simple to use
  • Supports nested recording (ie: to record an interview inside of a whole show)
  • There is no user system: any user opening the website will see the complete status of the applications. There is, also, nothing stored in cookie or similar mechanisms. This means that recording a session does not require a browser to remain open, or any kind of persistence client-side: server-side does it all. It also means that authorization must be done on another layer (for example, your webserver could add a Basic Auth)

How does it work

We suppose that you have a continous recording of your radio broadcasting. What techrec does is taking files from this directory and "cutting/pasting" parts of them. This can boil down to something like

ffmpeg -i concat:2014-20-01-00-00.mp3|2014-20-01-00-01.mp3 -acodec copy -ss 160 -t 1840 foo.mp3

This continous recording needs to be configured so that:

  • It can be split in multiple directories, but the granularity of this must be below one directory per day.
  • The filename must be fully informative, without looking at the parent directories.

How to run

pip install .
env TECHREC_CONFIG=yourconfig.py techrec serve

Implementation details

It is based on fastapi, a really nice framework. Simple APIs are offered through it, and the static site uses them through JS.

Jobs are not dispatched using stuff like celery, but just using BackgroundTasks, in order to keep the installation as simple as possible.

The encoding part is delegated to ffmpeg, but the code is really modular so changing this is a breeze. To be quicker and avoid the quality issues related to reencoding, the codec "copy" is used: this means that input and output must have the same format.

testing

gitlab-runner exec docker test

(or, pytest-3, assuming you have a properly configured system)

screenshots

See screenshots at https://boyska.degenerazione.xyz/proj/techrec/