Make sure all audio and video files are in same folder, Open Command Prompt in that folder and follow below steps.
- Create text file with all audio files names into 'myAudioList.txt', make sure to open the text file and check if all files are in currect order
(for %i in (*.aac) do @echo file '%i') > myAudioList.txt
- Create text file with all video files names into 'myVideoList.txt', make sure to open the text file and check if all files are in currect order
(for %i in (*.ts) do @echo file '%i') > myVideoList.txt
-
If all files are having same codec you would see no problem in merging or else you may face issues and these step will not work for you.
-
Download ffmpeg open source executable from official website
https://ffmpeg.org/download.html
-
Extract zip file and copy executable 'ffmpeg.exe' to the same folder having all your audio, video files.
-
Merge all audio files into single audio file
ffmpeg -f concat -safe 0 -i myAudioList.txt -c copy output.aac
- Merge all video files into single video file
ffmpeg -f concat -safe 0 -i myVideoList.txt -c copy output.ts
- Merge video file and audio file into single mp4 file
ffmpeg -i output.ts -i output.aac -map 0:V:0 -map 1:a:0 -c copy -f mp4 -movflags +faststart output.mp4
Helpful Web Links: