Skip to content

Commit

Permalink
removed local file checks
Browse files Browse the repository at this point in the history
  • Loading branch information
frr committed Feb 19, 2019
1 parent 33bbff0 commit c4d93c0
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions transcoder/transcoder.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import (
"errors"
"fmt"
"io"
"os"
"os/exec"
"regexp"
"strconv"
Expand Down Expand Up @@ -98,11 +97,6 @@ func (t *Transcoder) Initialize(inputPath string, outputPath string) error {
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"}

cmd := exec.Command(cfg.FfprobeBin, command...)
Expand All @@ -122,8 +116,8 @@ func (t *Transcoder) Initialize(inputPath string, outputPath string) error {
MediaFile.SetMetadata(Metadata)
MediaFile.SetInputPath(inputPath)
MediaFile.SetOutputPath(outputPath)
// Set transcoder configuration

// Set transcoder configuration
t.SetMediaFile(MediaFile)
t.SetConfiguration(cfg)

Expand Down

0 comments on commit c4d93c0

Please sign in to comment.