Unix for Artists: Fun with FFMPEG is a workshop hosted by the Echo Park Film Center.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
unix4artists/ffmpeg/audio/extract.sh

21 lines
501 B

#!/bin/bash -e
#####################################################
#
# This script will extract the audio from a video
# losslessly into a .wav file.
#
# Usage: bash ffmpeg/audio/extract.sh <input video> <output audio>
#
#####################################################
INPUT="${1}"
OUTPUT="${2}"
# Check if output file extension is .wav
if [[ "${OUTPUT}" != *".wav" ]]; then
echo "Please use an .wav extension on your output file argument"
exit 1
fi
ffmpeg -i "${INPUT}" -vn "${OUTPUT}"