#!/bin/bash if [ -z "$1" ] then echo "No argument supplied" exit 1 fi input_file=$1 output_file="${input_file%.*}.mp3" ffmpeg -i "$input_file" -codec:v copy -codec:a libmp3lame -q:a 0 "$output_file"