Allow yt-dlp arguments. Add metadata to songs.

Currently downloaded songs do not have metadata such as cover art embedded.
There is also no option to change the audio extension.

The default is mp3. m4a provides better quality at lower file sizes.

Allowing user arguments could resolve these issues, as well as other preferences other uses might have.

Here is an example yt-dlp config I use with termux that could be set as the default to add metadata to songs.

SONGS="$HOME/storage/shared/Music"
EXT="m4a"

if [[ $1 == *"music.youtube.com"* ]]; then
    if [[ ! -d "$SONGS" ]]; then
        mkdir -p "$SONGS"
    fi
    yt-dlp "$1" \
        -f bestaudio[ext="$EXT"] \
        --embed-thumbnail \
        --ppa "ffmpeg: -c:v mjpeg -vf crop=\"'if(gt(ih,iw),iw,ih)':'if(gt(iw,ih),ih,iw)'\"" --convert-thumbnails jpg \
        --add-metadata \
        --metadata-from-title "%(artist)s - %(title)s" \
        -o "$SONGS/%(artist)s - %(title)s.%(ext)s"
fi

Please authenticate to join the conversation.

Upvoters
Status

In Review

Board

πŸ’‘ Feature Request

Date

10 months ago

Author

sk4g

Subscribe to post

Get notified by email when there are changes.