-
|
hey everyone. #!/bin/zsh
yt-dlp "$1"
wait $?
LAST=$(ls -t $HOME/Videos/ | head -n1)
NEW=$(echo "$LAST")
CUT=$(echo "$LAST" | tr -d " \t\n\r" )
NAME=$(echo $CUT | rev | cut -f 2- -d '.' | rev)
if [[ $? -eq 0 ]]; then
ffmpeg -i $HOME/Videos/$NEW -q:a 0 -map a $NAME".flac"
fi
if [[ $? -eq 0 ]]; then
LOCATION=$(pwd)
mv $LOCATION/$NAME".flac" $HOME/music/$NAME".flac"
fi |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
The cover arts are read from embedded images in the music file itself or a cover.png/jpg/webp in the files directory. You need to instruct yt-dlp to download the image alongside the music data, see what rmpc does with its yt dlp integration for example rmpc/src/shared/ytdlp/downloader.rs Lines 102 to 117 in c8698ec the metadata embedding is also done with --embed-metadata |
Beta Was this translation helpful? Give feedback.
The cover arts are read from embedded images in the music file itself or a cover.png/jpg/webp in the files directory. You need to instruct yt-dlp to download the image alongside the music data, see what rmpc does with its yt dlp integration for example
rmpc/src/shared/ytdlp/downloader.rs
Lines 102 to 117 in c8698ec