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

Can not embed a watermak and a subtitle at the same time

LiveIsLive opened this issue · comments

This is my code , as the result of running the code, the output file only contains the watermark,but without subtitle.

Xabe.FFmpeg.IMediaInfo inputFile = await Xabe.FFmpeg.FFmpeg.GetMediaInfo(@"Test.avi");
Xabe.FFmpeg.IVideoStream video = inputFile.VideoStreams.First().AddSubtitles(@"Test.srt");
video = video.SetWatermark(@"Test.png", Xabe.FFmpeg.Position.BottomRight);
Xabe.FFmpeg.IConversion conversion = Xabe.FFmpeg.FFmpeg.Conversions.New().AddStream(video).SetOutput(@"Test.mp4").SetOverwriteOutput(true);
await conversion.Start();