paritybit.ca

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit 98a855da39ccf5b9e41d2f123f13694c00032358
parent afde6c02fc4c136b5d9a3667b023ad877b96591a
Author: Jake Bauer <jbauer@paritybit.ca>
Date:   Fri, 29 Mar 2019 22:21:58 -0400

Remove 32kbps MP3 and parallelize

Parallelize operation of the script so that it completes faster.
Also remove conversion to 32kbps MP3 because the quality-to-size ratio
doesn't make much sense when compared to 64kbps.

Diffstat:
Apodcast-convert.sh | 22++++++++++++++++++++++
1 file changed, 22 insertions(+), 0 deletions(-)

diff --git a/podcast-convert.sh b/podcast-convert.sh @@ -0,0 +1,22 @@ +#!/bin/bash +# +# This is a really simple script that takes in a .mkv formatted file +# and spits out a .mp4 file and 3 different qualities of .mp3. +# +# The file to convert is passed in as the first argument to the script. +# The script will output its contents in the current directory from which +# it was callsed. + +file=$1 +filename=$(basename $file | cut -f 1 -d ".") +echo "Converting $filename..." +echo "=================================" + +echo "Converting to mp4..." +ffmpeg -hide_banner -loglevel panic -i $file -c copy $filename.mp4 & +echo "Converting to 128kbps mp3..." +ffmpeg -hide_banner -loglevel panic -i $file -vn -b:a 128k $filename-128.mp3 & +echo "Converting to 64kbps mp3..." +ffmpeg -hide_banner -loglevel panic -i $file -vn -b:a 64k $filename-64.mp3 & +echo "Done" +exit 0