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

When creating a new node, the 'ffmpeg path' is not propagated to the next node. #107

Closed
qcgzxw opened this issue Jan 15, 2024 · 0 comments · Fixed by qcgzxw/ffmpeg-go#1 · May be fixed by #108
Closed

When creating a new node, the 'ffmpeg path' is not propagated to the next node. #107

qcgzxw opened this issue Jan 15, 2024 · 0 comments · Fixed by qcgzxw/ffmpeg-go#1 · May be fixed by #108

Comments

@qcgzxw
Copy link

qcgzxw commented Jan 15, 2024

When setting the global 'ffmpeg path' through func (s *Stream) SetFfmpegPath(path string) *Stream, the FFmpeg path is currently only set for the current node.
When making sequential calls, the value of the FFmpeg path is lost.

// ffmpeg -i ./sample_data/in1.mp4 -c:v libx265 ./sample_data/out1.mp4 -y
err := ffmpeg.Input("./sample_data/in1.mp4").
		SetFfmpegPath("/usr/bin/ffmpeg").
		Output("./sample_data/out1.mp4", ffmpeg.KwArgs{"c:v": "libx265"}). // a new node without FfmpegPath variable
		OverWriteOutput().ErrorToStdOut().Run()


// /usr/bin/ffmpeg -i ./sample_data/in1.mp4 -c:v libx265 ./sample_data/out1.mp4 -y
err := ffmpeg.Input("./sample_data/in1.mp4").
		Output("./sample_data/out1.mp4", ffmpeg.KwArgs{"c:v": "libx265"}).
		SetFfmpegPath("/usr/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

Successfully merging a pull request may close this issue.

1 participant