Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Example To Set Custom Ffmpeg Binary Path #97

Open
George-Seven opened this issue Aug 10, 2023 · 4 comments
Open

Example To Set Custom Ffmpeg Binary Path #97

George-Seven opened this issue Aug 10, 2023 · 4 comments

Comments

@George-Seven
Copy link

George-Seven commented Aug 10, 2023

I want to set a custom ffmpeg binary path. Below is example code -

package main

import (
    ffmpeg "github.com/u2takey/ffmpeg-go"
)

func main() {
    ffmpeg.Input("input.mp4").
        Output("output.mp4", ffmpeg.KwArgs{"c:v": "libx265"}).
        OverWriteOutput().ErrorToStdOut().Run()
}

 

Where to fit in this method?

stream.SetFfmpegPath("/usr/local/bin/ffmpeg")
@ychencode
Copy link

have u solved this problem? I meet it too

@George-Seven
Copy link
Author

@ychencode not yet. Maybe @Fyb3roptik can help -#26 (comment)

@Fyb3roptik
Copy link

Fyb3roptik commented Aug 17, 2023

You need to use the latest commit tag instead of a release number. He needs to do an official release, but until then update your go mod to use the latest commit hash

@George-Seven
Copy link
Author

George-Seven commented Aug 18, 2023

You need to use the latest commit tag instead of a release number. He needs to do an official release, but until then update your go mod to use the latest commit hash

@Fyb3roptik thanks, was able to get it working.

 

have u solved this problem? I meet it too

@ychencode you can use this example -

go get github.com/u2takey/ffmpeg-go@6649d14c4aeb35093a062d4660a55507198cd03e
package main

import (
    ffmpeg "github.com/u2takey/ffmpeg-go"
)

func main() {
    ffmpeg.Input("input.mp4").
        Output("output.mp4", ffmpeg.KwArgs{"c:v": "libx265"}).
        SetFfmpegPath("/usr/local/bin/ffmpeg").
        OverWriteOutput().ErrorToStdOut().Run()
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants