Copying YouTube Videos Part II

by Erica Sadun

The trick for copying YouTube videos I mentioned in a previous post seems to have broken. No worries though. Here's a workaround.

Read the YouTube.com Terms of Service. You may copy content for personal use so long as you do not (1) distribute it further (no torrentz, dudes) and (2) do not alter copyright notices. Here's the relevant text:

Content on the Website is provided to you AS IS for your information and personal use only and may not be used, copied, reproduced, distributed, transmitted, broadcast, displayed, sold, licensed, or otherwise exploited for any other purposes whatsoever without the prior written consent of the respective owners...If you download or print a copy of the Content for personal use, you must retain all copyright and other proprietary notices contained therein. You agree not to circumvent, disable or otherwise interfere with security related features of the YouTube Website or features that prevent or restrict use or copying of any Content or enforce limitations on use of the YouTube Website or the Content therein.

Go to YouTube, open a video and wait for the video to finish loading. This little trick does not work until the entire video has cached to your computer. Do not close the YouTube window, although you may pause the video.

Launch a Terminal shell. The command-line is your friend.
Change directories to /tmp. Issue a ls -lS command to identify the cached video. As a rule, the video will occupy many megabytes and be one of the most recently created items in your /tmp directory.

Copy the file to the desktop. Use the cp command to copy the video file to your desktop, renaming it with an FLV extension.

% cp WebKitPlugInStreamRGr3qd ~/Desktop/copiedvideo.flv
%

Watch. The latest version of VideoLan Client supports FLV file playback. Because the file is in a "streamed" format, you cannot use Option-Command-Right Arrow to step forward. Also, VLC may issue an error when you load the video that you can just ignore and dismiss.

40 Comments

Andy Lee
2006-05-25 09:38:06

Even simpler, I use the Activity window in Safari. It lists the files that are being downloaded. It's usually easy to spot the one containing the video -- it contains "get_video", and/or it ends with ".flv", and/or it's the largest file and you see it taking time to download. Double-click that, and the individual file will download. (I usually pause the animation while doing this.) Hit the magnifying glass, and the file is revealed in Finder where you can rename or drag to the viewer app of your choice or drag to iSquint.

Peter
2006-05-25 10:22:06

Andy,

Shouldn't that be 'alt-doubleclick' to download the .flv file via the Activity window ?

Erica Sadun
2006-05-25 10:28:42

Why download the same data twice?

Brent
2006-05-25 12:08:11

How do you get VideoLan? I can't seem to play these videos at all!

Marcos
2006-05-25 15:17:42

It's easiest to try this site:

http://javimoya.com/blog/youtube_en.php

You just paste in the URL and it gives you the download URL/link that seems to work fine.

2006-05-25 15:26:47

Peter,

I never tried Alt-doubleclick -- thanks!

Erica,

It looks like Alt-doubleclick avoids the double-download. For some reason I had thought pausing the video paused one of the downloads, but of course that isn't so; it keeps downloading the video, just as I would want it to.

BTW, I got this technique from LifeHacker:
http://www.lifehacker.com/software/video-ipod/ask-lifehacker-youtube-videos-to-ipod-or-psp-153769.php

There are also Firefox extensions for grabbing the video, but I haven't tried them.

--Andy

Erica Sadun
2006-05-25 20:00:00

Thanks for the tip. I tried both the double-click and alt-double-click. Unfortunately, both caused the file to re-download from scratch. (I tried on both YouTube and Pandora files for testing)

Why so difficult? Open the YouTube page in Safari and open Window > Activity. Look out for a URL ending with '.flv'. Double-click on it - and that's it. The .flv is downloaded to your desktop.

Erica Sadun
2006-05-26 08:54:35

Mario: the trade-off is a little hunting in the /tmp directory versus having to re-download the entire file. If it's already on your computer, isn't it a nice win to be able to use it as-is?

Steve Garfield
2006-05-26 12:25:35

That's one of the problems with the YouTube site, their terms and conditions. Looking at it from a Creative Commons/Remix Culture point of view, it stinks!

Other sites allow you to post videos with whatever license you want. These other sites PROMOTE remixing and RESUSE. Not YouTube. Not even if you post a CC licensed work, they then want to restrict a viewers use? It doesn't seem right.

