Spaces:
Sleeping
Sleeping
File size: 1,584 Bytes
cbce4ab | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 | #!/bin/bash
# Double click to convert everything sitting in the "entrada" folder.
cd "$(dirname "$0")" || exit 1
# Where ffmpeg lands when installed without Homebrew
export PATH="/usr/local/bin:/opt/homebrew/bin:/opt/local/bin:$PATH"
echo ""
echo " metaspin"
echo ""
if ! command -v python3 >/dev/null 2>&1; then
echo " Python is missing."
echo ""
echo " Open Terminal and paste this:"
echo " xcode-select --install"
echo ""
echo " An installer window appears. When it finishes,"
echo " come back and double click again."
echo ""
read -n 1 -s -r -p " Press any key to close."
exit 1
fi
if ! command -v ffmpeg >/dev/null 2>&1 || ! command -v ffprobe >/dev/null 2>&1; then
echo " ffmpeg is missing."
echo ""
echo " Get it from: https://ffmpeg.martin-riedl.de"
echo " Pick your Mac (Apple Silicon or Intel) and use the installer,"
echo " which is signed by Apple and installs cleanly."
echo ""
echo " You need both ffmpeg and ffprobe."
echo ""
read -n 1 -s -r -p " Press any key to close."
exit 1
fi
mkdir -p entrada salida
if [ -z "$(ls -A entrada 2>/dev/null | grep -v '^\.')" ]; then
echo " The \"entrada\" folder is empty."
echo ""
echo " Drop the videos you want to convert in there"
echo " and double click here again."
echo ""
open entrada
read -n 1 -s -r -p " Press any key to close."
exit 0
fi
python3 metaspin.py
STATUS=$?
echo ""
if [ $STATUS -eq 0 ]; then
open salida
fi
read -n 1 -s -r -p " Press any key to close."
echo ""
|