0

I watch YouTube videos by piping URLs to mpv. Sometimes I would like to keep the video file after having watching it; just like if I had downloaded it with youtube-dl. I was wondering if there is a mpv option I am unaware of to do that (before writing my own script).

I tried to mess around with mpv cache option but the cache file does not correspond to the video I would get with youtube-dl. I also tried to force the output within ytdl-raw-option but mpv stays in streaming mode and saves only the cache file.

0

This should work:

youtube-dl -o - "$URL" | tee /tmp/stream.raw | mpv -
1
  • I was looking for a mpv option/config, nice one liner however. Such an option may not exist.
    – user413007
    Jun 24 '20 at 13:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy