← Back to context

Comment by andai

1 year ago

    alias mpa='mpv --no-video'

    mpa [youtube_url]

I use this to listen to music / lectures in the terminal.

I think it needs yt-dlp installed — and reasonably up to date, since YouTube keeps breaking yt-dlp... but the updates keep fixing it :)

On the subject of yt-dlp, I use it to get (timestamped) transcripts from YouTube, to shove into LLMs for summaries.

    ytsub() {
        yt-dlp \
            --write-sub \
            --write-auto-sub \
            --sub-lang "en.*" \
            --skip-download \
            "$1" && vtt2txt
    }

    ytsub [youtube_url]

Where vtt2txt is a python script — slightly too long to paste here — which strips out the subtitle formatting, leaving a (mostly) human readable transcript.