-
Notifications
You must be signed in to change notification settings - Fork 31
Youtube
Command line tools such as cclive can download most youtube videos, though not all videos. If the video is copyright protected, cclive returns an error.
Search for something on youtube, then note the url of the page. Pass this as an argument to cclive. This will download the video as a file, in one of several formats. From here you can probably convert it to your favorite format, such as mp3, using ffmpeg.
ffmpeg -i foobar.3gpp foobar.mp3
Play the resulting mp3 file with mpg123. This is a recurring theme: download the file, convert it to mp3, and use mpg123, which has nice features like pause, fast forward, rewind, jump to index 1 through 0, etc. Here are some edbrowse functions to locate, and then download a youtube video.
# youtube search, look for something on youtube
function+yts {
b http://www.youtube.com/results?search_query=~0
}
script to download the video. If the download is successful you can run ffmpeg and then your favorite player.
# youtube extract function.
function+yte {
A
1s/^.*?href=//
s/>$//
!cclive "'."
^
}