History

check whether ffprobe/ffmpeg are present early on

Sigrid Solveig Haflínudóttir committed 4 years ago

Commit 9bcb6fc1 parent 72ebe491 file · +8 −0Browse files

Unified · Split

main.go+8−0
@@ -6,6 +6,7 @@ import ( · 5 unmodified lines
66 "fmt"
77 "log"
88 "os"
9+ "os/exec"
910 "path/filepath"
1011 "runtime"
1112 "strconv"
@@ -55,6 +56,13 @@ func main() { · 43 unmodified lines
5556 log.Fatal(err)
5657 }
5758
59+ if _, err = exec.LookPath("ffprobe"); err != nil {
60+ log.Fatal(err)
61+ }
62+ if _, err = exec.LookPath("ffmpeg"); err != nil {
63+ log.Fatal(err)
64+ }
65+
5866 args := flag.Args()
5967 if len(args) == 0 {
6068 args = []string{"."}

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t