]> zdv2.bktei.com Git - BK-2020-03.git/blobdiff - user/bk-copy-rand-music
feat(user/mp3s_to_m4b.sh):Adapt flacs_to_m4b for mp3 input
[BK-2020-03.git] / user / bk-copy-rand-music
index c99fa389c169aee2178fcf5fc9014337bc6f3e80..271b8bafdbc7dc42b55d9a05f2cf990c9297a5e0 100755 (executable)
@@ -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() {