From 79eb39cb6ab783882b532dbe4281cf18fd6cf8de Mon Sep 17 00:00:00 2001 From: Xiao Pan Date: Sat, 2 May 2026 20:16:36 +0800 Subject: upd yt-dlp download music of scott then convert all to opus --- sh/upd | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/sh/upd b/sh/upd index c7bda9f..e597806 100755 --- a/sh/upd +++ b/sh/upd @@ -317,6 +317,16 @@ refl () { music () { yt-dlp -f 'bestaudio[ext=opus]/bestaudio' --match-filter 'license=cc-by' --match-filter 'title~=(?i)cc-by' -P "$XDG_MUSIC_DIR/cc-by/scott_buckley" https://soundcloud.com/scottbuckley/tracks + # In the past, most scott's music on soundcloud has opus format, some are + # mp3 and some are m4a with aac. At maybe February 2026, I can't download + # scott's music from soundcloud with yt-dlp with this cli. Later on at May + # 2026, the issue somehow fixed. But I noticed that yt-dlp can only + # download most scott's music on soundcloud in m4a with aac. This cause me + # redownload a lot of music in m4a. I prefer opus because it is better and + # take less space. And I want yt-dlp to not download already downloaded + # music files. So I decided to use `-x --audio-format opus` to convert all + # of them to opus. The trade-off is that converting lossy to lossy is bad. + yt-dlp -f 'bestaudio[ext=opus]/bestaudio' -x --audio-format opus --match-filter 'license=cc-by' --match-filter 'title~=(?i)cc-by' -P "$XDG_MUSIC_DIR/cc-by/scott_buckley" https://soundcloud.com/scottbuckley/tracks rsync -avP --delete "$XDG_MUSIC_DIR/cc-by/scott_buckley" pp:music/cc-by rsync -avP --delete "$XDG_MUSIC_DIR/gpl-3.0-only" pp:music rsync -avP --delete "$XDG_MUSIC_DIR/favorite" pp:music -- cgit v1.3