Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Get direct URLs to YouTube videos.

README.md

Build status

yturl gets direct media URLs to YouTube media, allowing you to play them in your favourite media player, download them, or do whatever you like.

Usage

To get the media URL for a video, pass a URL containing the video ID:

yturl youtu.be/kTFZyl7hfBw

You can get higher quality by using -q high.

It's up to you what you do with the URL. I usually view the video in mpv:

mpv "$(yturl youtu.be/kTFZyl7hfBw)"

You might use a shell function if you do this often:

yt() { mpv "$(yturl "$@")"; }

You can replace mpv with your media player of choice.

Something went wrong with that request. Please try again.