Linux versino and Gif output
This commit is contained in:
9
main.go
9
main.go
@@ -11,6 +11,7 @@ import (
|
||||
"net/http"
|
||||
"os"
|
||||
"os/signal"
|
||||
"runtime"
|
||||
"syscall"
|
||||
"time"
|
||||
)
|
||||
@@ -35,7 +36,11 @@ func main() {
|
||||
if !app.tools.OK() {
|
||||
fmt.Println("WARNING: ffmpeg/ffprobe not found.")
|
||||
fmt.Println(" Put ffmpeg" + exeSuffix + " and ffprobe" + exeSuffix + " in the same folder as this program")
|
||||
fmt.Println(" (or on your PATH). Windows builds: https://www.gyan.dev/ffmpeg/builds/")
|
||||
if runtime.GOOS == "windows" {
|
||||
fmt.Println(" (or on your PATH). Windows builds: https://www.gyan.dev/ffmpeg/builds/")
|
||||
} else {
|
||||
fmt.Println(" (or on your PATH, e.g. by installing your distribution's ffmpeg package).")
|
||||
}
|
||||
fmt.Println()
|
||||
} else {
|
||||
fmt.Printf("ffmpeg: %s\nffprobe: %s\n\n", app.tools.FFmpeg, app.tools.FFprobe)
|
||||
@@ -69,7 +74,7 @@ func main() {
|
||||
}
|
||||
|
||||
sig := make(chan os.Signal, 1)
|
||||
signal.Notify(sig, os.Interrupt, syscall.SIGTERM)
|
||||
signal.Notify(sig, os.Interrupt, syscall.SIGTERM, syscall.SIGHUP)
|
||||
go func() {
|
||||
<-sig
|
||||
app.requestQuit("interrupted")
|
||||
|
||||
Reference in New Issue
Block a user