Hey guys I've been trying to make this work for a while now and I can't seem to find how to make the audio/video synced after the concatenation, I've searched and tested some solutions but couldn't get it working.
Here is what I do right now, Everything is working but I must be doing something wrong.
So First, I split the videos into the video that I want
System.Diagnostics.Process.Start(ffmpegPath, "-i " +
video.Path + " -ss " + StartTime + " -t " + Duration + " " + video.Output);
After "cutting/splitting" the videos that I want like I want, I tried concatenating the videos together ( using -safe 0 to use the absolute path, else it wasn't working ) :
System.Diagnostics.Process.Start(ffmpegPath,
"-f concat -safe 0 -i " + txtFile + " C:\\Downloads\\Build\\" + rdn.Next(0,1000) + ".mp4");
After that , I've noticed the audio/video was sometime out of sync so I searched and found this
so I decided to Pad all the videos after splitting them :
System.Diagnostics.Process.Start(ffmpegPath,
"-i " + video.Output + " -af apad -c:v libx264 -shortest -avoid_negative_ts make_zero -fflags +genpts -report " + padding);
and then building it again, but it ended up having the same audio desync.
It's my first time working with mp4s and with FFMPEG and I'm sure I'm missing something.