I've emailed them twice about these issues and haven't ever heard back.

I guess their Terms of Service state pretty clearly what their intentions are, combined with how hard htey make it for people to grab theg videos off the site.

Mivhael
2006-05-29 18:12:56

I much prefer Erica's way to option-double-clicking, which re-downloads the entire file. Thanks!

Adrian
2006-06-01 17:48:20

I couldn't play the .flv file in VLC 0.8.5, had to use version 0.8.1 instead.

LuS@71
2006-08-31 11:33:27

grabbing movies from You Tube ? ... and why not ? .. converting FLV in MPeg4 (all in one shot) ... look at :

http://www.gonglik.com/ytgrabcl/ytgrabcl_en.htm

Best Regards ;-)

ZZTech
2006-09-27 09:22:53

If you want to go from flv to dvd there are instructions here: http://zztools.blogspot.com/

Lore
2006-10-29 03:41:24

Did YouTube do something to their site, since it sold to Google? I can no longer see the file on /tmp ... there is nothing... i've tried several times. Before, I downloaded several videos using Erica's trick, and it worked a treat. Now, there are only a few files in /tmp starting with objc_sharing.. and being only a few bytes big.
Wassup?

Erica Sadun
2006-11-01 07:51:09

It's still working for me...

command line power
2006-11-05 08:34:30

not yet used it, but this command line script seems to handle the case:
http://www.arrakis.es/~rggi3/youtube-dl/

Also look at that browser extension:
http://en.wikipedia.org/wiki/YubNub
youtube, video.google, etc. commands have been developped..

Lore
2006-11-05 14:44:05

What can I say, i've tried and can't see any big files that could be the video. I've dowloaded a couple dozen vids in the past (using the system described above), so I'm really perplexed.
Just now, watched this Peggy Lee vid...
http://www.youtube.com/watch?v=3YU0xnTOktQ

I can still download the vid using the Activity window, of course, but that downloads the file a second time (as previously discussed).

Erica Sadun
2006-11-25 17:10:00

"Hi Erica, Yes, I'm using Tiger. But the same computer saved lots of vids only, like, a month ago."

Two things to keep in mind: 1. You've got to wait for the entire vid to download before it appears in the /tmp/ folder; and 2. Everything changes in Leopard. Which I can't talk about. Or they'll shoot me. Or shoot my dog. Or something like that.

2a27b8144a hi, i`m from india, and i has been very hart by you site)))

SaveTube
2007-02-08 23:35:33

I use http://www.savetube.com to save any youtube video.

Lore
2007-02-09 00:44:32

SaveTube has browser-specific problems (bugs) that seem to affect particularly Mac users. I tried it, and I do not see the "Download URL" button (on Safari). There is a thread on the SaveTube Forum in which several users report the same behaviour.

aguilerafan
2007-02-28 14:13:04

I recommend http://www.snatchvid.com it's the best out and very easy.

Ronnie
2007-03-03 17:59:09

how bout we talk bout window users. cause im so confused

ronnie
2007-03-03 18:13:21

nevermind i got it. it was mad easy. i was just confused about changin da name get video to something else and flv. but thanx guys.

yor
2007-04-29 12:23:44

thanks erica for always helping. i can't seem to follow this 'simple' instruction from you. where do i launch the terminal shell? what is it? where to find it? i'm sorry, i'm not familiar with these kinds of stuffs. i hope you could help me...us. thanks!

Erica Sadun
2007-04-29 12:27:47

Yor, if you're not familiar with terminal (it's found in /Applications/Utilities) you're probably a lot better off just opening the Activity window in Safari and option-clicking the movie to download it.

yor
2007-05-01 02:37:50

safari? i don't know where it is or even don't what is it. can you help me like you always do? thanks!

yor
2007-05-01 02:41:45

is for mac users only?

yor
2007-05-01 02:47:05

where do i find the applications-utilities? thanks a lot erica

koen
2007-07-04 20:12:51

So how do I extract the audio only, so I can listen to music videos using my iPod Shuffle?

princess lydel
2008-02-27 11:23:54

my videos is youtube has been permanently disbaled. is it possible for me to create new account and download the same video with different file format? thank you

Sign up today to receive special discounts, product alerts, and news from O'Reilly.