From 59f0106d5e474af05272bf1cd85261b6648c5d3c Mon Sep 17 00:00:00 2001 From: shibao Date: Tue, 26 Nov 2024 13:24:23 -0500 Subject: [PATCH] tweak song script --- home/default/scripts/add-song | 2 +- home/default/scripts/standardize-music | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/home/default/scripts/add-song b/home/default/scripts/add-song index 7eaf4f5..9dc541f 100755 --- a/home/default/scripts/add-song +++ b/home/default/scripts/add-song @@ -3,5 +3,5 @@ set -eou pipefail echo "$1" | wget-titles-from-urls >> titles.txt echo "$1" | youtube-audio -standardize-music ls -Art | tail -n 1 | xargs -d '\n' kid3 +standardize-music diff --git a/home/default/scripts/standardize-music b/home/default/scripts/standardize-music index 3bf9640..7bc3026 100755 --- a/home/default/scripts/standardize-music +++ b/home/default/scripts/standardize-music @@ -9,7 +9,7 @@ fi count=`ls -1 *.ogg 2>/dev/null | wc -l` if [ $count != 0 ]; then for i in *.ogg; do - ffmpeg -y -i "$i" "${i%.*}.mp3" && rm "$i" + ffmpeg -y -i "$i" -map_metadata 0:s:a:0 "${i%.*}.mp3" && rm "$i" done fi @@ -21,7 +21,7 @@ fi count=`ls -1 *.webm 2>/dev/null | wc -l` if [ $count != 0 ]; then for i in *.webm; do - ffmpeg -y -i "$i" "${i%.*}.mp3" && rm "$i" + ffmpeg -y -i "$i" -map_metadata 0:s:a:0 "${i%.*}.mp3" && rm "$i" done fi @@ -33,7 +33,7 @@ fi count=`ls -1 *.opus 2>/dev/null | wc -l` if [ $count != 0 ]; then for i in *.opus; do - ffmpeg -y -i "$i" "${i%.*}.mp3" && rm "$i" + ffmpeg -y -i "$i" -map_metadata 0:s:a:0 "${i%.*}.mp3" && rm "$i" done fi @@ -45,7 +45,7 @@ fi count=`ls -1 *.m4a 2>/dev/null | wc -l` if [ $count != 0 ]; then for i in *.m4a; do - ffmpeg -y -i "$i" "${i%.*}.mp3" && rm "$i" + ffmpeg -y -i "$i" -map_metadata 0:s:a:0 "${i%.*}.mp3" && rm "$i" done fi