YTURL(1)

NAME
yturl - Get direct URLs to YouTube videos.

SYNOPSIS
yturl [-h] [-q QUALITY] videoID/url

videoID/url is a YouTube url or bare video ID.

DESCRIPTION
By default, yturl prints the media URL to standard output.

    $ yturl 'http://www.youtube.com/watch?v=8TCxE0bWQeQ'
    Using itag 43.
    http://r2---sn-uphxqvujvh-30al.googlevideo.com/videoplayback?source=[...]

This means that you can do something like the following to watch it in mpv:

    $ mpv "$(yturl 'http://www.youtube.com/watch?v=8TCxE0bWQeQ')"

(also works with vlc, but for some reason not with mplayer)

Or something like the following to download it (using curl):

    $ curl -Lo bill "$(yturl 'http://www.youtube.com/watch?v=8TCxE0bWQeQ')"

OPTIONS

-h, --help
    show help message and exit

-q QUALITY, --quality QUALITY
    specify quality, can be "low", "medium", "high", or an itag (see http://en.wikipedia.org/wiki/YouTube#Quality_and_formats)