techrec/README.md

78 lines
2.5 KiB
Markdown
Raw Normal View History

2013-12-13 17:59:46 +01:00
TechRec
2013-11-26 14:31:18 +01:00
=======
2021-08-24 22:11:06 +02:00
A Python3 web application that assist radio speakers in recording their shows.
2014-04-14 19:06:16 +02:00
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.
2013-12-13 17:59:46 +01:00
Features
=========
2021-08-24 23:21:31 +02:00
* little system dependencies: python3 and ffmpeg
2013-12-13 17:59:46 +01:00
* The interface is extremely simple to use
2019-11-16 01:57:40 +01:00
* Supports nested recording (ie: to record an interview inside of a whole
2013-12-13 17:59:46 +01:00
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
2014-04-14 19:06:16 +02:00
does it all. It also means that authorization must be done on another layer
(for example, your webserver could add a Basic Auth)
2014-04-22 11:31:01 +02:00
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
```sh
ffmpeg -i concat:2014-20-01-00-00.mp3|2014-20-01-00-01.mp3 -acodec copy -ss 160 -t 1840 foo.mp3
```
2023-03-31 02:33:27 +02:00
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.
2021-08-24 22:11:06 +02:00
How to run
===========
```sh
pip install .
env TECHREC_CONFIG=yourconfig.py techrec serve
2021-08-24 22:11:06 +02:00
```
2014-04-22 11:31:01 +02:00
2013-11-26 14:31:18 +01:00
Implementation details
======================
2021-08-24 23:21:31 +02:00
It is based on [fastapi](https://fastapi.tiangolo.com/), a really nice
framework. Simple APIs are offered through it, and the static site uses them
through JS.
2021-08-24 23:21:31 +02:00
Jobs are not dispatched using stuff like celery, but just using
[`BackgroundTasks`](https://fastapi.tiangolo.com/tutorial/background-tasks/),
in order to keep the installation as simple as possible.
2013-11-26 15:50:59 +01:00
2014-04-14 19:06:16 +02:00
The encoding part is delegated to `ffmpeg`, but the code is really modular so
2014-04-22 11:31:01 +02:00
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.
2019-11-15 22:30:37 +01:00
testing
-----------
2021-09-29 00:39:21 +02:00
```
gitlab-runner exec docker test
```
(or, `pytest-3`, assuming you have a properly configured system)
2019-11-16 01:57:40 +01:00
screenshots
--------------
See screenshots at
[https://boyska.degenerazione.xyz/proj/techrec/](https://boyska.degenerazione.xyz/proj/techrec/)