X-Git-Url: https://zdv2.bktei.com/gitweb/BK-2020-03.git/blobdiff_plain/7eda3f2f62b476cc4536240d0f093b0dcadc2d44..2217188058c6d02840a9ea5f53b9de72c56d88d1:/user/bk-copy-rand-music?ds=sidebyside diff --git a/user/bk-copy-rand-music b/user/bk-copy-rand-music index c99fa38..271b8ba 100755 --- a/user/bk-copy-rand-music +++ b/user/bk-copy-rand-music @@ -1,7 +1,7 @@ #!/usr/bin/env bash # Desc: Copies random audio files # Usage: bk-copy-rand-music [dir SOURCE] [dir DEST] [int DURATION] ([int BYTES]) -# Version: 0.6.0 +# Version: 0.6.1 # Depends: BK-2020-03: bkshuf v0.1.0 declare -Ag appRollCall # Associative array for storing app status @@ -19,7 +19,7 @@ min_file_size="100000"; # minimum size per input music file (bytes) max_file_size="100000000"; # maximum size per input music file (bytes) siz_dest="600000000"; # default destination size limit: 600 MB max_find_depth="10"; # max find depth -limit_bitrate="320000"; # maximum bitrate (bps) for output audio files +limit_bitrate="256000"; # maximum bitrate (bps) for output audio files (256000 for opus) # Load env vars (bkshuf defaults for typical music albums) if [[ ! -v BKSHUF_PARAM_LINEC ]]; then export BKSHUF_PARAM_LINEC=1000000; fi; @@ -398,7 +398,7 @@ transcode_copy() { # var limit_bitrate int max output transcode bitrate (bps) # Output: file - ffmpeg -nostdin -i "$1" -c:a libopus -b:a "${limit_bitrate}" "${2}.opus"; + ffmpeg -nostdin -i "$1" -c:a libopus -b:a "${limit_bitrate}" "${2}.opus"; }; # transcode to lower bitrate audio file main() {