-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9f4b082
commit bd3a5ef
Showing
21 changed files
with
924 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# This workflow uses actions that are not certified by GitHub. | ||
# They are provided by a third-party and are governed by | ||
# separate terms of service, privacy policy, and support | ||
# documentation. | ||
|
||
# GitHub recommends pinning actions to a commit SHA. | ||
# To get a newer version, you will need to update the SHA. | ||
# You can also reference a tag or branch, but the action may change without warning. | ||
|
||
name: Publish Docker Image | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
push_to_registry: | ||
name: Push Docker image to Docker Hub | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out the repo | ||
uses: actions/checkout@v4 | ||
|
||
- name: Log in to Docker Hub | ||
uses: docker/login-action@v3 | ||
with: | ||
username: ${{ secrets.DOCKER_HUB_USER_NAME }} | ||
password: ${{ secrets.DOCKER_HUB_PASSWORD }} | ||
|
||
- name: Extract metadata (tags, labels) for Docker | ||
id: meta | ||
uses: docker/metadata-action@v5 | ||
with: | ||
images: borisbrock/freecorder | ||
|
||
- name: Build and push Docker image | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: . | ||
push: true | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,131 @@ | ||
# Byte-compiled / optimized / DLL files | ||
__pycache__/ | ||
*.py[cod] | ||
*$py.class | ||
|
||
# C extensions | ||
*.so | ||
|
||
# Distribution / packaging | ||
.Python | ||
build/ | ||
develop-eggs/ | ||
dist/ | ||
downloads/ | ||
eggs/ | ||
.eggs/ | ||
lib64/ | ||
parts/ | ||
sdist/ | ||
var/ | ||
wheels/ | ||
pip-wheel-metadata/ | ||
share/python-wheels/ | ||
*.egg-info/ | ||
.installed.cfg | ||
*.egg | ||
MANIFEST | ||
|
||
# PyInstaller | ||
# Usually these files are written by a python script from a template | ||
# before PyInstaller builds the exe, so as to inject date/other infos into it. | ||
*.manifest | ||
*.spec | ||
|
||
# Installer logs | ||
pip-log.txt | ||
pip-delete-this-directory.txt | ||
|
||
# Unit test / coverage reports | ||
htmlcov/ | ||
.tox/ | ||
.nox/ | ||
.coverage | ||
.coverage.* | ||
.cache | ||
nosetests.xml | ||
coverage.xml | ||
*.cover | ||
*.py,cover | ||
.hypothesis/ | ||
.pytest_cache/ | ||
|
||
# Translations | ||
*.mo | ||
*.pot | ||
|
||
# Django stuff: | ||
*.log | ||
local_settings.py | ||
db.sqlite3 | ||
db.sqlite3-journal | ||
|
||
# Flask stuff: | ||
instance/ | ||
.webassets-cache | ||
|
||
# Scrapy stuff: | ||
.scrapy | ||
|
||
# Sphinx documentation | ||
docs/_build/ | ||
|
||
# PyBuilder | ||
target/ | ||
|
||
# Jupyter Notebook | ||
.ipynb_checkpoints | ||
|
||
# IPython | ||
profile_default/ | ||
ipython_config.py | ||
|
||
# pyenv | ||
.python-version | ||
|
||
# pipenv | ||
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. | ||
# However, in case of collaboration, if having platform-specific dependencies or dependencies | ||
# having no cross-platform support, pipenv may install dependencies that don't work, or not | ||
# install all needed dependencies. | ||
#Pipfile.lock | ||
|
||
# PEP 582; used by e.g. github.com/David-OConnor/pyflow | ||
__pypackages__/ | ||
|
||
# Celery stuff | ||
celerybeat-schedule | ||
celerybeat.pid | ||
|
||
# SageMath parsed files | ||
*.sage.py | ||
|
||
# Environments | ||
.env | ||
.venv | ||
env/ | ||
venv/ | ||
ENV/ | ||
env.bak/ | ||
venv.bak/ | ||
|
||
# Spyder project settings | ||
.spyderproject | ||
.spyproject | ||
|
||
# Rope project settings | ||
.ropeproject | ||
|
||
# mypy | ||
.mypy_cache/ | ||
.dmypy.json | ||
dmypy.json | ||
|
||
# Pyre type checker | ||
.pyre/ | ||
|
||
# Additional files/folders | ||
data | ||
local_testing/test_data | ||
/recordings | ||
.testdata |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
# Freecorder | ||
|
||
Freecorder is minimalistic NVR (Network Video Recorder). It was designed to record IP camera footage 24/7 in a rolling manner. It is simple to set up, runs on almost every platform (Docker or bare metal) and uses very little resources. | ||
|
||
![Screenshot](images/screenshot.png) | ||
|
||
The following features make this project unique: | ||
- Ultra low resource usage: this project was designed to run with minimal CPU and memory footprint. No GPU/NPU is required. | ||
- Flexible deployment options: you can run this project bare metal, e.g. on a Rasberry Pi, or deploy it via Docker, e.g. on your NAS. | ||
- Total simplicity: the user interface is clean, modern, minimalistic and very easy to use. | ||
|
||
## Features | ||
|
||
- 24/7 continuous video recording from an RSTP stream (IP camera). | ||
- Audio and video support. | ||
- Web interface for browsing all recorded clips. | ||
- Direct playback of clips via the web interface. | ||
- Direct downloading of clips via the web interface. | ||
|
||
## What this project does *NOT* offer | ||
|
||
In order to achieve minimal hardware resource usage, several features implemented by other NVR systems are not available in this project: | ||
- Live video view | ||
- Motion detection | ||
- Object detection | ||
|
||
If you require these features, take a look at other projects like Frigate, Shinobi or ZoneMinder. | ||
|
||
# Configuration | ||
|
||
Todo | ||
|
||
# Deployment | ||
|
||
## Via Docker | ||
|
||
Todo | ||
|
||
## Bare Metal | ||
|
||
Todo | ||
|
||
# Used Assets and Libraries | ||
|
||
The following assets and libraries are used by this project: | ||
|
||
- [PicoCSS CSS Framework](https://picocss.com/) | ||
- [ffmpeg](https://ffmpeg.org/) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import yaml | ||
import traceback | ||
import logging | ||
|
||
|
||
class Config: | ||
def __init__(self, file_name): | ||
try: | ||
with open(file_name, "r", encoding="utf-8") as file: | ||
self.config_data = yaml.safe_load(file) | ||
self.load_settings(self.config_data) | ||
except Exception as e: | ||
logging.error("Config error: " | ||
"loading/parsing the configuration file failed") | ||
logging.error(e) | ||
traceback.print_exc() | ||
exit() | ||
|
||
def load_settings(self, yaml_data): | ||
'''Copy settings from the yaml data for easier access.''' | ||
# Logging | ||
self.log_level = logging.INFO | ||
if self.config_data['logging'] == 'verbose': | ||
logging.info("Verbose logging is enabled") | ||
self.log_level = logging.DEBUG |
Oops, something went wrong.