I found Microsoft has some package for Media Editing, from this URL:
However, I need to run a WinForm project to merge some video files. I am using Windows 10 (Version 21H1), my IDE is Visual Studio 2019 (Version 16.11.5)
For example, I have two MP4 files: C:\Videos\1.mp4 and C:\Videos\2.mp4, each of them has the same resolution with its own audio.
I want to merge them into one file: C:\Videos\3.mp4, 1.mp4 at the beginning of the merged video with its own audio, and 2.mp4 being the ending of the merged video with its own audio.
I can use FFMPEG, but it has issue with merged video, the merged video didn’t keep both video and audio, I lost either the first audio or the second video.
Since I have to use SQL Server database, so I need some C# code only in WinForm App, not the UWP project.
Please share some C# code, so I can merge 1.mp4 and 2.mp4 to generate 3.mp4, in which both video and audio inside are kept the same.