Skip to content

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

Closed
qcgzxw/ffmpeg-go
#1
@qcgzxw

Description

@qcgzxw

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()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions