←back to thread

768 points speckx | 2 comments | | HN request time: 0.482s | source
1. andai ◴[] No.45675603[source]

    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 :)

replies(1): >>45675633 #
2. andai ◴[] No.45675633[source]
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.