Skip to content

mjs/cacophony-processing

 
 

Repository files navigation

cacophony-processing

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:

  1. 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.
  2. Converting uploaded audio files to MP3 format (if required). This is handled by audio_processing.py

Configuration

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.

Running on a developer machine

  • 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/or python thermal_processing.py.

Creating releases

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

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%