tomaszzmuda / Xabe.FFmpeg

.NET Standard wrapper for FFmpeg. It allows to process media without know how FFmpeg works, and can be used to pass customized arguments to FFmpeg from dotnet core application.

Home Page:https://xabe.net/product/xabe_ffmpeg/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SetInput method not found

CodingOctocat opened this issue · comments

My code:
微信截图_20220404163135

Official docs:
微信截图_20220404163236

Did you find an answer ? I got the same issue...

Hello,
It changed some time ago.
Try using AddStream instead of SetInput:

            var outputPath = "test.mp4";
            var mediaInfo = await MediaInfo.Get(Resources.MkvWithAudio);
            IConversionResult conversionResult = await FFmpeg.Conversions.New()
                .AddStream(mediaInfo.Streams)
                .AddParameter($"-ss {TimeSpan.FromSeconds(1)} -t {TimeSpan.FromSeconds(1)}")
                .AddParameter("-s 1920x1080")
                .SetOutput(outputPath)
                .Start();

I'm going to update documentation.

Hello,

Thank you. It works now.