I have 50 parts of mp3 audio files and 50 parts of mp4 video files (without audio) files, which I want to unite into one video. I tried uniting the audio files into one file, then uniting the videos into one file, and eventually unting it all to one video with the following command. I used this How to merge audio and video file in ffmpeg.
ffmpeg.exe -f concat -safe 0 -i video_list.txt -c:v video.mp4
ffmpeg.exe -f concat -safe 0 -i audio_list.txt -c:a audio.mp3
ffmpeg.exe -i video.mp4 -i audio.mp3 -c:v copy -c:a aac final.mkv
All tryings led to the video being played before the audio in final.mkv (audio delayed).
Am I doing it wrong?
ffmpeg -i 0.mp3 -ss 0 -t 10.011 -c new_0.mp3That didn't help. It makes me think that maybe the merge between the final audio and the final video is made in a wrong way.
– Omer G Jan 01 '21 at 09:14ffmpeg -i 0.mp3 -i 1.mp3 -i 2.mp3, etc &ffmpeg -i 0.mp4 -i 1.mp4 -i 2.mp4, etc. It will print the details on each input. 2) If they don't match then use various filters to make them match. Many, many concat example on this site and [so] doing that.