Skip to main content

A radio automation based on MPD

Project description

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.toml 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/

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

techrec-2.1.0-py3-none-any.whl (469.9 kB view details)

Uploaded Python 3

File details

Details for the file techrec-2.1.0-py3-none-any.whl.

File metadata

  • Download URL: techrec-2.1.0-py3-none-any.whl
  • Upload date:
  • Size: 469.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.21

File hashes

Hashes for techrec-2.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e56b6caf4d0c0cca7b4fdc65425292d30aa6a3e64ad8497cad0a1cca3a441b75
MD5 9af7655c68cc69228732e1d97934f239
BLAKE2b-256 1d8683623e673f7f389f614fc2e67c37795d99e9a3a8748d696b18501d805652

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page