-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathConvertir.command
More file actions
53 lines (44 loc) · 1.23 KB
/
Copy pathConvertir.command
File metadata and controls
53 lines (44 loc) · 1.23 KB
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
#!/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 - Ray-Ban Meta Video Converter"
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 ""
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 ""
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 ""