Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- # This script converts a movie file into mp3s of apx 10 minutes long
- # each to make listening to movies/shows on the go with mp3 players
- # easier. You can adjust the 10 minutes to a length that works for
- # you.
- #
- # ./movie2mp3s.sh "FILENAME"
- #
- # Get the basename of the file passed to this script for later use
- fname=$(basename "$1")
- # convert the movie into one big mp3
- ffmpeg -i "$1" -vn -acodec libmp3lame -ac 2 -ab 160k -ar 48000 "$fname.mp3"
- # split the mp3 into smaller segments to make
- # skipping around easier
- mp3splt -a -t 10.00 "$fname.mp3"
- # Remove the big mp3
- rm "$fname.mp3"
- # Move the small mp3s into a folder
- mkdir "$fname-audio"
- mv *.mp3 "./$fname-audio"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement