Showing posts with label opera. Show all posts
Showing posts with label opera. Show all posts

Sunday, February 10, 2013

How to download videos in Opera

I have used Opera as my favorite browser for last 10 -12 years now (since its 6th version). I had always liked it for its tab support, being light weight and also being available in Linux (a browser with better fonts for those days). Internet Explorer was slow and Firefox in its earlier versions was good but got quickly gloated with extensions and addons. Chrome is way to heavy.

So the good and bad thing in Opera is that it does not have too many addons. Without them the browser was solid and light weight. Without them, its features were limited so was good for browsing but lacked some features readily available on others. One of the features was to download flash streaming videos. Firefox and Chrome, both have good extensions to support it. Opera did not have it readymade and and all its supposed extensions were links to some video donwloader site which I don't prefer So how to do it.

Yes there's a way. Opera is known for its excellent cache and I tried to use it. Lets take the example of dailymotion from which say I want to download a video. So here are the steps:
  1. First clear the cache (Setting :: Delete Private Data)  - It will help us clear the old data and knowing new URLs will be easy. Later you will almost remember them.
    Before I move ahead, let me explain how things are working for video sites. First say a site like www.dailymotion.com will use another site (CDN) to deliver it content. For dailymotion its dmcdn.net similarly for youtube its ytimg.com. Also now the whole video is not delivered as one big file to the client browser. Its broken in to fragments. So now if you pause a video, you can see the download stop after some time i.e. after the fragment ends. This was always the case with dailymotion. With youtube, the download did not stop earlier but now even they too have implemented it. Its more like dowload on demand. So when the player reaches the end of fragment one, it starts downloading the fragment two. So here we go.
  2. After the cache is cleared, type in "opera:cache" in your browser location bar. It should show the cache as empty.
  3. Open dailymotion.com and search for say "gangnam style"
  4. Don't open the video. In the "opera:cache" tab now you will see URL's being cached
  5. Now play the video and pause it after 10 seconds. Refresh the cache now. Select the 4 checkboxes for video and then click the Preview link next to dmcdn.net. It will open a new tab:
  6.  Play the video for another 30 seconds and refresh the Cached Video list for dmcdn.net. You will find more items getting listed there.
  7.  Now have a close look at the URLs. They look like:
    1. http://vid2.ak.dmcdn.net/sec(6f246bdc0f86287961fdadfc57ab38e2)/frag(1)/video/623/746/50647326_mp4_h264_aac.flv
    2. http://vid2.ak.dmcdn.net/sec(6f246bdc0f86287961fdadfc57ab38e2)/frag(6)/video/623/746/50647326_mp4_h264_aac.flv
    3. http://vid2.ak.dmcdn.net/sec(6f246bdc0f86287961fdadfc57ab38e2)/frag(4)/video/623/746/50647326_mp4_h264_aac.flv
  8.  From inspection, you can see that that the whole URL is same except for the frag(N) part.
  9.  So we now we have the URL of the whole video if we just remove the frag part. In the above case, it is : http://vid2.ak.dmcdn.net/sec(6f246bdc0f86287961fdadfc57ab38e2)/video/623/746/50647326_mp4_h264_aac.flv
  10. Open this link in a new tab and you can now save the video in you local disk.
Enjoy downloading videos. 

Hint: You can do the same in firefox using "about:cache" but with addons who will do all this :)

Wednesday, September 24, 2008

Picasa 3.0: Download Web Albums in Firefox or Opera

Earlier I explained how to download picasa web albums using firefox and Opera in the post http://sandyiit.blogspot.com/2008/01/picasa-download-albums.html

Summarizing:
To do so, just view the source of the page. Do a right click + View Page Source in case of Firefox of press CTRL + F3 in case of opera. Now in the HTML source search for the string picasa://.

Now you will get a statment which looks like:

picasa://downloadfeed/?url=http%3A%2F%2Fpicasaweb.google.com%2Fdata%2Ffeed%2Fback_compat%2Fuser%2Fsandyiit%2Falbumid%2F5152729459149591681%3Fkind%3Dphoto%26alt%3Drss%26imgdl%3D1


This is the download url based on the picasa:// protocol. Now how do you use it to download the album. Simple, just open the command window type in:

> c:\Program Files\Picasa2\Picasa2.exe _url_

The _url_ is the picasa:// url which we got above. When you do so, you will picasa launching itself and loading the web album and asking you whether you want to download it or not. Do it and you have the album at your desktop and the work is done :)

But Now Picasa 3.0 (the new look) has changed the page layout and so has the way to get the _url_. Now to get the correct _url_ : you still need to go the page source. In there:
  1. Search for text : _album.picasa =
  2. Copy the text after the equal to sign to notepad.
  3. Find and Replace '\x2F' by '/' (without the single quotes). The initial part of the text would look like
    picasa:\x2F\x2Fdownloadfeed\x2F?url=http%3A%2F
    This needs to be replaced by
     picasa://downloadfeed/url=........

  4. That done, we revert back to the original steps and type in: "c:\Program Files\Picasa2\Picasa2.exe" _url_ at the command prompt and all works as usual.