I've used this code for merging three videos together with ffmpeg :

ffmpeg -y -f concat -safe 0 -i list.txt -c copy done.mp4

the list.txt contains :

file 'first.mp4'
duration 2.5
file 'second.mp4'
duration 20.0
file 'third.mp4'
duration 1.5

But the output video doesn't have any sound! I want sound of each one remains on the output.

what code should i use?

  • A few things that may or not help: 1. Change your container to something other than mp4, i've had sync issues with mp4 concat before. 2. Confirm there isn't multiple audio streams per ur videos, as that might require further specification. 3. try dropping the -c copy and re-encoding just to see, I'm not familiar with the "duration" bit of your command but I can see it causing issue with -c copy. 4. try command without duration specified in the .txt just to see if that's the problem. 5. Unless its related to the duration bit I'm not sure what the point of the -y is, try without it. – kite Jan 4 '19 at 21:31
  • 6. Confirm for certain if you haven't already there is no audio stream in the output file. Infact confirm the number of streams in general that made it over. That seems weird it wouldn't copy any audio stream at all over, i'd 'guess' it's the -y in that case. – kite Jan 4 '19 at 21:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.