I tried to add text on video using NReco VideoConverter which is ffmpeg wrapper for C#.
I tried below code
var ffMpeg1 = new NReco.VideoConverter.FFMpegConverter();
ffMpeg1.FFMpegToolPath = System.Web.Hosting.HostingEnvironment.MapPath(@"~/ToolPath");
var text = "-i " + System.Web.Hosting.HostingEnvironment.MapPath(@"~/FullVideos/418.mp4") + " - vf \"drawtext=text='Stack Overflow'\"" + " -c:a copy " + System.Web.Hosting.HostingEnvironment.MapPath(@"~/FullVideos/new418.mp4");
ffMpeg1.Invoke(text);
I am getting error as
NReco.VideoConverter.FFMpegException: pipe:: Invalid argument (exit code: 1)
variable text has below string
-i F:\Demos\FullVideos\418.mp4 - vf "drawtext=text='Stack Overflow'" -c:a copy F:\Demos\FullVideos\new418.mp4
What is the mistake here ?