#!/bin/sh# MPV Audio# fzf has --read0, maybe useful# use --loop-file for single file, better performance maybe# fzf --scheme=path for better fzf result when searching path, like the old time:# https://github.com/junegunn/fzf/commit/6fb41a202a97ad3f2437f6e5aee8890268560412if [ $# -eq 0 ]; then
find "$XDG_MUSIC_DIR" | fzf -m --print0 --scheme=path
fi | xargs -0 sh -c '
if [ $# -eq 1 ] && ! [ -d "$1" ]; then
mpv --af= --loop-file=inf --video=no "$1"
else
mpv --af= --shuffle --loop-playlist=inf --video=no "$@"
fi
' shell "$@"
下载无损音乐放手机里面
我的使用习惯:
后端:Navidrome
前端:mac 用 feishin;Linux 用 Strawberry + Easy Effect;iPhone 用 Amperfy
整理:Falcon + puddletag + beetbox/beets
想听的去youtube上搜,用yt-dlp下载音乐(
yt-dlp -f bestaudio ...)到本地用mpv听当然不少其他网站也可以用yt-dlp下载,比如bilibili(
yt-dlp -f bestaudio --cookies-from-browser firefox ...),比如soundcloud,但soundcloud最近疑似终于开始针对我这种用脚本每月从它那下载更新追Scott Buckley最新音乐的人了,我的脚本https://git.flylightning.xyz/fsh/tree/sh/upd?id=acaac6726d5ea02ff4b83dedf7e61abe68b55b63#n331活了几年最近终于开始了出问题了,泪目,目前还没深入研究如何解决问题,大概会试试如bilibili那样试一下用浏览器cookie,当然还有其他爬虫的方法: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我的mpv听歌脚本,很简单,用fzf模糊搜索本地我存音乐的文件夹选择文件或文件夹播放,https://git.flylightning.xyz/fsh/tree/sh/mpva?id=acaac6726d5ea02ff4b83dedf7e61abe68b55b63:
#!/bin/sh # MPV Audio # fzf has --read0, maybe useful # use --loop-file for single file, better performance maybe # fzf --scheme=path for better fzf result when searching path, like the old time: # https://github.com/junegunn/fzf/commit/6fb41a202a97ad3f2437f6e5aee8890268560412 if [ $# -eq 0 ]; then find "$XDG_MUSIC_DIR" | fzf -m --print0 --scheme=path fi | xargs -0 sh -c ' if [ $# -eq 1 ] && ! [ -d "$1" ]; then mpv --af= --loop-file=inf --video=no "$1" else mpv --af= --shuffle --loop-playlist=inf --video=no "$@" fi ' shell "$@"但我有时比较极端,很多时候我只听自由开源许可证(CC-BY, GPL等)的音乐,这样直接九成九的音乐我都不听了,也就不会烦恼如何听各种收费歌曲,2333
CC-BY许可证好听的主要是Scott Buckley的纯音乐,GPL许可证好听的是《破碎的像素地牢》游戏的背景纯音乐,确实没多少好听的哈哈,所以我还存着不少以前某段时间喜欢听的不自由闭源许可证的音乐,偶尔也会去youtube上下载些暂时听听
题外话:卧槽nodeseek终于支持代码块语法高亮了,真好看