mirror of
https://github.com/xfrr/goffmpeg.git
synced 2025-10-17 13:30:48 +08:00
removed local file checks
This commit is contained in:
@@ -7,7 +7,6 @@ import (
|
|||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
"os"
|
|
||||||
"os/exec"
|
"os/exec"
|
||||||
"regexp"
|
"regexp"
|
||||||
"strconv"
|
"strconv"
|
||||||
@@ -98,11 +97,6 @@ func (t *Transcoder) Initialize(inputPath string, outputPath string) error {
|
|||||||
return errors.New("error on transcoder.Initialize: inputPath missing")
|
return errors.New("error on transcoder.Initialize: inputPath missing")
|
||||||
}
|
}
|
||||||
|
|
||||||
_, err = os.Stat(inputPath)
|
|
||||||
if os.IsNotExist(err) {
|
|
||||||
return errors.New("error on transcoder.Initialize: input file not found")
|
|
||||||
}
|
|
||||||
|
|
||||||
command := []string{"-i", inputPath, "-print_format", "json", "-show_format", "-show_streams", "-show_error"}
|
command := []string{"-i", inputPath, "-print_format", "json", "-show_format", "-show_streams", "-show_error"}
|
||||||
|
|
||||||
cmd := exec.Command(cfg.FfprobeBin, command...)
|
cmd := exec.Command(cfg.FfprobeBin, command...)
|
||||||
@@ -122,8 +116,8 @@ func (t *Transcoder) Initialize(inputPath string, outputPath string) error {
|
|||||||
MediaFile.SetMetadata(Metadata)
|
MediaFile.SetMetadata(Metadata)
|
||||||
MediaFile.SetInputPath(inputPath)
|
MediaFile.SetInputPath(inputPath)
|
||||||
MediaFile.SetOutputPath(outputPath)
|
MediaFile.SetOutputPath(outputPath)
|
||||||
// Set transcoder configuration
|
|
||||||
|
|
||||||
|
// Set transcoder configuration
|
||||||
t.SetMediaFile(MediaFile)
|
t.SetMediaFile(MediaFile)
|
||||||
t.SetConfiguration(cfg)
|
t.SetConfiguration(cfg)
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user