It is possible with MPV to play a playlist, which is a list of URL`s one on each line, and this will be played in order by MPV. This is very easy to do.
Make a playlist in VIM. This example works just fine. You do not need any special characters, just one URL on each line.
1 2 3 4 5 | https://www.youtube.com/watch?v=W2QIlGorKUg https://www.youtube.com/watch?v=C5YkVhk-LZk https://www.youtube.com/watch?v=hg2YtRDdiIo https://www.youtube.com/watch?v=CyBQIRvESE0 https://www.youtube.com/watch?v=2on6lf5T6I0 |
Then play the MPV playlist like this. It works just fine for playing a collection of your favorite music.
jason@jason-desktop:~/Documents$ mpv --playlist=playlist.txt [playlist] Reading plaintext playlist. Playing: https://www.youtube.com/watch?v=W2QIlGorKUg (+) Video --vid=1 (*) (vp9 1920x1080 11.988fps) (+) Audio --aid=1 --alang=eng (*) (opus 2ch 48000Hz) AO: [pulse] 48000Hz stereo 2ch float VO: [gpu] 1920x1080 yuv420p AV: 00:02:05 / 00:05:17 (39%) A-V: 0.000 Cache: 157s/20MB [ffmpeg] tls: Error in the pull function. [ffmpeg] https: Will reconnect at 5062624 in 0 second(s), error=Input/output error. AV: 00:05:16 / 00:05:17 (99%) A-V: 0.000 Cache: 0.0s Playing: https://www.youtube.com/watch?v=C5YkVhk-LZk AV: 00:05:16 / 00:05:17 (99%) A-V: 0.000 Cache: 0.0s (+) Video --vid=1 (*) (vp9 1920x1080 11.988fps) (+) Audio --aid=1 --alang=eng (*) (opus 2ch 48000Hz) AV: 00:06:15 / 00:06:15 (99%) A-V: 0.000 Cache: 0.0s Playing: https://www.youtube.com/watch?v=hg2YtRDdiIo AV: 00:06:15 / 00:06:15 (99%) A-V: 0.000 Cache: 0.0s (+) Video --vid=1 (*) (h264 1920x1080 11.987fps) (+) Audio --aid=1 --alang=eng (*) (opus 2ch 48000Hz) AV: 00:04:06 / 00:04:07 (99%) A-V: 0.000 Cache: 0.0s Playing: https://www.youtube.com/watch?v=CyBQIRvESE0 AV: 00:04:06 / 00:04:07 (99%) A-V: 0.000 Cache: 0.0s (+) Video --vid=1 (*) (vp9 1080x1080 25.000fps) (+) Audio --aid=1 --alang=eng (*) (opus 2ch 48000Hz) AV: 00:04:06 / 00:04:07 (99%) A-V: 0.000 Cache: 0.0s VO: [gpu] 1080x1080 yuv420p AV: 00:00:22 / 00:05:13 (7%) A-V: 0.000 Cache: 290s/21MB Exiting... (Quit) |
I have tried playing Youtube playlists with MPV directly and it stops after the first video, so this is a good way to get around this. It works perfectly for playing a playlist of music with MPV easily.
This explainer is cryptic.
Thanks so much
Thanks