Skip to content

Commit

Permalink
Look for ffmpeg in current path
Browse files Browse the repository at this point in the history
  • Loading branch information
xypwn committed Mar 15, 2024
1 parent b434cb3 commit f79b47a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 3 additions & 0 deletions converter/bik/converter.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ func convertBik(outPath string, in [3]io.ReadSeeker) error {
}

ffmpegPath, err := exec.LookPath("ffmpeg")
if err != nil {
ffmpegPath, err = exec.LookPath("./ffmpeg")
}
useFfmpeg := err == nil
if useFfmpeg {
cmd := exec.Command(ffmpegPath, "-y", "-f", "bink", "-i", "pipe:", outPath+".mp4")
Expand Down
4 changes: 3 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,9 @@ func main() {
}

if _, err := exec.LookPath("ffmpeg"); err != nil {
prt.Warnf("FFmpeg not installed. Please install FFmpeg to convert videos to MP4. Without FFmpeg, videos will be saved as BIK.")
if _, err := exec.LookPath("./ffmpeg"); err != nil {
prt.Warnf("FFmpeg not installed or found locally. Please install FFmpeg, or place ffmpeg.exe in the current folder to convert videos to MP4. Without FFmpeg, videos will be saved as BIK.")
}
}

if *gameDir == "" {
Expand Down

0 comments on commit f79b47a

Please sign in to comment.