No description
Find a file
boyska 43076610d3
Some checks failed
Install and run tests / test (3.13) (push) Successful in 1m8s
Install and run tests / test (3.9) (push) Successful in 1m1s
Install and run tests / test (3.11) (push) Successful in 2m3s
Install and run tests / mypy (3.11) (push) Failing after 1m16s
force download instead of playing
fix #36
2025-03-22 12:23:10 +01:00
.forgejo/workflows py3.9: CI tests 2025-03-21 20:00:56 +01:00
contrib/docker upgrade shipped conf files to TOML syntax 2025-03-16 12:33:22 +01:00
docker Merge remote-tracking branch 'origin/10-look-directory' into v2 2025-03-19 18:11:50 +01:00
src/techrec force download instead of playing 2025-03-22 12:23:10 +01:00
.gitignore Generate first empty file at container startup 2021-09-15 21:53:57 +02:00
12factors.md 12factors.md format fixed 2014-04-22 11:33:05 +02:00
CHANGELOG.md force download instead of playing 2025-03-22 12:23:10 +01:00
docker-compose.yaml Use dedicated db volume to avoid stale files 2021-09-20 22:52:27 +02:00
Dockerfile Merge remote-tracking branch 'origin/10-look-directory' into v2 2025-03-19 18:11:50 +01:00
LICENSE AGPL license and better readme 2014-04-14 19:06:16 +02:00
Makefile Make: allow specifying dir owner 2021-09-17 10:23:04 +02:00
MANIFEST.in move to src-layout 2025-03-15 16:54:33 +01:00
publish-release publish release script 2019-11-15 22:35:56 +01:00
pyproject.toml release 2.1.0 2025-03-22 12:15:12 +01:00
README.md Merge remote-tracking branch 'origin/10-look-directory' into v2 2025-03-19 18:11:50 +01:00
RELEASE.md update release instructions 2025-03-22 12:15:43 +01:00
setup.cfg fix mypy invocation 2025-03-16 01:59:15 +01:00
techrec.spec pyinstaller funzionante 2019-11-15 23:23:05 +01:00

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/