release candidate
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
# docker-compose.yaml
|
||||
version: '3'
|
||||
|
||||
services:
|
||||
local-index:
|
||||
image: apache-index
|
||||
|
||||
14
templates/docker-compose-preview.yaml
Normal file
14
templates/docker-compose-preview.yaml
Normal file
@ -0,0 +1,14 @@
|
||||
---
|
||||
|
||||
services:
|
||||
web:
|
||||
image: nginx:latest
|
||||
ports:
|
||||
- "8888:80"
|
||||
volumes:
|
||||
- {{ stream_preview_folder }}/nginx.conf:/etc/nginx/nginx.conf
|
||||
- {{ stream_preview_folder }}/html:/usr/share/nginx/html
|
||||
network_mode: bridge
|
||||
restart: always
|
||||
|
||||
...
|
||||
15
templates/preview_service.service
Normal file
15
templates/preview_service.service
Normal file
@ -0,0 +1,15 @@
|
||||
[Unit]
|
||||
Description=VCR Stream Preview
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
KillSignal=SIGINT
|
||||
WorkingDirectory={{ stream_preview_folder }}
|
||||
ExecStart={{ stream_preview_folder }}/preview_service.sh
|
||||
User=root
|
||||
Group=root
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
||||
9
templates/preview_service.sh
Normal file
9
templates/preview_service.sh
Normal file
@ -0,0 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
ffmpeg \
|
||||
-f alsa -i {{ audio_device }} -thread_queue_size 64 \
|
||||
-f v4l2 -framerate 24 -video_size 640x480 -input_format yuyv422 -i {{ video_device }} \
|
||||
-c:v libx264 -preset fast -crf 23 -c:a aac -b:a 192k -tune zerolatency \
|
||||
{{ mediamtx_local_ffmpeg }} \
|
||||
{{ mediamtx_remote_ffmpeg }} \
|
||||
|
||||
@ -3,9 +3,7 @@
|
||||
DATE=$(date +'%Y%m%d-%H%M%S')
|
||||
|
||||
ffmpeg \
|
||||
-f alsa -i {{ audio_device }} -thread_queue_size 64 \
|
||||
-f v4l2 -framerate 30 -video_size 640x480 -input_format yuyv422 -i {{ video_device }} \
|
||||
-i rtsp://localhost:8554/stream \
|
||||
-c:v libx264 -preset fast -crf 23 -c:a aac -b:a 192k -tune zerolatency \
|
||||
-f rtsp rtsp://localhost:8554/stream \
|
||||
-f mp4 {{ recording_capture_folder }}/$DATE.mp4
|
||||
-f mp4 {{ recording_capture_folder }}/$DATE.mp4 \
|
||||
|
||||
|
||||
Reference in New Issue
Block a user