go-fluent-ffmpeg icon indicating copy to clipboard operation
go-fluent-ffmpeg copied to clipboard

Resolution option doesn't work

Open DmytroUsenko opened this issue 3 years ago • 1 comments
trafficstars

trying to use err := fluentffmpeg. NewCommand(""). InputPath("http://"). OutputOptions("-movflags", "isml+frag_keyframe+empty_moov"). OutputFormat("mp4"). VideoCodec("h264"). KeyframeInterval(52). Resolution("640x360"). PipeOutput(w). Run() all is ok besides the output resolution. It is always the same as the original (FullHD for example) and the Resolution option doesn't work. Any ideas on how to fix it?

DmytroUsenko avatar Sep 17 '22 17:09 DmytroUsenko

If shortly Resolution set aspect for video In the documentation of ffmpeg you can find this option as -aspect documentation link => https://ffmpeg.org/ffmpeg.html#Video-Options

And if you print ffmpeg arguments (GetArgs()) with setted resolution you can see that go-fluent-ffmpeg use next argument for ffmpeg "-aspect", "1.466667",

vstruk01 avatar Mar 02 '23 23:03 vstruk01