0

I am trying to merge several mp4 videos together in a folder. However, when I run the following script, sometimes only 1 video is in the output. For example, if I have video1, video2, video3, and video4, only video1 would appear in the output. Note: I am converting some of these videos from mp3 to mp4 before I merge them with other mp4 videos.

#!/bin/bash
# Merge Script

 ffmpeg -f concat -i <(for f in ./*.mp4; do echo "file '$PWD/$f'"; done)  -c copy output.mp4
1
  • guessing that you need to list each file with a -i ? Good luck.
    – shellter
    Sep 2, 2015 at 2:53

1 Answer 1

2

Your command does exacly what you want.

Check what the output of

for f in ./*.mp4; do echo "file '$PWD/$f'"; done

prints.

If the files are listed as expected then you might have an issue with special chars in the path.

As a last resort you could run the ffmpeg command with the -loglevel panic mode, but beware it returns A LOT

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .