Changes between Version 23 and Version 24 of Concatenate


Ignore:
Timestamp:
Apr 6, 2015, 12:16:47 AM (4 years ago)
Author:
cracki
Comment:

process substituion: absolute paths

Legend:

Unmodified
Added
Removed
Modified
  • Concatenate

    v23 v24  
    3838}}}
    3939
    40 If your shell supports process substitution (like Bash and Zsh), you can avoid explicitly creating a list file and do the whole thing in a single line. This would be impossible with the concat protocol (see below):
    41 
    42 {{{
    43 ffmpeg -f concat -i <(for f in ./*.wav; do echo "file '$f'"; done) -c copy output.wav
    44 ffmpeg -f concat -i <(printf "file '%s'\n" ./*.wav) -c copy output.wav
    45 ffmpeg -f concat -i <(find . -name '*.wav' -printf "file '%p'\n") -c copy output.wav
     40If your shell supports process substitution (like Bash and Zsh), you can avoid explicitly creating a list file and do the whole thing in a single line. This would be impossible with the concat protocol (see below). Make sure to generate absolute paths here, since ffmpeg will resolve paths relative to the list file your shell may create in a directory such as "/proc/self/fd/".
     41
     42{{{
     43ffmpeg -f concat -i <(for f in ./*.wav; do echo "file '$PWD/$f'"; done) -c copy output.wav
     44ffmpeg -f concat -i <(printf "file '$PWD/%s'\n" ./*.wav) -c copy output.wav
     45ffmpeg -f concat -i <(find . -name '*.wav' -printf "file '$PWD/%p'\n") -c copy output.wav
    4646}}}
    4747