X-Git-Url: https://zdv2.bktei.com/gitweb/BK-2020-03.git/blobdiff_plain/a4b60a6d73d340f4fedc75c8807fa9e1d893ad65..4402ce96643b39688f2c4f5a9fc22b7cc2ff9b52:/user/mp3s_to_mkv.sh?ds=inline diff --git a/user/mp3s_to_mkv.sh b/user/mp3s_to_mkv.sh old mode 100644 new mode 100755 index eb32982..144e34b --- a/user/mp3s_to_mkv.sh +++ b/user/mp3s_to_mkv.sh @@ -3,7 +3,7 @@ # Usage: mp3s_to_mkv.sh [DIR in] [DIR out] [BITRATE] # Example: mp3s_to_mkv.sh ./dir_source ./dir_output 48k # Depends: GNU Coretils 8.32 (date) -# Version: 0.0.1 +# Version: 0.0.2 # plumbing opus_bitrate="$3"; # e.g. "48k" @@ -70,7 +70,7 @@ ffmpeg_convert() { # Concatenate mp3 files into a single WAV file # # Convert WAV to 48 kbps opus mkv file - ffmpeg -f concat -safe 0 -i "$file_flist" -c:a pcm_s24le -rf64 auto -f wav - | \ + ffmpeg -nostdin -f concat -safe 0 -i "$file_flist" -c:a pcm_s24le -rf64 auto -f wav - | \ ffmpeg -i - -c:a libopus -b:a "$opus_bitrate" "$file_out_mkv"; # Return to original dir @@ -80,7 +80,7 @@ save_albumart() { local file file="$(find "$dir_in" -type f -iname "*.mp3" | sort | head -n1)"; file="$(readlink -f "$file")"; - ffmpeg -i "$file" -an -vcodec copy "$file_albumart"; + ffmpeg -nostdin -i "$file" -an -vcodec copy "$file_albumart"; }; # save album art from an mp3 to output dir main() { check_depends && yell "DEBUG:check_depends OK";