1

So after all the searches, I couldn't find anything relating to this topic. Can I do a non-encoding concatenation without having to create a text file?

Gideon
  • 181
  • 1
  • 1
  • 12
  • Why can't you create a text file? (http://xyproblem.info/) – slhck Dec 16 '19 at 09:05
  • @slhck I can create a text file of course. I was just wondering; can there not be a way of having everything in one code instead of creating a separate text file. – Gideon Dec 16 '19 at 10:30

1 Answers1

3

The concat demuxer can only read from a file pointer or URL. The contents of the file cannot be replaced by commandline options.

What you can do instead is to use process substitution (if your shell supports it) to generate the file on the fly:

ffmpeg -f concat -safe 0 -i <(for f in ./*.wav; do echo "file '$PWD/$f'"; done) -c copy output.wav

Here, <(…) returns a file pointer that can be opened by ffmpeg as if it was a regular file.

slhck
  • 223,558
  • 70
  • 607
  • 592