Skip to content

Commit c034582

Browse files
anbskytiger5226
authored andcommitted
Allow setting working dir for ffmpeg
1 parent 9367de1 commit c034582

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

ffmpeg/config.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,5 @@ type Config struct {
66
FfprobeBinPath string
77
ProgressEnabled bool
88
Verbose bool
9+
OutputDir string
910
}

ffmpeg/ffmpeg.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ func (t *Transcoder) Start(opts transcoder.Options) (<-chan transcoder.Progress,
9393
} else {
9494
cmd = exec.CommandContext(*t.commandContext, t.config.FfmpegBinPath, args...)
9595
}
96+
cmd.Dir = t.config.OutputDir
9697

9798
// If progresss enabled, get stderr pipe and start progress process
9899
if t.config.ProgressEnabled && !t.config.Verbose {

0 commit comments

Comments
 (0)