Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

This may seem a somewhat strange requirement : I want to download youtube videos as I see it. I know that I would have to capture the packets using a program like wireshark , and I do know that this is possible. So lets say I have 3 computers on my network and 1 smartphone. Lets say I view a youtube video on my phone. I now want this video to be recorded on any one of the computers so that I can see it later(record in the sense capture the packets so that I dont have to download it again and waste my bandwidth). Are there any programs which will do this for me? The reason I want this is I use IMediaShare to view youtube videos on my Tv. Now once I see a video if I want to see it at a later point of time I have to download the entire video again.

share|improve this question
So if I understand correctly, you want to sniff and capture any packets that look like YouTube videos that come through the gateway on your network and then reconstruct and store them as viewable video files? – NReilingh Oct 7 '12 at 6:42
Absolutely right. Thats precisely what I want to do – Sab Oct 7 '12 at 6:46
@Sab, all YouTube videos or just ones you like? – Synetech Oct 7 '12 at 6:49
Whatever youtube video I stream from my phone to the tv would be ideal. Cause If I can achieve this then I can simply delete the ones I dont like as I am using the bandwidth anyway – Sab Oct 7 '12 at 6:54

I propose an easier solution!

Setup one computer with Linux, maybe a Raspberry Pi to use less continuous power. Sniff your home network for youtube http requests. Download the videos with youtube-dl and save them to a drive that your TV can access. It won't be as immediate or save bandwidth, but you won't have to reassemble raw packets into a video.

Install Youtube-DL with apt-get and Update

sudo apt-get install -y youtube-dl && sudo youtube-dl -U && sudo youtube-dl -U

Download Youtube Video for Off-line Viewing

youtube-dl WebAddressOfYoutubeVideo

share|improve this answer

As I understand you would like to download video file from Youtube, this is not very difficult and there are plenty different services over Internet to do this.

For example use this service - let say you would like to download video what has address - you go to paste address of video into search bar, press download - and service will bring some direct download links on the right side of page with different video formats and quality (FLV, MP4, 3GP) then select one fits you most and download video file on your PC.

share|improve this answer
> As I understand you would like to download video file from Youtube Not exactly. What they want is to be able to keep a video that they have already started watching without having to re-download the parts they have already seen. – Synetech Oct 7 '12 at 6:47

If i was to try to do it, i would start by installing a (transparent or not) HTTP proxy and start messing around with its options to cache everything from

I don't know if is HTTP cache friendly or not, but if it's not, hacking the source of the HTTP proxy might be necessary.

This will (hopefully) prevent your phone from downloading the video twice, but your TV will likely request a higher quality video, that your phone would not be able to handle otherwise. This is a different problem.

share|improve this answer
What http proxy would you recommend ? – Sab Oct 7 '12 at 12:09
@Sab: In this case ? Absolutely no idea. I would try the usual ones (like squid), and if it doesn't already work with those, i would take a small or tiny proxy with more readable/modifiable source code. – BatchyX Oct 7 '12 at 12:55

If you can handle YouTube "captures" manually, then there is a probably most naive but simple way of doing this by means of FireFox extension MediaStealer. It does not require to install any heavy soft such as traffic monitors (WireShark and similar), and proxies. And most important thing is that it eliminates much efforts to analise traffic that you should be doing otherwise. The extension will just save the video you watching (say, as video/x-flv) as a ready standalone file in your preferred directory.

share|improve this answer

If you know that you want to keep the video before starting it, then you can use an extension, addon, or user-script (I recommend YousableTubeFix).

If you don’t know that you want to keep it before starting, then unless you happen to have a packet-sniffer constantly running in the background for some reason, then your only option is to copy it from the browser cache (which may be difficult on a smartphone).

The problem is that video-streaming sites not only lock the video file as it is being streamed (which means you cannot copy it), but they mark it with a flag that causes the OS to delete it immediately as soon as the lock is closed, so you cannot forcibly close the lock.

Your best bet is to use a tool like Unlocker to copy it. Do not close the lock because the file will be deleted! Instead use its Copy function to copy the file from the cache and rename it.

You will want to clear your browser cache before starting the video or while it is still locked in order to make it easier to identify the correct file (also sort the files by size since videos tend to be the largest).

Unlocker window


The above information applies to older versions of Chrome. In newer versions (~21, 22 or so and up?) Chrome no longer uses locked-temporary files in the temp-directory. Instead, it now saves streaming videos to the regular browser cache folder in the User Data Directory (e.g., %localappdata%\Google\Chrome\User Data\Default\Cache) and the files can be easily copied from the OS (e.g., Windows Explorer). However they still have no descriptive filenames and must be identified first. This is easier if you first clear the browser cache before starting the video and then sorting the files by size.

This should make it much easier to copy the cached videos from a phone.

Note however that this still only applies to certain videos like those on YouTube; sites that use other methods of streaming videos like RTSP will still not work as they still use “native files” in Windows (and presumably tmpfs in *nix/Mac). As such, they must still be “ripped” using the same stream-capturing tools as before.

share|improve this answer
I dont mind having a packet sniffer running in the background on my computer , and use arp poisoning to capture all data packets flowing through my router. But the issue is I want to somehow automate this task completely, so the moment a get request is seen on my local network my computer captures the youtube packets and reassembles it as a video file. Do you know what would be the right place to start to do something like this. – Sab Oct 7 '12 at 6:52
If nobody can find a program that can do it, then you may want to try on StackOverflow because this is a likely to be a programming/scripting question as opposed to a simple what-program question. – Synetech Oct 7 '12 at 14:47
Right . I guess I will post it there then – Sab Oct 8 '12 at 1:10

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .