Question

I need to implement video concatenation in my ASP.NET Web API. I could successfully concatenate some sample videos downloaded from internet using 'FFMpegConverter' Nuget Package . But when I tried concatenating files captured from my mobile and tried opening it, I got the following error. enter image description here

Below is the code snippet I'm using:

var ffMpeg = new NReco.VideoConverter.FFMpegConverter();
ffMpeg.ConcatMedia(_fileNames, videoRootPath.mp4, 
                   NReco.VideoConverter.Format.mp4, set);

These are the Property screenshots of both the mp4 files.

enter image description here

Thanks in advance

Was it helpful?

Solution

I got correct output by making the following changes to the code

  var ffMpeg = new NReco.VideoConverter.FFMpegConverter();
                NReco.VideoConverter.ConcatSettings set = new NReco.VideoConverter.ConcatSettings();
                ffMpeg.ConcatMedia(_fileNames, videoRootPath + tobename + ".mp4", NReco.VideoConverter.Format.mp4, set);

NReco.VideoConverter.ConcatSettings had to be initialised with default values. This should have been the fourth parameter to "ffMpeg.Concatmedia" method.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top