How to play protected youtube videos in mpv?

Mpv is not playing all video files from youtube anymore, even though youtube-dl has no problem downloading them. I've tried with streamlink+vlc and it says that the video is protected so it gave me the culprit and it is not a regional protection in question but something else I don't understand.

E.g. this clip is protected

Is there some way to modify mpv.conf and configure youtube-dl to download such clips for viewing in mpv?

1

2 Answers

Because you have youtube-dl installed, a possible workaround will be to stream the output of youtube-dl to the mpv player:

youtube-dl -f best -o - "{youtube-video-url}" | mpv -
# with your video example:
youtube-dl -f best -o - "" | mpv -
2

you can stream directly from youtube unto mpv by grepping direct video url

mpv $(youtube-dl -g -f '18')

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

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

You Might Also Like