puh current config pre departure
This commit is contained in:
12
archive/docker-compose-owncast.yaml.j2
Normal file
12
archive/docker-compose-owncast.yaml.j2
Normal file
@ -0,0 +1,12 @@
|
||||
services:
|
||||
|
||||
owncast:
|
||||
container_name: owncast
|
||||
image: owncast/owncast:latest
|
||||
volumes:
|
||||
- {{ owncast_working_folder}}:/app/data
|
||||
ports:
|
||||
- {{ owncast_web_port }}:8080
|
||||
- 1935:1935
|
||||
restart: always
|
||||
network_mode: bridge
|
||||
86
archive/notes.txt
Normal file
86
archive/notes.txt
Normal file
@ -0,0 +1,86 @@
|
||||
Notes on system itself
|
||||
The service contol will have the following components:
|
||||
PHP site that will make the API calls
|
||||
I don't have time to learn something new
|
||||
It will be similar to the photo refresh site
|
||||
Flow will be get status API, draw box depending on result, if pressed execute appropriate API, return
|
||||
The API calls are to a another service running a Python script
|
||||
I think I will have the following text in Green (Red):
|
||||
- THE SERVICE IS (NOT) RUNNING
|
||||
The button will be Red (Green):
|
||||
- Stop (Start)
|
||||
I'll rip off gali for the style
|
||||
|
||||
Notes on the python service script:
|
||||
There will be the cheap API, with a start, stop, and status
|
||||
Start will initialize another service
|
||||
There will be a variable to store the time of the last start/stop API call and limit calls for 5 seconds after this time
|
||||
No such limit will exist on the status API
|
||||
|
||||
Some Timelapse and snapshot Notes
|
||||
I think I will have two services, and the snapshot recording service will be a subservice of the timelapse service
|
||||
The timelapse service will start the snapshot
|
||||
|
||||
=== Old Timelapse Code ===
|
||||
|
||||
## Script to create timelapse
|
||||
|
||||
# Set TODAY variable
|
||||
TODAY=$(date +%Y-%m-%d)
|
||||
|
||||
# Create folder for today's photos
|
||||
mkdir /var/opt/mattstream/$TODAY
|
||||
|
||||
# How long between photos
|
||||
PERIOD=1
|
||||
|
||||
# How long to record for
|
||||
LENGTH=900
|
||||
|
||||
# Calculate number of photos to take
|
||||
ITERATIONS=$((LENGTH / PERIOD))
|
||||
|
||||
# Begin capture loop
|
||||
i=1
|
||||
while [ $i -le $ITERATIONS ]
|
||||
do
|
||||
|
||||
# This variable is for the filename
|
||||
NOW=$(date +%Y%m%d-%H%M%S)
|
||||
# This variable is for the timestamp
|
||||
TIME=$(date +%Y%m%d-%H%M)
|
||||
# Download current capture
|
||||
curl http://10.55.10.1:6288/snapshot --output /var/opt/mattstream/$TODAY/$NOW.jpg
|
||||
# This should add the current time to the image and save it
|
||||
convert /var/opt/mattstream/$TODAY/$NOW.jpg -gravity NorthWest -pointsize 22 \
|
||||
-fill yellow -annotate +30+30 $TIME /var/opt/mattstream/$TODAY/$NOW-ts.jpg
|
||||
# Delete original
|
||||
rm /var/opt/mattstream/$TODAY/$NOW.jpg
|
||||
# And now we wait
|
||||
sleep $PERIOD
|
||||
# Increment the counter and start over duh
|
||||
((i++))
|
||||
# For more obvious commentary, the loop is now over
|
||||
done
|
||||
|
||||
# Generate the timelapse now
|
||||
ffmpeg -r 24 -pattern_type glob -i "/var/opt/mattstream/$TODAY/*.jpg" \
|
||||
-vf "scale=1280x720" -vcodec libx264 /var/opt/mattstream/$TODAY/$TODAY.mp4
|
||||
|
||||
# If we want to start deleting original images, uncomment this
|
||||
#rm /var/opt/mattstream/$TODAY/*.jpg
|
||||
|
||||
# Slap a copy of this somewhere convenient for me to grab it
|
||||
cp /var/opt/mattstream/$TODAY/$TODAY.mp4 /media/pleiades/matt-lapse/$TODAY.mp4
|
||||
|
||||
| | | | |
|
||||
| :---------------------- | :---------------------- | :---------------------- | :---------------------- |
|
||||
| **Tuesday:** | **Wednesday:** | **Thursday:** | **Friday:** |
|
||||
| • Soda Springs, CA | • Battle Mountain, NV | • Sidney, NE | • Manitowoc, WI |
|
||||
| • Fernley, NV | • West Wendover, NV | • North Platte, NE | • KEVIN!!!!!! |
|
||||
| | • Park City, UT | • Kearney, NE | |
|
||||
| | • Rock Springs, WY | • Lincoln, NE | |
|
||||
| | • Rawlins, WY | • Des Moins, IA | |
|
||||
| | • Laramie, WY | • Iowa City, IA | |
|
||||
| | | • Madison, WI | |
|
||||
|
||||
27
archive/owncast.yaml
Normal file
27
archive/owncast.yaml
Normal file
@ -0,0 +1,27 @@
|
||||
###############################################
|
||||
# Start photo_refresh
|
||||
###############################################
|
||||
- name: start owncast
|
||||
block:
|
||||
|
||||
# Create service Folder
|
||||
- name: carputer - owncast - create owncast_working_folder folder
|
||||
file:
|
||||
path: "{{ owncast_working_folder }}"
|
||||
state: directory
|
||||
mode: '0755'
|
||||
owner: root
|
||||
group: root
|
||||
|
||||
- name: carputer - owncast - template config
|
||||
template:
|
||||
src: docker-compose-owncast.yaml.j2
|
||||
dest: "{{ owncast_working_folder }}/docker-compose.yaml"
|
||||
mode: 0644
|
||||
|
||||
- name: "carputer - owncast - Start container at 0.0.0.0:{{ owncast_web_port }}"
|
||||
shell: "docker-compose -f {{ owncast_working_folder }}/docker-compose.yaml up -d"
|
||||
register: docker_output
|
||||
- debug: |
|
||||
msg="{{ docker_output.stdout_lines }}"
|
||||
msg="{{ docker_output.stderr_lines }}"
|
||||
Reference in New Issue
Block a user