diff --git a/config/recorder/mediamtx.yml.dist b/config/recorder/mediamtx.yml.dist index 62b4641..2d82614 100644 --- a/config/recorder/mediamtx.yml.dist +++ b/config/recorder/mediamtx.yml.dist @@ -299,7 +299,7 @@ pathDefaults: # Path of recording segments. # Extension is added automatically. # 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. # Available formats are "fmp4" (fragmented MP4) and "mpegts" (MPEG-TS). recordFormat: fmp4 @@ -312,8 +312,7 @@ pathDefaults: recordSegmentDuration: 12h # Delete segments after this timespan. # Set to 0s to disable automatic deletion. - # recordDeleteAfter: 24h - recordDeleteAfter: 168h + recordDeleteAfter: 24h ############################################### @@ -556,7 +555,9 @@ pathDefaults: paths: live: 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 # do not match another entry. diff --git a/docker-compose.yml b/docker-compose.yml index 129e919..69246c7 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -77,23 +77,50 @@ services: - 8554:8554 volumes: - "./config/recorder/mediamtx.yml:/mediamtx.yml" - - "./data/archive:/recordings" + - "./data/recorder:/recordings" restart: unless-stopped networks: - net labels: - 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: depends_on: - "recorder" - build: ./src/archive - image: stream-archive:latest + image: xemle/home-gallery:1.14.5 + 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: - - "./config/archive/nginx.conf:/etc/nginx/nginx.conf" - - "./data/archive:/recordings:ro" + - "./config/archive/gallery.config.yml:/data/config/gallery.config.yml" + - "./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 networks: - net labels: - meta.role=archive +