Skip to content

Instantly share code, notes, and snippets.

@paceline
Created October 10, 2013 21:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save paceline/6925703 to your computer and use it in GitHub Desktop.
Save paceline/6925703 to your computer and use it in GitHub Desktop.
Joins mp3 files found in current directory into one, using the ffmpeg tool. Simple as can be.
#!/bin/sh
#
# Joins mp3 files found in current directory into one, using the ffmpeg tool. Simple as can be.
#
# Ulf Möhring <ulf@moehring.me>
#
# Discover and join filenames
files=""
for file in *.mp3
do
files="$files|$file"
done
files=`echo $files| sed -r "s/^\|//"`
# Run ffmpeg
ffmpeg -i "concat:$files" -acodec copy "${PWD##*/}.mp3"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment