I would like to be able to play and save a video with mpv --ytdl. How do I got about doing that? What's particularly important is that the buffer gets saved too.
Basically, I would like to play a video from youtube, then quit mpv and still be able to keep watching the video up until the point it was loaded - that's why I also need the buffers to be saved to a file.
I have already tried using youtube-dl -o - to stream the video to stdout and then piping that with mpv, i.e.
youtube-dl -o - | mpv -
(with the idea that I could use tee to split the stream and simply write it to a file) - however, this has the problem that I can't use mpv to navigate through the video - it's just a fixed stream coming from stdin after all. Another idea I had was using mpv's -o option to specify an output file. That does not save the internal buffer, however.