This is a server side component that runs alongside the Cacophony Project API, performing post-upload processing tasks.
Currently it supports two kinds of processing:
- Feeding uploaded CPTV (Cacophony Project Thermal Video) files to an external classifier. The tags and MP4 files generated by the classifier are passed back to the API server. This is handled by thermal_processing.py.
- Converting uploaded audio files to MP3 format (if required). This is handled by audio_processing.py
cacophony-processing requires access to the Cacophony API's
fileProcessing
API as well as direct access to the API's backing
object store. Copy processing_TEMPLATE.yaml
to processing.yaml
and
edit as appropriate.
The processing.yaml file may either be placed in /etc/cacophony or in the same directory as the code.
- Start cacophony-api locally.
- Copy processing_TEMPLATE.yaml to processing.yaml and edit as appropriate.
- Create and activate a virtualenv. This virtualenv must use Python 3.5 or later.
- Install dependencies:
pip install -r requirements.txt
- Run
python audio_processing.py
and/orpython thermal_processing.py
.
In order to create releases you'll need to install number of packages:
apt install dh-virtualenv devscripts
To create a new release:
- Ensure all work has been merged and your working copy has all the changes to be released.
- Update the version number in setup.py to the new number.
- Increment the version in the changelog, for example:
dch -v 1.4
. This will open an editor. Add a dummy comment like "1.4 release" and then save and exit. - Finalise the release:
dch --release ""
- Commit these changes.
- Merge these changes into master via a pull request.
- Update your local branch:
git pull origin master
- Tag the release with an annotated tag. For example:
git tag -a "v1.4" -m "1.4 release"
- Push the tag to Github:
git push --tags origin
- Build the release:
dpkg-buildpackage -us -uc -tc
- The resulting deb package ends up in the parent directory.
- Upload the relevant file to the Github release at https://github.com/TheCacophonyProject/cacophony-processing/releases