I'm putting together a bash script to run movie rendering jobs. ffmpeg expects a multi-line text file as one of the arguments for concatenation filter to join several files into one. Like this:
ffmpeg -f concat -i mylist.txt -c copy output
There's also an option to write it all in a single line like so:
ffmpeg -f concat -i <(printf "file '%s'\n" A.mp4 B.mp4) -c copy Output.mp4
How do I write the latter for into a bash script, substituting the file names from other variables? Tryed splitting the variables, but its not the one that works. $A and $B variables contains paths to input files.
#!/bin/bash
...
TMP_LIST=$(printf "file '%s'\n" ${A} ${B})
APPEND="${FFMPEG} -f concat -i <<< {${TMP_LIST}} -c copy ${OUTPUT}"
# run the concatenation:
$APPEND