Skip to content

Commit

Permalink
Raw captures now on the same computer as editing
Browse files Browse the repository at this point in the history
Raw footage was previously captured on a laptop attached to the TV,
then copied to the iMac for editing. Now the iMac does the capturing.
  • Loading branch information
norm committed May 11, 2021
1 parent 3815a34 commit daedf68
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 22 deletions.
27 changes: 13 additions & 14 deletions bin/clean
Expand Up @@ -2,26 +2,25 @@
#
# Clean the raw footage from the capture laptop.

mapfile -t captures < \
<( ssh ${CAPTURE_HOST} ls ${CAPTURE_DIR}/\*mkv 2>/dev/null )
mapfile -t captures < <(ls "$CAPTURE_DIR/"*mkv 2>/dev/null)

for capture in "${captures[@]}"; do
file="$(basename "$capture")"
if [ -f "$BACKUP_DIR/$GAME_SHOW_NAME/raw/$file" ]; then
status -- "-- {cyan}removing $file"
if [ -z "${DRY_RUN:-}" ]; then
ssh ${CAPTURE_HOST} "rm '$capture'"
rm "raw/$file"
fi
remove=0

if [ "${1:-}" = 'force' ]; then
status -- "-- {cyan}removing $file (forced)"
remove=1
else
if [ "${1:-}" = 'force' ]; then
status -- "-- {cyan}removing $file (forced)"
if [ -z "${DRY_RUN:-}" ]; then
ssh ${CAPTURE_HOST} "rm '$capture'"
rm -f "raw/$file"
fi
if [ -f "$BACKUP_DIR/$GAME_SHOW_NAME/raw/$file" ]; then
status -- "-- {cyan}removing $file"
remove=1
else
status "** {magenta}{bold}$file not removed; not in local backup"
fi
fi

if [ $remove = 1 -a -z "${DRY_RUN:-}" ]; then
rm -f "${CAPTURE_DIR}/$file" "raw/$file"
fi
done
3 changes: 1 addition & 2 deletions bin/footage
@@ -1,7 +1,7 @@
#!/usr/bin/env bash -euo pipefail
#
# Generate files from the raw captures (mkv) which is usable in Davinci
# Resolve (mp4), adjusting the volume up to a sensible working level.
# Resolve (mp4).
#
# For each new piece of footage, create a text file for capturing the
# contents of the footage for later reference, and a Things task to
Expand All @@ -23,7 +23,6 @@ for mkv in raw/*mkv; do
-stats \
-i "$mkv" \
-vcodec copy \
-filter:a "volume=15dB" \
"$mp4"

# create annotation files for each video, and open
Expand Down
9 changes: 5 additions & 4 deletions bin/raw
@@ -1,12 +1,13 @@
#!/usr/bin/env bash -euo pipefail
#
# Collect the raw footage from the capture laptop.
# Collect the raw footage.

mapfile -t captures < \
<( ssh ${CAPTURE_HOST} ls ${CAPTURE_DIR}/\*mkv 2>/dev/null )
mapfile -t captures < <(ls "$CAPTURE_DIR/"*mkv 2>/dev/null)

for capture in "${captures[@]}"; do
file="$(basename "$capture")"
[ "$file" = '*mkv' ] && break

escaped="$(echo "$capture" | sed -e 's/ /\\ /g')"
status "++ {green}$file"
if [ -z "${DRY_RUN:-}" ]; then
Expand All @@ -15,7 +16,7 @@ for capture in "${captures[@]}"; do
--times \
--partial \
--info=progress \
"${CAPTURE_HOST}:$escaped" \
"${escaped}" \
raw/
fi
done
3 changes: 1 addition & 2 deletions generate
Expand Up @@ -120,8 +120,7 @@ fi

export BACKUP_BASE='/Volumes/verne/video'
export BACKUP_DIR="$BACKUP_BASE/Game Shows"
export CAPTURE_DIR='Movies'
export CAPTURE_HOST='portsider'
export CAPTURE_DIR="$HOME/Movies"
export GAME_SHOW_NAME="$show"
export S3_BUCKET=gameshows.m17s.net
export S3_BUCKET_DIR="Game Shows/$show"
Expand Down

0 comments on commit daedf68

Please sign in to comment.