experiment with vod viewer based on xemle/home-gallery

This commit is contained in:
deflax 2024-01-02 22:37:32 +00:00
parent fc21a2a2d8
commit a0ac762cec
2 changed files with 37 additions and 9 deletions

View file

@ -299,7 +299,7 @@ pathDefaults:
# Path of recording segments. # Path of recording segments.
# Extension is added automatically. # Extension is added automatically.
# Available variables are %path (path name), %Y %m %d %H %M %S %f %s (time in strftime format) # Available variables are %path (path name), %Y %m %d %H %M %S %f %s (time in strftime format)
recordPath: ./recordings/%path/%Y-%m-%d_%H-%M-%S-%f recordPath: ./records/%path/%Y-%m-%d_%H-%M-%S-%f
# Format of recorded segments. # Format of recorded segments.
# Available formats are "fmp4" (fragmented MP4) and "mpegts" (MPEG-TS). # Available formats are "fmp4" (fragmented MP4) and "mpegts" (MPEG-TS).
recordFormat: fmp4 recordFormat: fmp4
@ -312,8 +312,7 @@ pathDefaults:
recordSegmentDuration: 12h recordSegmentDuration: 12h
# Delete segments after this timespan. # Delete segments after this timespan.
# Set to 0s to disable automatic deletion. # Set to 0s to disable automatic deletion.
# recordDeleteAfter: 24h recordDeleteAfter: 24h
recordDeleteAfter: 168h
############################################### ###############################################
@ -556,7 +555,9 @@ pathDefaults:
paths: paths:
live: live:
record: yes record: yes
recordPath: ./recordings/live/%Y-%m-%d_%H-%M-%S-%f recordDeleteAfter: 0s
recordPath: ./records/%path/%Y-%m-%d_%H-%M-%S-%f
runOnRecordSegmentComplete: echo $MTX_SEGMENT_PATH
# Settings under path "all_others" are applied to all paths that # Settings under path "all_others" are applied to all paths that
# do not match another entry. # do not match another entry.

View file

@ -77,23 +77,50 @@ services:
- 8554:8554 - 8554:8554
volumes: volumes:
- "./config/recorder/mediamtx.yml:/mediamtx.yml" - "./config/recorder/mediamtx.yml:/mediamtx.yml"
- "./data/archive:/recordings" - "./data/recorder:/recordings"
restart: unless-stopped restart: unless-stopped
networks: networks:
- net - net
labels: labels:
- meta.role=recorder - meta.role=recorder
archive-api:
# custom build via
#build: packages/api-server
image: xemle/home-gallery-api-server
environment:
# TensorflowJS backends
# - cpu: slowest and best support
# - wasm: good perfromance for arm64 and amd64 platforms
# - node: best performance on amd64 platform
#- BACKEND=cpu
- BACKEND=wasm
#- BACKEND=node
archive: archive:
depends_on: depends_on:
- "recorder" - "recorder"
build: ./src/archive image: xemle/home-gallery:1.14.5
image: stream-archive:latest environment:
- GALLERY_API_SERVER=http://archive-api:3000
- GALLERY_API_SERVER_CONCURRENT=1 # for SoC devices like Rasperry Pi. Use 5 otherwise
- GALLERY_API_SERVER_TIMEOUT=60 # for SoC devices like Rasperry Pi. Use 30 otherwise
#- GALLERY_USE_NATIVE=ffprobe,ffmpeg,vipsthumbnail # On issues with sharp resizer
- GALLERY_OPEN_BROWSER=false
# Use polling for safety of possible network mounts. Try 0 to use inotify via fs.watch
- GALLERY_WATCH_POLL_INTERVAL=300
volumes: volumes:
- "./config/archive/nginx.conf:/etc/nginx/nginx.conf" - "./config/archive/gallery.config.yml:/data/config/gallery.config.yml"
- "./data/archive:/recordings:ro" - "./data/archive:/data"
- "./data/recorder/vod:/data/vod:ro"
ports:
- "3000:3000"
#user: "${CURRENT_USER}"
entrypoint: ['node', '/app/gallery.js']
command: ['run', 'server']
restart: unless-stopped restart: unless-stopped
networks: networks:
- net - net
labels: labels:
- meta.role=archive - meta.role=archive