Page 1 of 1

playing youtube playlist in mpv

Posted: 27 Jul 2022, 10:09
by rych
1. Install youtube-dl as per http://ytdl-org.github.io/youtube-dl/download.html,

Code: Select all

sudo curl -L https://yt-dl.org/downloads/latest/youtube-dl -o /usr/local/bin/youtube-dl
sudo chmod a+rx /usr/local/bin/youtube-dl
2. Copy the link to the playlist, (close the web browser :) ), and run mpv with optional parameters:

Code: Select all

mpv https://www.youtube.com/playlist?list=BlaBLAbLaBla
mpv https://www.youtube.com/playlist?list=BlaBLAbLaBla --no-video
mpv https://www.youtube.com/playlist?list=BlaBLAbLaBla --no-video --shuffle
3. For a convenient forwarding of the link install the Open With extension to your web browser (Waterfox Classic), and add the /ust/bin/mpv entry to its menu

4. Things to investigate:
Where does mpv (and youtube-dl?) keeps its cache?
Parameters of mpv and/or youtube-dl controlling audio quality and volume normalization

playing youtube playlist in mpv

Posted: 27 Jul 2022, 12:48
by ncmprhnsbl
rych wrote:
27 Jul 2022, 10:09
Install youtube-dl as per
menu>internet>"Browser Selection and Update Tool" has an option that will fetch and create a module of the latest version of youtube-dl for you ;)

playing youtube playlist in mpv

Posted: 28 Jul 2022, 07:15
by ncmprhnsbl
rych wrote:
27 Jul 2022, 10:09
Where does mpv (and youtube-dl?) keeps its cache?
afaics, it/they don't : https://github.com/mpv-player/mpv/wiki/ ... am-to-disk
"The mpv youtube-dl wrapper script calls youtube-dl --dump-single-json, -J on URLs that begin with http(s). This returns a direct media link from which mpv streams directly. Nothing is downloaded to disk. Once playback starts, youtube-dl has exited and is not active anymore."
rych wrote:
27 Jul 2022, 10:09
Parameters of mpv and/or youtube-dl controlling audio quality and volume normalization
partly this: https://github.com/mpv-player/mpv/wiki/ ... on-youtube
at least for video/audio format/quality..

playing youtube playlist in mpv

Posted: 28 Jul 2022, 10:55
by rych
ncmprhnsbl wrote:
28 Jul 2022, 07:15
Where does mpv (and youtube-dl?) keeps its cache?

afaics, it/they don't
I was interested because the video playback actually stuttered, and I was wondering whether they pre-buffer the stream on my congested/slow USB or buffer into RAM but not enough, so I'd allow them to use more RAM

playing youtube playlist in mpv

Posted: 29 Jul 2022, 10:15
by rych
Apparently, we should use https://github.com/yt-dlp/yt-dlp instead. So:

Code: Select all

cd /usr/local/bin/
curl -L https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp -o yt-dlp
sudo chmod a+rx yt-dlp
mv youtube-dl youtube-dlOLD
ln -s yt-dlp youtube-dl

playing youtube playlist in mpv

Posted: 30 Jul 2022, 03:55
by ncmprhnsbl
mpv will detect and use either youtube-dl or yt-dlp ..
another method:
1. open mpv (from menu)
2. drag the desired video or playlist from the browser (the preview is fine) to the mpv window
3. watch :)