I had a desire to take a video file and extract the audio track into an mp3 file, so I ended up using a variant of the mp4 converter script to do the job.
#!/bin/bash
[ "$1" ] || {
echo use: $0 file...
exit 0
}
for file in "$@"; do
ffmpeg -i "$file" -acodec libmp3lame -aq 100 "$file.mp3"
done
This script should work on most audio or video formats and makes variable bit rate high quality mp3 files.
No comments:
Post a Comment