From daedf688f298a41dca2e7405536644c16ccf12e9 Mon Sep 17 00:00:00 2001 From: Mark Norman Francis Date: Fri, 7 May 2021 07:30:24 +0100 Subject: [PATCH] Raw captures now on the same computer as editing 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. --- bin/clean | 27 +++++++++++++-------------- bin/footage | 3 +-- bin/raw | 9 +++++---- generate | 3 +-- 4 files changed, 20 insertions(+), 22 deletions(-) diff --git a/bin/clean b/bin/clean index 7639dec..1bdace2 100755 --- a/bin/clean +++ b/bin/clean @@ -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 diff --git a/bin/footage b/bin/footage index 805b2b7..26e04b4 100755 --- a/bin/footage +++ b/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 @@ -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 diff --git a/bin/raw b/bin/raw index 7a352e6..8140a74 100755 --- a/bin/raw +++ b/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 @@ -15,7 +16,7 @@ for capture in "${captures[@]}"; do --times \ --partial \ --info=progress \ - "${CAPTURE_HOST}:$escaped" \ + "${escaped}" \ raw/ fi done diff --git a/generate b/generate index ef95f52..63b63aa 100755 --- a/generate +++ b/generate @@ -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"